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

MNT: migrate static metadata out of setup.cfg #145

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

neutrinoceros
Copy link
Contributor

Follow up to #144
migration from setup.cfg to pyproject.toml was mostly automated using ini2toml

@neutrinoceros
Copy link
Contributor Author

I missed that setuptools_scm was a runtime dependency in dev builds, and I need to figure out how this is supposed to translate in pyproject.toml without adding it as a mandatory runtime dep

@neutrinoceros neutrinoceros marked this pull request as ready for review April 5, 2024 09:41
Copy link
Member

@avalentino avalentino left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

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

A few small suggestions, which we might as well fix up...

pyproject.toml Outdated

[tool.pytest.ini_options]
minversion = "4.6"
testpaths = ['"erfa"', '"docs"', '"README.rst"']
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this needs the single+double quotes -- at least, astropy just has the double ones.

@@ -6,43 +6,55 @@
import os.path as pth
from warnings import warn

try:
from setuptools_scm import git, Configuration, get_version as _get_version
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused why this is needed, given that astropy has the simpler direct try/except that we had here. What other attribute is being gotten that the __getattr__ solves? Or is it just that timing now is different?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't have any recollection of it, luckilly the answer to your question is in the commit message:
RFC: refactor scm_version.py to survive pytest collection if setuptools_scm isn't installed

Copy link
Contributor

Choose a reason for hiding this comment

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

So, isn't the answer then to ensure that pytest doesn't look at this directory? Is that what astropy does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. I couldn't reproduce the problem I was trying to solve here so I just reverted the change. The PR is more self-contained as a result.

@neutrinoceros neutrinoceros force-pushed the mnt/pyproject.toml branch 2 times, most recently from 41cfa7a to 65619a0 Compare August 28, 2024 12:42
Copy link
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

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

Thanks! Let's get it in.

@mhvk mhvk merged commit a34a8f9 into liberfa:main Aug 28, 2024
24 checks passed
@neutrinoceros neutrinoceros deleted the mnt/pyproject.toml branch August 28, 2024 13:15
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.

3 participants