Skip to content
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

Remove setup.cfg and setup.py in favour of pyproj.toml #173

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .flake8

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ jobs:
.tox

- name: Run tox
run: pipx run 'tox<4'
run: |
pipx run 'tox<4'
tox -e py311-test
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ include *.yaml
include *.yml
include *.cff
include .coveragerc
include .flake8
include .git-blame-ignore-revs
include tox.ini
recursive-include requirements *.yml
Expand All @@ -15,3 +14,7 @@ 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

46 changes: 32 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# See https://github.com/SciTools/.github/wiki/Linting
# for SciTools linting guidelines
[build-system]
# Defined by PEP 518
requires = ["setuptools>=45"]
# Defined by PEP 517
build-backend = "setuptools.build_meta"

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

[project]
Expand All @@ -26,10 +31,8 @@ classifiers = [
]
description = "Tephigram plotting in Python"
dynamic = [
"dependencies",
"optional-dependencies",
"readme",
"version",
"readme",
]
keywords = [
"tephigram",
Expand All @@ -40,18 +43,37 @@ 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.setuptools.package-data]
tephi = [
"etc/test_data/*.txt",
"tests/results/*.npz",
"tests/results/imagerepo.json"
]

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

[tool.setuptools.packages.find]
include = ["tephi*"]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
#filterwarnings = ["error"]
log_cli_level = "info"
testpaths = [
"tephi/tests",
]

[tool.repo-review]
# These are a list of the currently failing tests:
Expand All @@ -64,9 +86,6 @@ ignore = [

# 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

Expand All @@ -77,7 +96,6 @@ ignore = [
"PC901", # Custom pre-commit CI message
]


[tool.mypy]
strict = false
ignore_missing_imports = true
Expand Down
70 changes: 0 additions & 70 deletions setup.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions setup.py

This file was deleted.

8 changes: 3 additions & 5 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 All @@ -28,5 +26,5 @@ commands =
sphinx-apidoc -o "{env:DOCSDIR}/api" tephi tephi/tests
sphinx-build -W --keep-going -b html -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/html" {posargs}
# when running the doctests, also check that any snippets in the
# docs are representative of the module output
# docs are representative Sof the module output
doctests: sphinx-build -b doctest -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/doctest" {posargs}
Loading