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

Adopt pyproject.toml standard, fast-forward cookiecutter #135

Merged
merged 25 commits into from
Dec 11, 2023
Merged

Conversation

Zeitsperre
Copy link
Contributor

@Zeitsperre Zeitsperre commented Nov 17, 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.
  • 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?

  • Uses the latest cookiecutter template
  • Replaces setup.py, MANIFEST.in, requirements*.txt, and most configs in the setup.cfg for pyproject.toml
  • Most flake8 checks are now handled via ruff
  • New GitHub Workflows for automatically managing version bump and actions versions.
  • Documentation adjustments
  • Basic configurations for mypy-compliance

Does this PR introduce a breaking change?

Yes. We now are using pyproject.toml with flit to build the library. This will entail one or two major changes to a typical development workflow.

The main changes worth noting:

  • $ pip install -e . should be substituted for $ flit install -s/--symlink when performing development installations ($ pip install . works exactly as you'd expect).
    • Alternatively, one can run $ make develop. This is documented.
  • Most configurations are now found within the pyproject.toml

Other information:

https://flit.pypa.io/en/stable/index.html
https://peps.python.org/pep-0518/
https://peps.python.org/pep-0621/
https://www.mypy-lang.org/

@Zeitsperre Zeitsperre added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Nov 17, 2023
@Zeitsperre Zeitsperre self-assigned this Nov 17, 2023
@Zeitsperre Zeitsperre marked this pull request as ready for review November 21, 2023 16:38
Copy link
Collaborator

@sarahclaude sarahclaude left a comment

Choose a reason for hiding this comment

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

Is there a reason why envrionment.yml became environment-dev.yml?

docs/installation.rst Show resolved Hide resolved
docs/installation.rst Show resolved Hide resolved
@Zeitsperre
Copy link
Contributor Author

Is there a reason why envrionment.yml became environment-dev.yml?

The reason is that the cookiecutter uses environment-dev.yml for marking dev dependencies. If it's not much trouble to adjust your routines to environment-dev.yml, the project will simply be more in sync with the template.

@sarahclaude
Copy link
Collaborator

Thanks for the info!

@Zeitsperre
Copy link
Contributor Author

@sarahclaude

This is good for final review!

Copy link
Collaborator

@sarahclaude sarahclaude left a comment

Choose a reason for hiding this comment

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

Works great, flit could be added to environment-dev.yml to not have to install it after

@Zeitsperre
Copy link
Contributor Author

@sarahclaude

Everything except the docs seems to be working. We're running into resource issues for some reason (are the notebooks too complex?). If you are happy with everything else, we can open another PR to fix that.

@Zeitsperre Zeitsperre merged commit 498e9d2 into main Dec 11, 2023
11 checks passed
@Zeitsperre Zeitsperre deleted the pyproject branch December 11, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants