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

Publish nightly releases to TestPyPI #6659

Closed
dcherian opened this issue Jun 2, 2022 · 6 comments · Fixed by #6660, #6669 or #6671
Closed

Publish nightly releases to TestPyPI #6659

dcherian opened this issue Jun 2, 2022 · 6 comments · Fixed by #6660, #6669 or #6671
Labels
Automation Github bots, testing workflows, release automation

Comments

@dcherian
Copy link
Contributor

dcherian commented Jun 2, 2022

Is your feature request related to a problem?

From @keewis in #6645

if anyone can figure out how to create PEP440 (and thus PyPI) compatible development versions I think we can have a CI publish every commit on main to TestPyPI.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@dcherian dcherian added enhancement Automation Github bots, testing workflows, release automation and removed enhancement labels Jun 2, 2022
@kmuehlbauer
Copy link
Contributor

It's more a workaround. Maybe it's suitable for xarray.

In a project I maintain I'm doing the following before creation of tarball and wheels when uploading to TestPyPI.

# remove local appendix (+gXXXXXXXX)
$ echo 'local_scheme =  "no-local-version"' >> pyproject.toml
# prevent dirty-flag
$ git update-index --assume-unchanged pyproject.toml

@keewis
Copy link
Collaborator

keewis commented Jun 3, 2022

ooh, that looks great!

To make updating pyproject.toml less of a hack (the setuptools_scm section might not be the last section in the future) we can probably read the file with tomli, add that setting and write it back using tomli_w.

@kmuehlbauer
Copy link
Contributor

To make updating pyproject.toml less of a hack (the setuptools_scm section might not be the last section in the future) we can probably read the file with tomli, add that setting and write it back using tomli_w.

That's for sure more reliable. Didn't think about that in the first place.

@keewis
Copy link
Collaborator

keewis commented Jun 6, 2022

apparently, local_scheme = "no-local-scheme" is broken when using setuptools>=60. I'll pin setuptools<60 in CI, hopefully that helps

@kmuehlbauer
Copy link
Contributor

@keewis git restore -SW . will remove the changes to pyproject.toml.

@keewis
Copy link
Collaborator

keewis commented Jun 7, 2022

it finally works: https://test.pypi.org/project/xarray/#history

Thanks a lot for the help, @kmuehlbauer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation Github bots, testing workflows, release automation
Projects
None yet
3 participants