Attempt to move to UV and ruff. #205
Open
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.
This PR introduces several updates to the project's configuration and code style management, modernizes dependency handling, and improves code formatting and consistency across Jupyter notebooks. The PEP rule set is selected from Google's public projects, but some can be dropped if it's too much.
The most significant changes are the migration to PEP 621-compliant
pyproject.toml, switching to Ruff for linting and formatting, and general code cleanup in notebooks for improved readability and consistency.Configuration and Dependency Management Updates:
pyproject.toml, updating the[project]section and refactoring dependencies and development dependencies into[dependency-groups]. The build backend is nowhatchling, andrequires-pythonis set to>=3.11.pyproject.tomland.pre-commit-config.yaml, replacing previous hooks for Black, Flake8, and Isort. Ruff is now the primary tool for code style enforcement. [1] [2] [3]Code Style and Formatting Improvements:
src/scida/__init__.pyto use explicitasimports for clarity and consistency.Notebook Kernel and Version Updates:
.venvandpython3instead of custom kernel names, and bumped Python version metadata to3.13.1for compatibility with updated dependencies. [1] [2] [3]Minor Code Cleanups:
src/scida/config.py. [1] [2]References: [1] [2] [3] [4] [5]
NOTE: The large diffs are just formatting changes apparently.
All the test cases still seem to work and pass -- at-least on vera.