Skip to content

Commit

Permalink
Replace setup.py with pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
alifbe committed Nov 17, 2023
1 parent c8c385b commit 9879fe0
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 168 deletions.
5 changes: 5 additions & 0 deletions .flake8
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
2 changes: 1 addition & 1 deletion .github/workflows/pyscal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Lint with black
if: ${{ always() }}
run: |
black --check --force-exclude="pyscal/version.py" pyscal/*py tests/test_*py setup.py docs/conf.py
black --check --force-exclude="pyscal/version.py" pyscal/*py tests/test_*py docs/conf.py
- name: Lint with flake8
if: ${{ always() }}
Expand Down
34 changes: 0 additions & 34 deletions .pre-commit-config.yaml

This file was deleted.

1 change: 0 additions & 1 deletion bandit.yml

This file was deleted.

23 changes: 0 additions & 23 deletions mypy.ini

This file was deleted.

117 changes: 117 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
[build-system]

requires = [
"setuptools>=45.0",
"setuptools_scm[toml]>=6.2",
"wheel>=0.38.1",
]

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 = [
"autoapi",
"black",
"flake8",
"hypothesis",
"isort",
"mypy",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-mock",
"rstcheck",
"sphinx<7",
"sphinx-argparse",
"sphinx-autodoc-typehints",
"sphinx_rtd_theme",
]

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]
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=setup.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"]
29 changes: 0 additions & 29 deletions setup.cfg

This file was deleted.

65 changes: 0 additions & 65 deletions setup.py

This file was deleted.

15 changes: 0 additions & 15 deletions test_requirements.txt

This file was deleted.

0 comments on commit 9879fe0

Please sign in to comment.