Skip to content

Commit

Permalink
Remove setuptools files (#59)
Browse files Browse the repository at this point in the history
* Move zest.releaser config to pyproject.toml

* Move coverage config to pyproject.toml

* Use ruff instead of flake8

* Update deprecated pytest setting

* Use pyproject.toml for coverage configuration
  • Loading branch information
mdpiper authored Dec 15, 2023
1 parent 40cf85d commit 917cb8f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 27 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ development.
Now you can make your changes locally.
5. When you're done making changes, check that your changes pass
flake8 and the tests:
ruff and the tests:
``` {.shell}
$ make lint
$ make test
```
Both flake8 and pytest are included in the environment.
Both ruff and pytest are included in the environment.
6. Commit your changes and push your branch to GitHub:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- rioxarray
- bmipy
- black
- flake8
- ruff
- isort
- nox
- pytest
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test(session: nox.Session) -> None:

if "CI" in os.environ:
args.append(f"--cov-report=xml:{ROOT.absolute()!s}/coverage.xml")
args.append(f"--cov-config={ROOT.absolute()!s}/setup.cfg")
args.append(f"--cov-config={ROOT.absolute()!s}/pyproject.toml")
session.run("pytest", *args)

if "CI" not in os.environ:
Expand Down Expand Up @@ -69,7 +69,7 @@ def format(session: nox.Session) -> None:

session.run("black", *black_args, *PATHS)
session.run("isort", *PATHS)
session.run("flake8", *PATHS)
session.run("ruff", *PATHS)


@nox.session(name="prepare-docs")
Expand Down
19 changes: 17 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Changelog = "https://github.com/csdms/bmi-topography/blob/main/CHANGES.md"
[project.optional-dependencies]
dev = [
"black",
"flake8",
"ruff",
"isort",
"nox",
]
Expand Down Expand Up @@ -96,7 +96,7 @@ norecursedirs = [".*", "*.egg*", "build", "dist"]
addopts = """
--ignore setup.py
--tb native
--strict
--strict-markers
--durations 16
--doctest-modules
-vvv
Expand All @@ -113,3 +113,18 @@ include_trailing_comma = true
force_grid_wrap = 0
combine_as_imports = true
line_length = 88

[tool.ruff]
exclude = ["docs"]
line-length = 88
ignore = [
"E203",
"E501",
]

[tool.coverage.run]
relative_files = true

[tool.zest-releaser]
tag-format = "v{version}"
python-file-with-version = "bmi_topography/_version.py"
14 changes: 0 additions & 14 deletions setup.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

0 comments on commit 917cb8f

Please sign in to comment.