Skip to content

Commit

Permalink
remove the dependancy on setup.cfg and setup.py (#177)
Browse files Browse the repository at this point in the history
* removed flake8

* removed metadata

* added dynamics

* removed options

* moved pytest options

* removed coverage mentions

* removed coverage mentions

* simplified tephi pytest

* muted error handling

* readded cov mentions

* added review review ignore

* removed package options section

* added scm (stackoverflow suggestion)

* deleted setup.cfg

* deleted manifest

* deleted setup.py (manifest is fine, typo)

* isolated build again...

* removed iso-build, readded setup.py

* rejigged order of pyproject.toml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added @bjlittle suggestions from prev pr

* up to date with #173

* added testing matrix

* corrected tox call

* added space to pyproj.toml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ESadek-MO and pre-commit-ci[bot] authored Dec 2, 2024
1 parent 0e3e8ad commit 94d2aed
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 146 deletions.
28 changes: 0 additions & 28 deletions .flake8

This file was deleted.

19 changes: 16 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@ concurrency:
cancel-in-progress: true

jobs:
build:
tests:
name: "${{ matrix.session }} (${{ matrix.version }})"

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
version: [ "py38", "py39", "py310", "py311"]
session: [ "test" ]
include:
- version: "py311"
coverage: "--cov-report= --cov=tephi"

steps:
- uses: actions/checkout@v3
Expand All @@ -27,4 +38,6 @@ jobs:
.tox
- name: Run tox
run: pipx run 'tox<4'
run: |
pip install 'tox<4'
tox -e ${{ matrix.version }}-${{ matrix.session }}
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ recursive-include docs *.png
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile
recursive-include tephi *.json
recursive-include tephi *.npz
recursive-include tephi *.txt
111 changes: 70 additions & 41 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# See https://github.com/SciTools/.github/wiki/Linting
# for SciTools linting guidelines

[tool.black]
line-length = 79
target-version = ["py37", "py38", "py39", "py310"]
include = '\.pyi?$'
[build-system]
# Defined by PEP 518
requires = ["setuptools>=60"]
# Defined by PEP 517
build-backend = "setuptools.build_meta"

[project]
authors = [
Expand All @@ -26,8 +27,6 @@ classifiers = [
]
description = "Tephigram plotting in Python"
dynamic = [
"dependencies",
"optional-dependencies",
"readme",
"version",
]
Expand All @@ -40,53 +39,26 @@ keywords = [
license = {text = "BSD-3-Clause"}
name = "tephi"
requires-python = ">=3.8"
dependencies = ["matplotlib", "numpy", "scipy"]

[project.urls]
Code = "https://github.com/SciTools/tephi"
Issues = "issues = https://github.com/SciTools/tephi/issues"
Issues = "https://github.com/SciTools/tephi/issues"
Binder= "https://mybinder.org/v2/gh/SciTools/tephi/main?filepath=index.ipynb"
Docs = "https://tephi.readthedocs.io/en/latest/"

[build-system]
# Defined by PEP 518
requires = ["setuptools>=45"]
# Defined by PEP 517
build-backend = "setuptools.build_meta"

[tool.repo-review]
# These are a list of the currently failing tests:
ignore = [
# https://learn.scientific-python.org/development/guides/style/#PC180
"PC180", # Uses prettier

# https://learn.scientific-python.org/development/guides/packaging-simple/#PY005
"PY005", # Has tests folder

# TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):

# https://learn.scientific-python.org/development/guides/pytest/#PP301
"PP301", # Has pytest in pyproject

# https://learn.scientific-python.org/development/guides/gha-basic/#GH212
"GH212", # Require GHA update grouping

# https://learn.scientific-python.org/development/guides/style/#PC170
"PC170", # Uses PyGrep hooks (only needed if rST present)

# https://learn.scientific-python.org/development/guides/style/#PC901
"PC901", # Custom pre-commit CI message
]

[tool.black]
line-length = 79
target-version = ["py38", "py39", "py310", "py311"]
include = '\.pyi?$'

[tool.mypy]
strict = false
ignore_missing_imports = true
warn_unused_configs = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
exclude = [

]
exclude = []

[tool.numpydoc_validation]
checks = [
Expand Down Expand Up @@ -126,6 +98,50 @@ exclude = [
'\.__repr__$',
]

[tool.pytest.ini_options]
minversion = "6.0"
markers = ["graphical: mark a test as a graphical test"]
addopts = ["-ra",
"-v",
"--cov-config=.coveragerc",
"--cov=tephi",
"--cov-report=term-missing",
"--doctest-modules",
"--showlocals",
"--strict-markers",
"--strict-config"
]
xfail_strict = true
log_cli_level = "info"
testpaths = [
"tephi/",
]
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS NUMBER"

[tool.repo-review]
# These are a list of the currently failing tests:
ignore = [
# https://learn.scientific-python.org/development/guides/style/#PC180
"PC180", # Uses prettier

# https://learn.scientific-python.org/development/guides/packaging-simple/#PY005
"PY005", # Has tests folder

# TODO: exceptions that still need investigating are below. Might be fixable, or might become permanent (above):

# https://learn.scientific-python.org/development/guides/pytest#PP309
"PP309", # has filterwarnings set

# https://learn.scientific-python.org/development/guides/gha-basic/#GH212
"GH212", # Require GHA update grouping

# https://learn.scientific-python.org/development/guides/style/#PC170
"PC170", # Uses PyGrep hooks (only needed if rST present)

# https://learn.scientific-python.org/development/guides/style/#PC901
"PC901", # Custom pre-commit CI message
]

[tool.ruff]
line-length = 88

Expand Down Expand Up @@ -176,6 +192,19 @@ known-first-party = ["tephi"]
"ERA001", # Has commented out code
]


[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.setuptools.dynamic]
version = { attr = "tephi.__version__"}
readme = {file = ["README.md"], content-type = "text/markdown"}

[tool.setuptools.package-data]
tephi = [
"etc/test_data/*.txt",
"tests/results/*.npz",
"tests/results/imagerepo.json"
]

[tool.setuptools.packages.find]
include = ["tephi*"]
70 changes: 0 additions & 70 deletions setup.cfg

This file was deleted.

6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[tox]
requires =
tox-conda
minversion = 3.15
base_python = py311
envlist=py{38,39,310,311}
isolated_build = True

[testenv]
[testenv:py{38,39,310,311}-test]
description = invoke pytest to run automated tests
deps =
pytest
Expand Down

0 comments on commit 94d2aed

Please sign in to comment.