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

Move project metadata to pyproject.toml, clean-up #883

Merged
merged 9 commits into from
Jul 30, 2024

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Jan 16, 2023

There are perhaps too many changes here, but here's a summary of the main items:

  • Specify a package build backend, based on setuptools (PEP 517 and PEP 518)
  • Move most of the static project metadata from setup.py to pyproject.toml (PEP 621), as supported by setuptools

Transferring metadata from setup.py to pyproject.toml is nearly 1:1 with a few changes:

  • Dependencies are moved from requirements/production.txt to the dependencies section. These are now installed via pip install ., along with the package.
  • Three optional dependency groups (or "extras") are created: lint, test and dev, where dev includes both lint and test. These can be installed (e.g.) pip install .[lint]. Perhaps others should be created, e.g. "doc"?
  • Home and Repository URLs are updated
  • Readme content is adjusted with an updated URL to Doxygen and hopefully fixed RST rendition (currently it has a line-break)
  • Platforms is a setuptools-specific metadata item, and is not used by pip, so it is removed

Other changes:

  • Remove setup.cfg, which seems to not be needed, except for .flake8 configuration
  • The package version is dynamically read from breathe.__init__.__version__, so version-check is unnecessary
  • Use python3 -m build (docs) instead of directly invoking setup.py
  • "# -- coding: utf-8 --" is unnecessary, since the default encoding for Python 3 files is utf-8
  • Add "furo" to development dependency, as this seemed to be missing.

@michaeljones
Copy link
Collaborator

Thank you for the contribution. I'll try to check it out this week. Certainly looks like good work.

I've only come across pyproject.toml files when using poetry but my understanding is that they have been the standard for Python projects for a bit now?

@mwtoews
Copy link
Contributor Author

mwtoews commented Jan 16, 2023

Yes, pyproject.toml is here to stay as a configuration file for a wide range of Python projects.

mkrelease Outdated Show resolved Hide resolved
Copy link
Collaborator

@michaeljones michaeljones left a 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. I'd rather wait until the next release is out to merge this. Unless @vermeeren would like to merge this and see how it impact the release process.

I'm not sure when @vermeeren might have time to attempt a release.

Adjust the Sphinx constraint in pyproject.toml.

Conflicts:
	requirements/production.txt
	setup.py
pyproject.toml Outdated Show resolved Hide resolved
mkrelease Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
.github/workflows/unit_tests.yml Outdated Show resolved Hide resolved
.flake8 Outdated Show resolved Hide resolved
mwtoews and others added 5 commits January 18, 2024 22:27
# Conflicts:
#	.github/workflows/documentation.yml
#	.github/workflows/lint.yml
#	.github/workflows/unit_tests.yml
#	breathe/__init__.py
#	documentation/environment.yaml
#	documentation/source/conf.py
#	pyproject.toml
#	tests/warnings/source/conf.py
@AA-Turner AA-Turner merged commit e1b995e into breathe-doc:main Jul 30, 2024
18 of 38 checks passed
@mwtoews mwtoews deleted the pyproject-metadata-etc branch July 30, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants