-
Notifications
You must be signed in to change notification settings - Fork 31
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
Replace setup.py with pyproject.toml #420
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9879fe0
Replace setup.py with pyproject.toml
alifbe 94de58a
Update integration test
alifbe 4c3fdfb
Fixes based on feedbacks
alifbe 53361b2
Always run test and syntax check documentation
alifbe cfd2f2d
Add docs installation before testing
alifbe 9b413e9
Install only necessary for test during ci
alifbe 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[flake8] | ||
exclude = docs, pyscal/__init__.py, pyscal/version.py | ||
max-line-length = 88 | ||
ignore = E741, W503, E203 | ||
# E203: "whitespace before ':'", added due to conflict with black |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
install_test_dependencies () { | ||
pip install -r test_requirements.txt | ||
pip install ".[tests]" | ||
} | ||
|
||
start_tests () { | ||
|
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,113 @@ | ||
[build-system] | ||
|
||
requires = [ | ||
"setuptools>=45.0", | ||
"setuptools_scm[toml]>=6.2", | ||
] | ||
|
||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
packages = ["pyscal"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "pyscal/version.py" | ||
|
||
[project] | ||
name = "pyscal" | ||
description = "Generate relative permeability include files for Eclipse reservoir simulator" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = { file = "LICENSE" } | ||
authors = [ | ||
{ name = "Håvard Berland", email = "[email protected]" }, | ||
] | ||
keywords = ["relative permeability", "capillary pressure", "reservoir simulation"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Science/Research/Developers", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Utilities", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Natural Language :: English", | ||
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", | ||
] | ||
dynamic = ["version"] | ||
|
||
dependencies = [ | ||
"matplotlib", | ||
"numpy<2", | ||
"openpyxl", | ||
"pandas", | ||
"scipy", | ||
"urllib3<2", | ||
"xlrd", | ||
] | ||
|
||
[project.optional-dependencies] | ||
tests = [ | ||
"black", | ||
"flake8", | ||
"hypothesis", | ||
"isort", | ||
"mypy", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-mock", | ||
"pytest-xdist", | ||
"rstcheck", | ||
] | ||
|
||
docs = [ | ||
"autoapi", | ||
"sphinx<7", | ||
"sphinx-argparse", | ||
"sphinx-autodoc-typehints", | ||
"sphinx_rtd_theme", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/equinor/pyscal" | ||
Documentation = "https://equinor.github.io/pyscal/" | ||
Repository = "https://github.com/equinor/pyscal" | ||
|
||
[project.scripts] | ||
pyscal = "pyscal.pyscalcli:main" | ||
|
||
[tool.black] | ||
line-length = 88 | ||
|
||
[tool.isort] | ||
profile = "black" | ||
skip = "pyscal/__init__.py" | ||
|
||
[[tool.mypy.overrides]] | ||
module = ["numpy.*", "pyscal.version", "pandas.*", "matplotlib.*", "scipy.*", "xlrd.*", "openpyxl.*" | ||
] | ||
ignore_missing_imports = true | ||
|
||
[tool.pylint] | ||
# Module docstrings are not required, there are other means of documenting at | ||
# that level in subscript | ||
disable = "missing-module-docstring" | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = [ | ||
".git", | ||
] | ||
xfail_strict = "True" | ||
|
||
addopts = "-ra --strict-markers --ignore=docs/conf.py --ignore=.eggs" | ||
|
||
markers = [ | ||
"integration: marks a test as an integration test", | ||
"plot: marks a test as interactive, plots will flash to the screen", | ||
"slow: a test that is expected to take up to a second or so to execute", | ||
] | ||
|
||
[tool.rstcheck] | ||
ignore_directives = ["argparse", "automodule"] |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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.
Is this needed because this repository isn't
src/
based?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.
yes. I was tempted to move
pyscal
folder insidesrc
But decided to use this instead. Any other benefit of usingsrc/
based?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.
src/
is preferred I guess because it very clearly indicates where to click if you want to look at the source code. One of those conventions that is pretty standard around many languages; in my opinion it is the better option. I think some tools (setuptools in particular, in this case) look for it first.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. I'll adopt this on next PR 👍