Skip to content

Commit

Permalink
update pyproject.toml to use setuptools (#51)
Browse files Browse the repository at this point in the history
* update `pyproject.toml` to use `setuptools`

* reorder dependencies alphabetically
  • Loading branch information
zacharyburnett authored Jul 13, 2022
1 parent ce424f0 commit babfdc3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
with:
path: ${{ env.pythonLocation }}
key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'setup.*') }}
- run: pip install ".[testing]" pytest-xdist
- run: pip install ".[test]" pytest-xdist
- run: pytest -n auto
test_with_coverage:
needs: [ style, test ]
Expand All @@ -68,7 +68,7 @@ jobs:
with:
path: ${{ env.pythonLocation }}
key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'setup.*') }}
- run: pip install ".[testing]" pytest-cov pytest-xdist
- run: pip install ".[test]" pytest-cov pytest-xdist
- run: pytest -n auto --cov . --cov-report xml:coverage.xml
- run: coverage report -m
- uses: codecov/codecov-action@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ jobs:
with:
path: ${{ env.pythonLocation }}
key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'setup.*') }}
- run: pip install ".[testing]" pytest-xdist
- run: pip install ".[test]" pytest-xdist
- run: pytest -n auto
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
default_language_version:
python: "python3"
fail_fast: true
ci:
skip: [ "poetry-lock", "prospector", "mypy" ]

repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ python:
- method: pip
path: .
extra_requirements:
- documentation
- docs
78 changes: 32 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,51 +1,37 @@
[tool.poetry]
name = 'stormevents'
version = '0.0.0'
description = 'Python interfaces for observational data surrounding named storm events'
authors = ['Zach Burnett <[email protected]>']
license = 'GPL-3.0-or-later'
readme = 'README.md'
[project]
name = "stormevents"
description = "Python interfaces for observational data surrounding named storm events"
authors = [{ name = "Zach Burnett", email = "[email protected]" }]
readme = "README.md"
requires-python = ">=3.6"
license = { file = "LICENSE" }
dependencies = [
"beautifulsoup4",
"geopandas",
"netcdf4",
"numpy",
"python-dateutil",
"pandas",
"pyproj >=2.6",
"requests",
"searvey >=0.2.0,<1.0",
"shapely >=1.8",
"typepigeon >=1.0.5",
"xarray",
]
dynamic = ["version"]

[project.optional-dependencies]
test = ['pytest', 'pytest-cov', 'pytest-socket', 'pytest-xdist']
style = ['black', 'reorder-python-imports']
docs = ['m2r2', 'sphinx', 'sphinx-rtd-theme', 'toml']

[project.urls]
repository = 'https://github.com/oceanmodeling/StormEvents.git'
documentation = 'https://stormevents.readthedocs.io'

[build-system]
requires = [
'poetry-core>=1.0.0',
'poetry-dynamic-versioning',
]
build-backend = 'poetry.core.masonry.api'

[tool.poetry-dynamic-versioning]
enable = true

[tool.poetry.dependencies]
python = '^3.9'
beautifulsoup4 = '*'
geopandas = '*'
netcdf4 = '*'
numpy = '*'
python-dateutil = '*'
pandas = '*'
pyproj = '>=2.6'
requests = '*'
searvey = '^0.2.0'
shapely = '>=1.8'
typepigeon = '>=1.0.5'
xarray = '*'
isort = { version = '*', optional = true }
black = { version = '*', optional = true }
pytest = { version = '*', optional = true }
pytest-cov = { version = '*', optional = true }
pytest-socket = { version = '*', optional = true }
pytest-xdist = { version = '*', optional = true }
dunamai = { version = '*', optional = true }
m2r2 = { version = '*', optional = true }
sphinx = { version = '*', optional = true }
sphinx-rtd-theme = { version = '*', optional = true }
toml = { version = '*', optional = true }
requires = ["setuptools", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"

[tool.poetry.extras]
linting = ["mypy", "prospector"]
testing = ['pytest', 'pytest-cov', 'pytest-socket', 'pytest-xdist']
development = ['isort', 'black']
documentation = ['dunamai', 'm2r2', 'sphinx', 'sphinx-rtd-theme', 'toml']
[tool.setuptools_scm]

0 comments on commit babfdc3

Please sign in to comment.