-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to pyproject.toml & add invoke.py system (#40)
* Switch to pyproject.toml & add invoke.py system * Fix dependency caching in docker build * Set line length to 120
- Loading branch information
1 parent
ae22fe7
commit 2e318ae
Showing
10 changed files
with
105 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
extend-ignore = E203 |
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
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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[project] | ||
name = "nycmesh-meshdb" | ||
version = "0.1" | ||
dependencies = [ | ||
"Flask==2.3.2", | ||
"gunicorn==21.2.*", | ||
"SQLAlchemy==2.0.20", | ||
"SQLAlchemy_Utils==0.41.1", | ||
"psycopg2-binary==2.9.*", | ||
"python-dotenv==1.0.*", | ||
"stringcase==1.2.*" | ||
] | ||
|
||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"invoke == 2.2.*", | ||
"pytest == 7.4.*", | ||
"flake8 == 6.1.*", | ||
"black == 23.7.*", | ||
"isort == 5.12.*", | ||
"mypy == 1.5.*" | ||
] | ||
|
||
|
||
[build-system] | ||
requires = [ "setuptools >= 61", "wheel", "mypy" ] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
packages = [ "meshdb" ] | ||
|
||
|
||
[tool.mypy] | ||
check_untyped_defs = true | ||
show_error_codes = true | ||
pretty = true | ||
ignore_missing_imports = true | ||
disallow_untyped_calls = true | ||
disallow_untyped_defs = true | ||
disallow_incomplete_defs = true | ||
warn_unused_configs = true | ||
|
||
|
||
[tool.black] | ||
line-length = 120 | ||
include = '\.pyi?$' | ||
|
||
|
||
[tool.isort] | ||
profile = "black" | ||
line_length = 120 | ||
known_first_party = [ "meshdb" ] | ||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from invoke import task | ||
|
||
|
||
@task | ||
def format(context): | ||
context.run("black .") | ||
# context.run("isort .") | ||
|
||
|
||
@task | ||
def lint(context): | ||
context.run("black . --check") | ||
# context.run("isort . --check") | ||
# context.run("flake8 meshdb tests unit_tests") | ||
# context.run("mypy meshdb") | ||
|
||
|
||
@task | ||
def unit_test(context): | ||
context.run("pytest unit_tests/") |