-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from omar-abdelgawad/switch-to-ruff
Switch to ruff
- Loading branch information
Showing
8 changed files
with
81 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,46 @@ | ||
[build-system] | ||
requires = ["setuptools>=42.0", "wheel"] | ||
requires = ["setuptools>=61.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "mypackagename" | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"requests" | ||
] | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{name = "Omar Abdelgawad", email = "[email protected]"}, | ||
{name = "Tzu-Ping Chung", email = "[email protected]"}, | ||
] | ||
description = "A package for image to image translation using GANs" | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
keywords = ["image-to-image-translation", "GAN", "vision", "deep-learning"] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10" | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"mypy", | ||
"ruff", | ||
"pytest", | ||
"pytest-cov", | ||
"tox" | ||
] | ||
|
||
[tool.setuptools.package-data] | ||
firstpkg = ["py.typed"] | ||
secondpkg = ["py.typed"] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/me/spam.git" | ||
|
||
################################################################################################### | ||
[tool.pytest.ini_options] | ||
addopts = "--cov=firstpkg --cov=secondpkg" #include all packages under src directory | ||
testpaths = [ | ||
|
@@ -20,4 +59,11 @@ warn_redundant_casts = true | |
warn_return_any = true | ||
warn_unreachable = true | ||
warn_unused_configs = true | ||
no_implicit_reexport = true | ||
no_implicit_reexport = true | ||
|
||
[tool.ruff] | ||
include = ["*.py"] | ||
src = ["src"] | ||
|
||
[tool.ruff.lint] | ||
extend-select = ["UP","PL"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
[tox] | ||
minversion = 3.8.0 | ||
envlist = py38, py39, py310, pylint, mypy | ||
envlist = py38, py39, py310, ruff, mypy | ||
isolated_build = true | ||
|
||
[gh-actions] | ||
python = | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310, mypy, pylint | ||
3.10: py310, mypy, ruff | ||
|
||
[testenv] | ||
setenv = | ||
PYTHONPATH = {toxinidir} | ||
deps = | ||
-r{toxinidir}/requirements-dev.txt | ||
pytest | ||
pytest-cov | ||
commands = | ||
pytest --basetemp={envtmpdir} | ||
|
||
# [testenv:flake8] | ||
# basepython = python3.6 | ||
# deps = flake8 | ||
# commands = flake8 src tests | ||
|
||
[testenv:pylint] | ||
[testenv:ruff] | ||
basepython = python3.10 | ||
deps = pylint | ||
commands = pylint src tests --exit-zero | ||
deps = | ||
ruff | ||
commands = ruff check src tests --exit-zero | ||
|
||
[testenv:mypy] | ||
basepython = python3.10 | ||
deps = | ||
-r{toxinidir}/requirements-dev.txt | ||
mypy | ||
commands = mypy src #--exclude pattern |