-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style switch to ruff format #1652
Draft
jackvreeken
wants to merge
28
commits into
master
Choose a base branch
from
style-switch-to-ruff-format
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
Collaborator
jackvreeken
commented
Feb 4, 2025
•
edited
Loading
edited
- Builds on Add deploy to PyPI job #1650 and Remove dependency on pkg resources #1651 , so merge those first
- Add commit to .git-blame-ignore-revs (after merge)
workflows: add work flow based on the gitlab ci workflow
Use the correct workflow status badge in the README.md.
Provide some information on the migration from gitlab to github and how to update the git remote url.
Update readme
Update the autogenereted versioneer.py and _version.py files with the latest versioneer package. This makes versioneer compatible with python 3.12.
Remove the upper limit on numpy and scipy versions. The older versions are no longer compatible with python 3.12.
Fix string-to-datetime/float conversions in loading csv files for latest numpy version. With the latest numpy.genfromtxt, strings are not always passed to converters in byte format but sometimes in plain text format.
Fix the except clause when model transferring a model failed due to an incompatible cache file. Raise the error only when no cache file was used.
Use -999 instead of nan when missing values are indicated by -999.
Include tests using python 3.12.
Move the cross reference just above the section name, instead of in the middle of the section. Sphinx expects references to be just above sections/figures/tables.
Update install instructions for Python 3.12. Installing rtc-tools with Python 3.12 requires installation of setuptools.
Use np.genfromtxt instead of np.recfromcsv, since the latter is deprecated.
Remove the deprecated function get_html_theme_path.
Upgrade for python 3 12
fix: Typo in examples
Python 3.8 is EOL since October 2024. Note that we already stopped running the CI/CD pipeline on 3.8 .
Because we are running on GitHub now, this file is no longer needed and only confuses e.g. find/replace in editors.
Adding a separate workflow for deploying is possible, but to _also_ make it depend on the tests succeeding is difficult. We would have to use the `workflow_run` event, but that one cannot filter on tags, only on branches. As such, we might as well add it to the overall workflow.
The examples are only run for tags, we can therefore be rather sure that most stages of the pipeline will succeed. To save a little bit of time, we can run the examples job in parallel with the other tests and coverage, especially because the examples take quite a while to run. Note that we add coverage as an explicit dependency to the deploy job, and as such sill require all jobs to succeed before deploying like.
There is no passing of xml reports from the testing jobs to the coverage job, so we can speed up the overall pipeline by running coverage in parallel.
We already use the more modern "python -m build" during the deploy stage; so we bring the 'build' stage in line with that.
The pkg_resources package is deprecated, although still available if (manually) installing setuptools. A more modern approach is the usage of "importlib", available since Python 3.9. Note that we do require a change to "entry_point" accepting a group parameter that was introduced with Python 3.10, so we fall back to a version of "importlib_metadata" that support this. Also note that we also only require this external (backport) dependency for Python 3.9.
This makes the pre-commit hooks faster still, and leverages the extra capabilities of a dependency we already have anyway. Note that we bump the version of Ruff as well, and update the pyproject.toml to use the recommended "lint.ignore" instead of just "ignore".
a8ee3b0
to
6886778
Compare
03367be
to
240ff5d
Compare
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.