Skip to content

Commit 776c597

Browse files
committed
move to pyproject.toml
1 parent 1ca1ffd commit 776c597

File tree

8 files changed

+95
-67
lines changed

8 files changed

+95
-67
lines changed

.github/workflows/ci.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,7 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
if [ -f requirements.ci.txt ]; then pip install -r requirements.ci.txt; fi
30-
pip install pytest
31-
pip install pytest-benchmark
32-
pip install codecov
33-
pip install pytest-cov
34-
pip install codacy-coverage
35-
pip install -e .
29+
pip install -e .[ci]
3630
3731

3832
- name: ruff-lint

.readthedocs.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# Required
66
version: 2
77

8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.9"
13+
814
# Build documentation in the docs/ directory with Sphinx
915
sphinx:
1016
configuration: docs/conf.py
@@ -14,9 +20,8 @@ formats: all
1420

1521
# Optionally set the version of Python and requirements required to build your docs
1622
python:
17-
version: 3.7
1823
install:
19-
- requirements: docs/requirements.txt
20-
21-
build:
22-
image: latest
24+
- method: pip
25+
path: .
26+
extra_requirements:
27+
- docs

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
# The short X.Y version.
6565
version = "0.1"
6666
# The full version, including alpha/beta/rc tags.
67-
release = "0.1.0"
67+
release = "0.1.2"
6868

6969
# The language for content autogenerated by Sphinx. Refer to documentation
7070
# for a list of supported languages.

docs/requirements.txt

-1
This file was deleted.

pyproject.toml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
[build-system]
2+
# Minimum requirements for the build system to execute
3+
requires = ["setuptools>64"]
4+
build-backend = "setuptools.build_meta"
5+
6+
[project]
7+
name = "waterbalans"
8+
dynamic = ["version"]
9+
description = "Python Package voor het maken van waterbalansen"
10+
license = { file = "LICENSE" }
11+
readme = "README.rst"
12+
authors = [{ name = "D.A. Brakenhoff" }]
13+
maintainers = [{ name = "D.A. Brakenhoff", email = "[email protected]" }]
14+
requires-python = ">= 3.9"
15+
dependencies = ["numpy", "scipy", "matplotlib", "pandas"]
16+
17+
keywords = ["hydrology", "groundwater", "time series", "analysis", "database"]
18+
classifiers = [
19+
"Development Status :: 4 - Beta",
20+
"Intended Audience :: Science/Research",
21+
"Intended Audience :: Other Audience",
22+
"License :: OSI Approved :: MIT License",
23+
"Operating System :: Microsoft :: Windows",
24+
"Operating System :: POSIX",
25+
"Operating System :: Unix",
26+
"Operating System :: MacOS",
27+
"Programming Language :: Python",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3 :: Only",
33+
"Topic :: Scientific/Engineering :: Hydrology",
34+
]
35+
36+
[project.urls]
37+
homepage = "https://github.com/ArtesiaWater/waterbalans"
38+
repository = "https://github.com/ArtesiaWater/waterbalans"
39+
documentation = "https://waterbalans.readthedocs.io/en/latest/"
40+
41+
[project.optional-dependencies]
42+
all = ["waterbalans[fews]", "numba", "dateparser"]
43+
fews = ["hkvfewspy==0.6.2"]
44+
ci = [
45+
"waterbalans[all]",
46+
"pytest",
47+
"pytest-benchmark",
48+
"codecov",
49+
"pytest-cov",
50+
"codacy-coverage",
51+
]
52+
docs = ["sphinx_rtd_theme"]
53+
54+
[tool.setuptools.packages]
55+
find = {}
56+
57+
[tool.setuptools.dynamic]
58+
version = { attr = "waterbalans.version.__version__" }
59+
60+
[tool.ruff]
61+
line-length = 88
62+
extend-include = ["*.ipynb"]
63+
64+
[tool.ruff.lint]
65+
# See: https://docs.astral.sh/ruff/rules/
66+
select = [
67+
"C4", # flake8-comprehensions
68+
"E", # pycodestyle
69+
"F", # pyflakes
70+
"I", # isort
71+
"PT", # pytest-style
72+
"D", # pydocstyle
73+
"B", # flake8-bugbear
74+
"NPY", # numpy
75+
]
76+
77+
[tool.ruff.format]
78+
79+
[tool.ruff.lint.pydocstyle]
80+
convention = "numpy"
81+
82+
[tool.pytest.ini_options]
83+
addopts = "--durations=0 --cov-report xml:coverage.xml --cov waterbalans -v"

pytest.ini

-2
This file was deleted.

requirements.ci.txt

-6
This file was deleted.

setup.py

-45
This file was deleted.

0 commit comments

Comments
 (0)