Infrastructure cleanup#400
Conversation
This commit cleans up the infrastructure and project configuration by removing unused files and updating the remaining ones. Changes: - Deleted `.bumpversion.cfg` as it is not used in the project. - Deleted `.mypy.ini` and integrated it into `pyproject.toml` under the `tool.mypy` section. - Bumped the python version to 3.11 in the mypy configuration to reflect the minimum supported version. - Updated `.pre-commit-config.yaml` to remove unused hooks and dependencies. - Removed the `mirrors-prettier` hook as it is conflicting with `ruff` and `.editorconfig` settings. - Removed the `check-ast`, `end-of-file-fixer`, `mixed-line-ending` and `trailing-whitespace` hooks as they are redundant with `ruff`. - Cleaned up the `pyproject.toml` and updated tool configs - Split the `tool.ruff` configuration into multiple sections to improve readability and maintainability. - Updated the `ruff` to reflect the `.editorconfig` settings (indentation, line endings, etc.) - Set the `ruff` minimum python version to 3.11 to reflect the minimum supported version. - Converted optional dependencies into dependency groups in line with PEP 735, to improve the organization and clarity of the dependencies. - Removed `pre` dependency group as it is not different to the main dependencies and only used for `.readthedocs.yaml`. - Removed `bump2version` from the `dev` dependency group as it is not used in the project and abandoned. - Updated `.readthedocs.yaml` - Removed the `pre` dependency group from the installation command as it is not different to the main dependencies and only used for `.readthedocs.yaml`. - Updated resolver to use `uv` instead of `pip` to install dependencies, as it is faster and works with dependency groups.
This commit adds the "docstring-convention" rule to the ruff configuration in pyproject.toml. It enforces the use of a consistent numpydoc style for docstrings across the codebase, in line with the project's documentation standards.
This commit updates the test CI job to use dependency groups defined in the pyproject.toml file and bumps action versions. Changes: - Updated the test CI job to use dependency groups defined in pyproject.toml. - Replace manual pip cache with the built-in caching mechanism of the setup-python action. - Bumped action versions to the latest available.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #400 +/- ##
=======================================
Coverage 63.38% 63.38%
=======================================
Files 26 26
Lines 3217 3217
=======================================
Hits 2039 2039
Misses 1178 1178 🚀 New features to boost your workflow:
|
|
Fixed CI workflow. Updated it to work with dependency groups and replaced manual caching with |
|
Hej @Zethson, sorry for the delayed response. I wanted to take a closer look at the cookiecutter repository first to better understand what adopting #345 would involve. I in theory understand the goal of converging on a more consistent developer experience across scverse repositories, and I agree with that goal in principle. I am not yet convinced, though, that adopting the cookiecutter template as a synced structural source would be the best fit for this repository. My main concern is that many of the relevant parts of the template seem like they would need to be excluded or overridden here. If that is the case, automated syncing may not provide much consistency in practice, while still adding another maintenance surface and making project-specific configuration harder to preserve. Some concrete areas where the template itself has problems / I am unsure about the fit are:
I do think I am also a bit cautious about automated syncing via My current preference/suggestion would be to align with specific conventions explicitly where they make sense, for example documentation dependencies etc., rather than syncing this repository from the cookiecutter template. Could you clarify which specific parts of the template you would expect to be adapted here/in spatialdata? That would help me understand whether there is a useful subset to adopt, or whether this should instead be handled as targeted improvements. My initial idea was to perform a minimal cleanup to remove active problems interfering with development like a misconfigured mypy etc. to then in a later patch address deeper/further reaching dx concerns/restructures. Thanks a lot for your time, and have a nice weekend! |
|
Great answer! If there are things that you think can be improved in the template, we'd love to see updates to the template. Not adopting the template is kind of not an option. |
|
Great, then I will get at it! |
|
@Zethson Do you want it as part of this pull request or should I split it? |
Hej evreyone,
I have a project depending on this project and saw there is some cleanup potential in preparation for some bigger refactors/cleanups.
This is a patch series cleaning up the projects infrastructure. Removing/consolidates unnecessary/no longer used files/configs and updating tool configs etc. in preparation for a general cleanup/restructure.
Changes:
.bumpversion.cfgas it is not used in the project..mypy.iniand integrated it intopyproject.tomlunder thetool.mypysection..pre-commit-config.yamlto remove unused hooks and dependencies.mirrors-prettierhook as it is conflicting withruffand.editorconfigsettings.check-ast,end-of-file-fixer,mixed-line-endingandtrailing-whitespacehooks as they are redundant withruff.ruffpyproject.tomland updated tool configstool.ruffconfiguration into multiple sections to improve readability and maintainability.ruffto reflect the.editorconfigsettings (indentation, line endings, etc.)ruffminimum python version to 3.11 to reflect the minimum supported version.rufflinting config in line with project standards.predependency group as it is not different to the main dependencies and only used for.readthedocs.yaml.bump2versionfrom thedevdependency group as it is not used in the project and abandoned..readthedocs.yamlpredependency group from the installation command as it is not different to the main dependencies and only used for.readthedocs.yaml.uvinstead ofpipto install dependencies, as it is faster and works with the implemented dependency groups.