Repository navigation
Bring the CI modernization into master - #10
Merged
Merged
Conversation
setup.py declared no dependency (install_requires was empty), pinned the supported versions to 3.7 and 3.8 and shipped the example scripts as executables. Describe the project in pyproject.toml instead, with the runtime dependencies that the code imports, Python >= 3.10, and test, docs and release extras. The version still comes from glmdisc.__version__.
The lint options only lived in tox.ini next to a py37-py310 environment list that CI never used. Move them to .flake8, which both the workflow and a local run read, and remove tox.ini.
The workflow ran on Python 3.7 and 3.8, which actions/setup-python can no longer install, so it never started. Test on 3.10 to 3.12 with checkout v4 and setup-python v5, install with pip from pyproject.toml instead of pipenv, lint in its own job, and build and check the distributions in a third job. Coverage goes to Codecov from one job.
Travis is no longer used (the GitHub workflow replaced it), and the Pipfile and its lock pinned old dependencies that pyproject.toml now declares, including versions flagged by Dependabot.
Drop the Travis badge, list the supported Python versions of the workflow and replace the pipenv and tox instructions with an editable pip install and the flake8 configuration.
Modernize packaging and CI
PR 9 was merged into the Keras 3 branch after that branch had gone to master, so master kept the Python 3.7 workflow. Bring the commits in; the Dependabot bumps of Pipfile.lock are dropped with the file, which pyproject.toml replaces.
scikit-learn 1.8 removed the multi_class argument of LogisticRegression, so every SEM fit with a continuous feature raised TypeError. The newton-cg solver already fits a multinomial model when there are more than two classes, which is what multi_class='multinomial' asked for.
LabelEncoder.transform returns a one-element array and int() on it is deprecated since NumPy 1.25, an error with the NumPy 2.4 that CI now installs. Index the element, and make pytest fail on this warning so it cannot come back unnoticed.
The SEM fit used np.in1d to find the quantization levels that vanished from the training rows, and CI now installs a NumPy without it. Use np.isin, which behaves the same, and make pytest fail on the in1d deprecation warning so older NumPy versions catch it too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Master's CI is red: it still runs the old workflow on Python 3.7 and 3.8,
which cannot be installed anymore. The modernization (#9) never reached
master: it was merged into
fix/keras3-nnafter #8 had already been mergedinto master.
This brings those 5 commits (pyproject.toml,
.flake8, new workflow, removalof Travis/Pipenv/tox, README) into master. The merge conflicts only on
Pipfile.lock, modified by the Dependabot PRs and deleted here; it is removed,since
pyproject.tomlreplaces the Pipfile. The resulting tree is identical tothe one tested in #9 (93 tests pass locally on Python 3.12).
The new workflow runs for the first time on this PR (Python 3.10 to 3.12).