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

Remove setuptools-scm-git-archive, require setuptools-scm>=7 #7253

Merged
merged 3 commits into from
Dec 1, 2022

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Nov 3, 2022

Since June 2022, setuptools_scm_git_archive is obsolete since "setuptools_scm >= 7.0.0 supports Git archives by itself".

This PR follows the migration guide to update .git_archival.txt, and establish setuptools-scm>=7 in pyproject.toml.

@keewis
Copy link
Collaborator

keewis commented Nov 3, 2022

thanks for the PR, @mwtoews! I noticed that a few hours ago (probably just after you opened this PR) the documentation of setuptools_scm was changed to recommend

describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$

instead of

describe-name: $Format:%(describe:tags=true)$

Should we also be using that? Or would that require a development version of setuptools_scm?

@mwtoews mwtoews force-pushed the rm-setuptools-scm-git-archive branch from e3881bf to 95ba6a7 Compare November 3, 2022 21:59
@mwtoews
Copy link
Contributor Author

mwtoews commented Nov 3, 2022

I've looked into this further, and what I see is that $Format:%(describe:tags=true)$ requires git 2.35.0 (January 2022) or later; see docs here. Earlier versions will just leave "%(describe:tags=true)" without substitution or error. I presume "git archive" would be running on newish GitHub actions versions of git.

As for the updated format with a numeric match, I don't think it makes any difference. Testing with git 2.38.1:

$ git log -2 --format="%(describe:tags=true,match=*[0-9]*)"
v2022.10.0-47-g2e6fab2f
v2022.10.0-46-g6179d8e8
$ git log -2 --format="%(describe:tags=true)"
v2022.10.0-47-g2e6fab2f
v2022.10.0-46-g6179d8e8

but I've amended this PR with the new change to keep it aligned with the latest docs.

@headtr1ck headtr1ck added needs discussion Automation Github bots, testing workflows, release automation labels Nov 29, 2022
@dcherian dcherian requested a review from keewis December 1, 2022 16:27
Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

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

sorry, this dropped off my radar.

Looks good to me (and a quick test with git archive demonstrates that it does work), so I suggest we merge after CI is green

@github-actions github-actions bot removed the Automation Github bots, testing workflows, release automation label Dec 1, 2022
@keewis keewis added Automation Github bots, testing workflows, release automation and removed needs discussion labels Dec 1, 2022
@dcherian dcherian enabled auto-merge (squash) December 1, 2022 18:32
@github-actions github-actions bot removed the Automation Github bots, testing workflows, release automation label Dec 1, 2022
@dcherian dcherian merged commit 88e1aea into pydata:main Dec 1, 2022
dcherian added a commit to dcherian/xarray that referenced this pull request Dec 2, 2022
* upstream/main: (39 commits)
  Support the new compression argument in netCDF4 > 1.6.0 (pydata#6981)
  Remove setuptools-scm-git-archive, require setuptools-scm>=7 (pydata#7253)
  Fix mypy failures (pydata#7343)
  Docs: add example of writing and reading groups to netcdf (pydata#7338)
  Reset file pointer to 0 when reading file stream (pydata#7304)
  Enable mypy warn unused ignores (pydata#7335)
  Optimize some copying (pydata#7209)
  Add parse_dims func (pydata#7051)
  Fix coordinate attr handling in `xr.where(..., keep_attrs=True)` (pydata#7229)
  Remove code used to support h5py<2.10.0 (pydata#7334)
  [pre-commit.ci] pre-commit autoupdate (pydata#7330)
  Fix PR number in what’s new (pydata#7331)
  Enable `origin` and `offset` arguments in `resample` (pydata#7284)
  fix doctests: supress urllib3 warning (pydata#7326)
  fix flake8 config (pydata#7321)
  implement Zarr v3 spec support (pydata#6475)
  Fix polyval overloads (pydata#7315)
  deprecate pynio backend (pydata#7301)
  mypy - Remove some ignored packages and modules (pydata#7319)
  Switch to T_DataArray in .coords (pydata#7285)
  ...
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.

4 participants