Skip to content

Commit

Permalink
Convert to pure pyproject.toml setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes committed Oct 24, 2023
1 parent 4887ca8 commit 87f9725
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 255 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 88
ignore = W503, E203
exclude = docs/conf.py, .eggs, version.py
6 changes: 3 additions & 3 deletions .github/workflows/fmudataio-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: pip install --upgrade setuptools wheel twine
- name: Install pypa/build
run: python -m pip install build twine
- name: Build package
run: python setup.py sdist bdist_wheel
run: python -m build . --sdist --wheel --outdir dist/
- name: Upload deploy
env:
TWINE_USERNAME: __token__
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[MASTER]
ignore=version.py, setup.py, conf.py
ignore=version.py, conf.py

[BASIC]
good-names=logger, version, i, j, k, x, y, z, _
Expand Down
103 changes: 101 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,83 @@
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
[build-system]
requires = ["pip>=19.1.1", "setuptools", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "fmu-dataio"
description = "Facilitate data io in FMU with rich metadata"
readme = "README.md"
requires-python = ">=3.8"
license = { text = "Apache 2.0" }
authors = [
{ name = "Equinor", email = "[email protected]" },
]
keywords = ["fmu", "sumo"]

classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
]
dynamic = ["version"]
dependencies = [
"xtgeo>=2.16",
"PyYAML",
"pyarrow",
"fmu-config>=1.1.0",
"pandas",
"numpy"
]

[project.urls]
Homepage = "https://github.com/equinor/fmu-dataio"
Repository = "https://github.com/equinor/fmu-dataio"
Issues = "https://github.com/equinor/fmu-dataio/issues"
Documentation = "https://xtgeo.readthedocs.io"

[project.optional-dependencies]
dev = [
"black",
"coverage>=4.1",
"flake8",
"isort",
"hypothesis",
"mypy",
"pylint",
"pytest",
"pytest-cov",
"pydocstyle",
"pytest-runner",
"pytest-mock",
"termcolor",
"rstcheck",
]
docs = [
"pydocstyle",
"Sphinx<7",
"autoapi",
"sphinx-rtd-theme",
"sphinx-autodoc-typehints<1.23",
"sphinxcontrib-apidoc",
"sphinx-togglebutton",
"urllib3<1.27",
]

[project.entry-points.ert]
dataio_case_metadata = "fmu.dataio.scripts.create_case_metadata"


[tool.black]
line-length = 88
target-version = ['py38', 'py39', 'py310', 'py311']
Expand All @@ -25,5 +104,25 @@ exclude = '''
[tool.isort]
profile = "black"

[build-system]
requires = ["pip>=19.1.1", "setuptools>=28", "setuptools_scm>=3.2.0", "pyarrow"]

[tool.setuptools_scm]
write_to = "src/fmu/dataio/version.py"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--verbose"
log_cli = "False"
log_cli_format = "%(levelname)8s (%(relativeCreated)6.0fms) %(filename)44s [%(funcName)40s()] %(lineno)4d >> %(message)s"
log_cli_level = "INFO"
testpaths = "tests"
markers = [
"integration: marks a test as an integration test",
]
xfail_strict = true

[tool.mypy]
ignore_missing_imports = true

[tool.pydocstyle]
convention = "google"
match = '(?!(test_|_)).*\.py'
16 changes: 8 additions & 8 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pytest tests/test_grid3d/test_grid.py::test_roffbin_import_v2_emerald -o log_cli=true -s

[pytest]
minversion = 6.0
addopts = --verbose
log_cli = False
log_cli_format = %(levelname)8s (%(relativeCreated)6.0fms) %(name)37s [%(funcName)42s()] %(lineno)4d >> %(message)s
log_cli_level = INFO
testpaths =
tests
# [pytest]
# minversion = 6.0
# addopts = --verbose
# log_cli = False
# log_cli_format = %(levelname)8s (%(relativeCreated)6.0fms) %(name)37s [%(funcName)42s()] %(lineno)4d >> %(message)s
# log_cli_level = INFO
# testpaths =
# tests
6 changes: 0 additions & 6 deletions requirements/requirements.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements/requirements_docs.txt

This file was deleted.

8 changes: 0 additions & 8 deletions requirements/requirements_setup.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements/requirements_test.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements/requirements_testx.txt

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/README.txt

This file was deleted.

97 changes: 0 additions & 97 deletions scripts/setup_functions.py

This file was deleted.

41 changes: 0 additions & 41 deletions setup.cfg

This file was deleted.

Loading

0 comments on commit 87f9725

Please sign in to comment.