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 build configuration into pyproject.toml #95

Merged

Conversation

zacharyburnett
Copy link
Collaborator

@zacharyburnett zacharyburnett commented May 23, 2022

setuptools now supports the [project] table, which is defined by PEP621.

Additionally, setuptools now supports its own entry in pyproject.toml called [tool.setuptools] (pypa/setuptools#1688, https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration); however, it comes with the following disclaimer:

Support for declaring configurations not standardized by PEP 621 (i.e. the [tool.setuptools] table), is still in beta stage and might change in future releases.

Given this, we can attempt to consolidate the build configuration into a single pyproject.toml file that can possibly be read by other build systems in the future.

@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Base: 70.45% // Head: 70.45% // No change to project coverage 👍

Coverage data is based on head (e940da5) compared to base (33aa4f4).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #95   +/-   ##
=======================================
  Coverage   70.45%   70.45%           
=======================================
  Files          15       15           
  Lines        2623     2623           
=======================================
  Hits         1848     1848           
  Misses        775      775           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zacharyburnett zacharyburnett marked this pull request as ready for review May 31, 2022 13:14
@zacharyburnett zacharyburnett self-assigned this Jun 7, 2022
@zacharyburnett zacharyburnett force-pushed the consolidate_build_config branch 2 times, most recently from 0333f5e to 7f3fd3d Compare June 8, 2022 13:16
@zacharyburnett zacharyburnett marked this pull request as draft June 23, 2022 14:06
@github-actions github-actions bot added automation documentation Improvements or additions to documentation installation testing labels Jul 29, 2022
@zacharyburnett zacharyburnett force-pushed the consolidate_build_config branch 3 times, most recently from ee9aad0 to 9424843 Compare August 17, 2022 15:11
@zacharyburnett zacharyburnett force-pushed the consolidate_build_config branch 2 times, most recently from 2755179 to 8969eae Compare September 20, 2022 14:04
@zacharyburnett zacharyburnett force-pushed the consolidate_build_config branch 2 times, most recently from 205e030 to 1da1e91 Compare October 24, 2022 17:58
@zacharyburnett zacharyburnett marked this pull request as ready for review November 21, 2022 17:08
@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Nov 21, 2022

Now that Python 3.11 includes tomli in built-ins, and given that stcal doesn't build C extensions, I am comfortable with readying this for review. flake8 requires its own file, but if we ever move to a different linter in the future (e.g. ruff) we will likely be able to use pyproject.toml for its configuration

@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Nov 21, 2022

If setuptools changes their interface with pyproject.toml it would involve updating the [tool.setuptools] table, i.e. changing the following values:

 [tool.setuptools]
 zip-safe = true

 [tool.setuptools.packages.find]
 where = ['src']

The [project] table would remain unchanged as it is defined by PEP621.

Copy link
Collaborator

@nden nden left a comment

Choose a reason for hiding this comment

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

LGTM

@zacharyburnett zacharyburnett merged commit acfd88e into spacetelescope:main Nov 22, 2022
@zacharyburnett zacharyburnett deleted the consolidate_build_config branch November 22, 2022 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation documentation Improvements or additions to documentation installation testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants