-
Notifications
You must be signed in to change notification settings - Fork 27
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
Specify build backend and project metadata in pyproject.toml #100
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c3f18ea
Specify build backend and project metadata in pyproject.toml
maxrjones e034cd3
Merge branch 'main' into project-metadata
maxrjones 8827afe
Update test workflow
maxrjones a01404f
Update dev test workflow
maxrjones ea1d3eb
Apply suggestions from code review
maxrjones 7bcb909
Add known_third_party isort config
maxrjones 7b3ac0e
Merge branch 'main' into project-metadata
maxrjones 57d1280
Retain license info from setup.py in pyproject.toml
maxrjones fa4a38f
Correct metadata format
maxrjones 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 |
---|---|---|
|
@@ -29,12 +29,11 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- run: | | ||
python -m pip install -r dev-requirements.txt | ||
python -m pip install --no-deps -e . | ||
python -m pip install -e .[dev] | ||
python -m pip list | ||
- name: Running Tests | ||
run: | | ||
py.test --verbose --cov=. --cov-report=xml | ||
pytest --verbose --cov=. --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
if: ${{ matrix.python-version }} == 3.9 | ||
|
@@ -62,11 +61,10 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- run: | | ||
python -m pip install -r dev-requirements.txt | ||
python -m pip install -e .[dev] | ||
python -m pip install --no-deps --upgrade \ | ||
git+https://github.com/dask/dask \ | ||
git+https://github.com/pydata/xarray | ||
python -m pip install --no-deps -e . | ||
python -m pip list | ||
- name: Running Tests | ||
run: | | ||
|
This file was deleted.
Oops, something went wrong.
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,65 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=61", | ||
"setuptools-scm" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = 'xbatcher' | ||
description = 'Batch generation from Xarray objects' | ||
license = {text = "Apache"} | ||
authors = [{name = "xbatcher Developers", email = "[email protected]"}] | ||
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.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Topic :: Scientific/Engineering', | ||
] | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"dask", | ||
"numpy", | ||
"xarray", | ||
] | ||
[project.optional-dependencies] | ||
torch = [ | ||
"torch", | ||
] | ||
tensorflow = [ | ||
"tensorflow", | ||
] | ||
dev = [ | ||
"adlfs", | ||
"asv", | ||
"coverage", | ||
"pytest", | ||
"pytest-cov", | ||
"tensorflow", | ||
"torch", | ||
] | ||
[project.urls] | ||
documentation = "https://xbatcher.readthedocs.io/en/latest/" | ||
repository = "https://github.com/xarray-contrib/xbatcher" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["xbatcher*"] | ||
|
||
[tool.setuptools_scm] | ||
version_scheme = 'post-release' | ||
local_scheme = 'dirty-tag' | ||
fallback_version = "999" | ||
|
||
[tool.isort] | ||
profile = 'black' | ||
known_third_party = ["numpy", "pytest", "setuptools", "sphinx_autosummary_accessors", "tensorflow", "torch", "xarray"] | ||
|
||
[tool.pytest.ini_options] | ||
log_cli = true | ||
log_level = "INFO" |
This file was deleted.
Oops, something went wrong.
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,57 +1,4 @@ | ||
#!/usr/bin/env python | ||
# type: ignore | ||
import os | ||
from setuptools import setup | ||
|
||
from setuptools import find_packages, setup | ||
|
||
DISTNAME = "xbatcher" | ||
LICENSE = "Apache" | ||
AUTHOR = "xbatcher Developers" | ||
AUTHOR_EMAIL = "[email protected]" | ||
URL = "https://github.com/xarray-contrib/xbatcher" | ||
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.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
|
||
DESCRIPTION = "Batch generation from xarray dataset" | ||
|
||
with open("requirements.txt") as f: | ||
install_requires = f.read().strip().split("\n") | ||
|
||
with open("dev-requirements.txt") as f: | ||
test_requires = f.read().strip().split("\n") | ||
|
||
if os.path.exists("README.rst"): | ||
with open("README.rst") as f: | ||
long_description = f.read() | ||
else: | ||
long_description = "" | ||
|
||
|
||
setup( | ||
name=DISTNAME, | ||
license=LICENSE, | ||
author=AUTHOR, | ||
author_email=AUTHOR_EMAIL, | ||
classifiers=CLASSIFIERS, | ||
description=DESCRIPTION, | ||
long_description=long_description, | ||
python_requires=">=3.8", | ||
install_requires=install_requires, | ||
url=URL, | ||
packages=find_packages(), | ||
use_scm_version={ | ||
"version_scheme": "post-release", | ||
"local_scheme": "dirty-tag", | ||
}, | ||
setup_requires=["setuptools_scm", "setuptools>=30.3.0"], | ||
) | ||
setup(use_scm_version={"fallback_version": "999"}) |
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
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.
Just a note that this might need to change if/when a 'Publish to PyPI' GitHub Actions is created, but ok as is for now.
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.
Good point, thanks!