-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving setup to pyproject.toml (#19)
* Minimal pyproject.toml * Skipping this test to move on this branch That test must be fixed, but in another branch * Moving metadata from setup.py into pyproject * Git ignoring version.py * Skipping S3 test conditionally * Extending project's URLs * Setup black for 79 char line * configuring setuptools_scm for versioning based on tags * fix: My email * Testing with python 3.10 * Testing every sunday to keep track of dependecies upgrades * cleaning setup.cfg * feat: Defining __version__ from setuptools_scm * Limit simultaneous tests to go light on NASA download * Removing version from setup() * Trying latest setuptools_scm
- Loading branch information
Showing
8 changed files
with
88 additions
and
40 deletions.
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
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 |
---|---|---|
|
@@ -7,7 +7,20 @@ | |
|
||
__author__ = """Guilherme Castelão""" | ||
__email__ = "[email protected]" | ||
__version__ = "0.0.10" | ||
|
||
from pkg_resources import get_distribution, DistributionNotFound | ||
|
||
try: | ||
__version__ = get_distribution(__name__).version | ||
except DistributionNotFound: | ||
try: | ||
from .version import version as __version__ | ||
except ImportError: | ||
raise ImportError( | ||
"Failed to find (autogenerated) version.py. " | ||
"This might be because you are installing from GitHub's tarballs, " | ||
"use the PyPI ones." | ||
) | ||
|
||
# Recent OSX requires this environment variable to run parallel processes | ||
if sys.platform == "darwin": | ||
|
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,67 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 48", | ||
"setuptools_scm[toml] >= 4", | ||
"setuptools_scm_git_archive", | ||
"milksnake", | ||
"wheel >= 0.29.0", | ||
] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
[project] | ||
name="OceanColor" | ||
dynamic = ['version'] | ||
description="Deal with NASA Ocean Color data (search and download)" | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
license = {file = "LICENSE"} | ||
keywords=["NASA", "Ocean Color", "chlorophyll", "oceanography", "matchup"] | ||
authors = [ | ||
{email = "[email protected]"}, | ||
{name = "Guilherme Castelao"} | ||
] | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
dependencies = [ | ||
"Click >= 7.1.1", | ||
"numpy >= 1.17", | ||
"h5netcdf >= 0.8", | ||
"h5py >= 2.10", | ||
"tables >= 3.6", | ||
"netCDF4 >= 1.5", | ||
"pandas >= 1.1", | ||
"pyproj >= 2.6", | ||
"requests >= 2.23", | ||
"xarray >= 0.16", | ||
] | ||
|
||
[project.optional-dependencies] | ||
parallel = ["loky >= 2.8"] | ||
s3 = [ | ||
"s3fs >= 2022.1.0", | ||
"zarr>=2.8.1" | ||
] | ||
|
||
[project.urls] | ||
homepage = "github.com/castelao/OceanColor" | ||
documentation = "oceancolor.readthedocs.io" | ||
repository = "github.com/castelao/OceanColor" | ||
|
||
[project.scripts] | ||
"OceanColor" = "OceanColor.cli:main" | ||
|
||
[tool.black] | ||
line-length = 79 | ||
|
||
[tool.setuptools_scm] | ||
write_to = "OceanColor/version.py" | ||
git_describe_command = "git describe --dirty --tags --long --match 'v*' --first-parent" |
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 |
---|---|---|
|
@@ -14,46 +14,16 @@ def requirements(): | |
with open('requirements.txt') as f: | ||
return f.read() | ||
|
||
setup_requirements = ['pytest-runner', ] | ||
|
||
test_requirements = ['pytest>=3', ] | ||
|
||
setup( | ||
author="Guilherme Castelão", | ||
author_email='[email protected]', | ||
python_requires='>=3.6', | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Natural Language :: English', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
], | ||
description="Deal with NASA Ocean Color data (search and download)", | ||
entry_points={ | ||
'console_scripts': [ | ||
'OceanColor=OceanColor.cli:main', | ||
], | ||
}, | ||
install_requires=requirements(), | ||
license="BSD license", | ||
long_description=readme + '\n\n' + history, | ||
include_package_data=True, | ||
keywords='NASA Ocean Color chlorophyll oceanography matchup', | ||
name='OceanColor', | ||
packages=find_packages(include=['OceanColor', 'OceanColor.*']), | ||
setup_requires=setup_requirements, | ||
test_suite='tests', | ||
tests_require=test_requirements, | ||
url='https://github.com/castelao/OceanColor', | ||
version="0.0.10", | ||
zip_safe=False, | ||
extras_require = { | ||
'parallel': ["loky>=2.8"], | ||
's3':['s3fs>=2022.1.0', 'zarr>=2.8.1'], | ||
} | ||
) |
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