-
Notifications
You must be signed in to change notification settings - Fork 46
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
Switching from versioneer to setuptools-scm #165
Merged
Merged
Changes from 49 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
b0b98e2
Switching from versioneer to setuptools-scm
0cfef98
black strikes
9d1910a
ignore pyproject.toml in build
6f55eb2
removing versioneer
2045001
removing versioneer legacy code and files
695534a
version
427fd90
remove versioneer from MANIFEST
c0f5e52
manif
b2d2d86
remove legacy setuptools code
b7226a4
install setuptools-scm in ci
2dd3c41
add build-system to .cfg?
f1a2561
black!
c405e7c
some more edits
5b3e3aa
black
765f05d
exclude _version.py from black
a7a6494
pyproject
2559b91
remove build-require from .cfg
a192a27
major refactoring of setup
094feef
include version.py
6355a6d
remove flake8
3643b65
version
00be70e
src to xrft
3de7f91
brute force
50fe4e7
revert
5d65e02
update version with setuptools_scm
1bbb18a
black (sigh)
52dd70b
version
b192bed
desperation
7ffdf39
black reformatting
53c53f8
testing things
807f0c9
forgot to push updated __init__
374f425
poetry?
759c443
copy pasting from pangeo-forge
8a959f6
pkg_resources
2b4aaef
no commenting out
f3f5ff2
precommit
1b5dde7
revert to only black in precommit
43e79c1
version in .cfg
64fb2d0
try .version
8c432bc
release.yml
c0a17b5
release
586bb95
pre-commit
e51a04f
remove env
62e56fb
comment out import
da68441
comment out import
9011da5
setuptools in ci
811396e
setuptools as requirement
468d5f8
no changes to secrets
8782f7b
edits based on review
ed6df4c
turning on for all PRs
ef3abbc
syntax error in release
a630380
try to fix release.yaml
rabernat 0c144f4
make release run on PRs
rabernat 4847118
change name of release workflow
rabernat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/action@v2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,7 @@ target/ | |
|
||
# notebook | ||
*/.ipynb_checkpoints/* | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
|
||
repos: | ||
- repo: https://github.com/python/black | ||
|
||
- repo: https://github.com/python/black | ||
rev: 21.6b0 | ||
hooks: | ||
- id: black | ||
- id: black | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include versioneer.py | ||
include LICENSE | ||
include xrft/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# pyproject.toml | ||
[build-system] | ||
requires = [ | ||
"setuptools>=45", | ||
"setuptools_scm[toml]>=6.0", | ||
"setuptools_scm_git_archive", | ||
"wheel" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "xrft/_version.py" | ||
write_to_template = "__version__ = '{version}'" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,6 @@ | ||
import os | ||
import versioneer | ||
from setuptools import setup, find_packages | ||
#!/usr/bin/env python | ||
|
||
PACKAGES = find_packages() | ||
import setuptools | ||
|
||
DISTNAME = "xrft" | ||
LICENSE = "MIT" | ||
AUTHOR = "xrft Developers" | ||
AUTHOR_EMAIL = "takaya@ldeo.columbia.edu" | ||
URL = "https://github.com/xgcm/xrft" | ||
CLASSIFIERS = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
|
||
INSTALL_REQUIRES = ["xarray", "dask", "numpy", "pandas", "scipy"] | ||
EXTRAS_REQUIRE = ["cftime", "numpy_groupies"] | ||
SETUP_REQUIRES = ["pytest-runner"] | ||
TESTS_REQUIRE = ["pytest >= 2.8", "coverage"] | ||
|
||
DESCRIPTION = "Discrete Fourier Transform with xarray" | ||
|
||
|
||
def readme(): | ||
with open("README.rst") as f: | ||
return f.read() | ||
|
||
|
||
setup( | ||
name=DISTNAME, | ||
version=versioneer.get_version(), | ||
cmdclass=versioneer.get_cmdclass(), | ||
license=LICENSE, | ||
author=AUTHOR, | ||
author_email=AUTHOR_EMAIL, | ||
classifiers=CLASSIFIERS, | ||
description=DESCRIPTION, | ||
long_description=readme(), | ||
install_requires=INSTALL_REQUIRES, | ||
setup_requires=SETUP_REQUIRES, | ||
tests_require=TESTS_REQUIRE, | ||
url=URL, | ||
packages=find_packages(), | ||
) | ||
if __name__ == "__main__": | ||
setuptools.setup() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter if you add this in the pre-commit workflow. It needs to be added in the workflow where you care about the version number. What you do in this workflow won't affect the other workflows.