Skip to content
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

Update cookiecutter, adopt pyproject.toml #292

Merged
merged 23 commits into from
Nov 30, 2023
Merged

Update cookiecutter, adopt pyproject.toml #292

merged 23 commits into from
Nov 30, 2023

Conversation

Zeitsperre
Copy link
Contributor

@Zeitsperre Zeitsperre commented Nov 24, 2023

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
    • This PR fixes #xyz
  • (If applicable) Documentation has been added / updated (for bug fixes / features).
  • (If applicable) Tests have been added.
  • This PR does not seem to break the templates.
  • HISTORY.rst has been updated (with summary of main changes).
    • Link to issue (:issue:number) and pull request (:pull:number) has been added.

What kind of change does this PR introduce?

  • Updates the cookiecutter to the latest changes, adopting PEPs 517, 518, and 621.
  • Now using bump-my-version instead of bump2version.
  • Linting is performed with ruff for the majority of checks, with minimal flake8-based checks (until such a time that these checks are ported to ruff).
  • Documentation has been modified from the cookiecutter to maintain setuptools-relevant information.
  • All non-babel configurations have migrated to .flake8 and pyproject.toml.
  • Many low-effort lint-related fixes applied.
  • tox builds are now more pure Python build friendly.
  • pre-commit now has hooks for TOML files, JSON schemas, and ruff.

Does this PR introduce a breaking change?

There are no behavioural changes for users or developers, but the build system configurations are now more centralized into pyproject.toml. bump2version has been replaced with bump-my-version (maintained; pyproject.toml support).

setup.py has been mostly hollowed out. The only function remaining is that which generate the translations. This approach is the recommended way to maintain setup.py functionality in the new build system.

The contents of the wheel are set within pyproject.toml while those of the source distribution are still set via MANIFEST.in, similar to how it was configured before.

Other information:

https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
https://docs.pypi.org/trusted-publishers/using-a-publisher/

What's missing?

  • The PR summary of changes needs to be fully described
  • Linting checks need to be reconfigured for ruff
  • Trusted Publishing needs to be configured

… publishing, migrate settings to pyproject.toml and .flake8, rename black to lint, consistency in Makefile calls, add actions-version-updater
@Zeitsperre Zeitsperre self-assigned this Nov 24, 2023
@github-actions github-actions bot added CI Modifications to autiomation utilities docs labels Nov 24, 2023
@github-actions github-actions bot added the xclim Additions to xclim_modules or improvement for xclim label Nov 27, 2023
@Zeitsperre
Copy link
Contributor Author

Zeitsperre commented Nov 27, 2023

I have two commits waiting to resolve (?). Once those are in, feel free to review!

Edit: They're in.

@Zeitsperre Zeitsperre marked this pull request as ready for review November 27, 2023 20:27
@Zeitsperre Zeitsperre requested review from RondeauG and aulemahal and removed request for RondeauG November 27, 2023 20:27
CONTRIBUTING.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Show resolved Hide resolved
CONTRIBUTING.rst Show resolved Hide resolved
CONTRIBUTING.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Show resolved Hide resolved
CONTRIBUTING.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Show resolved Hide resolved
environment-dev.yml Show resolved Hide resolved
xscen/catutils.py Show resolved Hide resolved
Copy link
Collaborator

@aulemahal aulemahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new convention seems nicer!

CHANGES.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Show resolved Hide resolved
CONTRIBUTING.rst Show resolved Hide resolved
CONTRIBUTING.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@RondeauG
Copy link
Collaborator

We'll need to modify PULL_REQUEST_TEMPLATE.md to refer to CHANGES.rst, instead of HISTORY.rst

@Zeitsperre Zeitsperre merged commit 8b8c31d into main Nov 30, 2023
18 checks passed
@Zeitsperre Zeitsperre deleted the update-cruft branch November 30, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Modifications to autiomation utilities docs xclim Additions to xclim_modules or improvement for xclim
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants