-
Notifications
You must be signed in to change notification settings - Fork 2
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
Port infrastructure to pyproject.toml #29
+515
−160
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e89d284
Switch to pyproject.toml
tsmbland cdb4317
Fix syntax errors
tsmbland 7568455
New requirements files
tsmbland 9f7a76a
Point to new requirements file
tsmbland c37fb33
Add dill requirement
tsmbland 9d2cf43
Add __init__.py
tsmbland af59de5
Update install instructions
tsmbland 126f390
Minor requested changes, rebuiding requirements files
tsmbland 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
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,51 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["htmlcov"] # Exclude the coverage report file from setuptools package finder | ||
|
||
[project] | ||
name = "wsimod" | ||
description = "WSIMOD is for simulating water quality and quantity" | ||
readme = "README.md" | ||
version = "0.2.0" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{ name = "Barnaby Dobson", email = "[email protected]" }, | ||
{ name = "Imperial College London RSE Team", email = "[email protected]" } | ||
] | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"PyYAML", | ||
"tqdm", | ||
"dill" | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"pytest" | ||
] | ||
|
||
demos = [ | ||
"pandas==1.5.2", | ||
"geopandas", | ||
"matplotlib", | ||
"shapely" | ||
] | ||
|
||
doc = [ | ||
"mkdocs", | ||
"mkdocstrings[python]", | ||
"mkdocs-material", | ||
"mkdocs-autorefs", | ||
"mkdocs-bibtex", | ||
"mkdocs-coverage", | ||
"mkdocs-jupyter", | ||
"mkdocs-material-extensions", | ||
"pypandoc", | ||
"wsimod[demos]" | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "-v -p no:warnings" |
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,82 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# by the following command: | ||
# | ||
# pip-compile --extra=demos --output-file=requirements-demos.txt | ||
# | ||
attrs==23.1.0 | ||
# via fiona | ||
certifi==2023.7.22 | ||
# via | ||
# fiona | ||
# pyproj | ||
click==8.1.7 | ||
# via | ||
# click-plugins | ||
# cligj | ||
# fiona | ||
click-plugins==1.1.1 | ||
# via fiona | ||
cligj==0.7.2 | ||
# via fiona | ||
colorama==0.4.6 | ||
# via | ||
# click | ||
# tqdm | ||
contourpy==1.1.1 | ||
# via matplotlib | ||
cycler==0.12.1 | ||
# via matplotlib | ||
dill==0.3.7 | ||
# via wsimod (pyproject.toml) | ||
fiona==1.9.5 | ||
# via geopandas | ||
fonttools==4.43.1 | ||
# via matplotlib | ||
geopandas==0.14.0 | ||
# via wsimod (pyproject.toml) | ||
kiwisolver==1.4.5 | ||
# via matplotlib | ||
matplotlib==3.8.1 | ||
# via wsimod (pyproject.toml) | ||
numpy==1.26.1 | ||
# via | ||
# contourpy | ||
# matplotlib | ||
# pandas | ||
# shapely | ||
packaging==23.2 | ||
# via | ||
# geopandas | ||
# matplotlib | ||
pandas==1.5.2 | ||
# via | ||
# geopandas | ||
# wsimod (pyproject.toml) | ||
pillow==10.1.0 | ||
# via matplotlib | ||
pyparsing==3.1.1 | ||
# via matplotlib | ||
pyproj==3.6.1 | ||
# via geopandas | ||
python-dateutil==2.8.2 | ||
# via | ||
# matplotlib | ||
# pandas | ||
pytz==2023.3.post1 | ||
# via pandas | ||
pyyaml==6.0.1 | ||
# via wsimod (pyproject.toml) | ||
shapely==2.0.2 | ||
# via | ||
# geopandas | ||
# wsimod (pyproject.toml) | ||
six==1.16.0 | ||
# via | ||
# fiona | ||
# python-dateutil | ||
tqdm==4.66.1 | ||
# via wsimod (pyproject.toml) | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
# setuptools |
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,24 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# by the following command: | ||
# | ||
# pip-compile --extra=dev --output-file=requirements-dev.txt | ||
# | ||
colorama==0.4.6 | ||
# via | ||
# pytest | ||
# tqdm | ||
dill==0.3.7 | ||
# via wsimod (pyproject.toml) | ||
iniconfig==2.0.0 | ||
# via pytest | ||
packaging==23.2 | ||
# via pytest | ||
pluggy==1.3.0 | ||
# via pytest | ||
pytest==7.4.3 | ||
# via wsimod (pyproject.toml) | ||
pyyaml==6.0.1 | ||
# via wsimod (pyproject.toml) | ||
tqdm==4.66.1 | ||
# via wsimod (pyproject.toml) |
Oops, something went wrong.
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 seems that when requiring to install the documentation requirements you should install both the
demo
anddoc
requirements. Seewsi/setup.py
Line 11 in 741500a
I'm not totally sure how to make this work here for a tool that is not in
pypi
(yet). Maybe try:This is OK for
pypi
hosted tools, but I'm not totally sure this will work forwsimod
yet. Maybe".[demos]"
would do the trick?If this is changed, the
requirements-doc.txt
file will need to be recreated.