-
Notifications
You must be signed in to change notification settings - Fork 59
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
Employ a src
-based layout for code base
#1971
Conversation
Note It appears that this Pull Request modifies the On inspection, the No further action is required. |
# Conflicts: # .github/workflows/publish-mastodon.yml # CHANGELOG.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Some lines add options (e.g. when cli
is invoked, new options I don't know about), and I'm not too familiar with these commands
The changes to CLI were needed since the location of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
# Conflicts: # CHANGELOG.rst
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
src
-based layout (in lieu of a flat code base layout)yamllint
configuration (no changes made to existing YAML files)pint
to >=0.24.4 in order to support Python3.13 (and evade failures fromflexparser>=0.4
).Does this PR introduce a breaking change?
Yes. The code base has been modified such that existing interactive (
--editable
) installations will need to be re-installed.This change prevents developers from accidentally running tests or importing
xclim
from the root directory. That's essentially the major gain.Otherwise, we can say that this brings
xclim
closer in line with the otherOuranosinc/cookiecutter-pypackage
template-based projects.Other information:
https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/
https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html#the-src-layout-and-testing