-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename application package to src from api (#146)
In PR #138 we renamed the route package to api, which makes it api.api. This PR renames the top level package to src to avoid naming issues and to represent the idea that the application contains other things like CLI commands / background jobs. We considered naming it app, but that would conflict with the app folder at the repo root, and it would also create ambiguity with the flask app variable.
- Loading branch information
Showing
90 changed files
with
169 additions
and
169 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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "template-application-flask" | ||
version = "0.1.0" | ||
description = "A template flask API for building ontop of" | ||
packages = [{ include = "api" }] | ||
packages = [{ include = "src" }] | ||
authors = ["Nava Engineering <[email protected]>"] | ||
|
||
[tool.poetry.dependencies] | ||
|
@@ -44,9 +44,9 @@ requires = ["poetry-core>=1.0.0"] | |
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
db-migrate-up = "api.db.migrations.run:up" | ||
db-migrate-down = "api.db.migrations.run:down" | ||
db-migrate-down-all = "api.db.migrations.run:downall" | ||
db-migrate-up = "src.db.migrations.run:up" | ||
db-migrate-down = "src.db.migrations.run:down" | ||
db-migrate-down-all = "src.db.migrations.run:downall" | ||
|
||
[tool.black] | ||
line-length = 100 | ||
|
@@ -85,14 +85,14 @@ plugins = ["sqlalchemy.ext.mypy.plugin"] | |
|
||
[tool.bandit] | ||
# Ignore audit logging test file since test audit logging requires a lot of operations that trigger bandit warnings | ||
exclude_dirs = ["./tests/api/logging/test_audit.py"] | ||
exclude_dirs = ["./tests/src/logging/test_audit.py"] | ||
|
||
[[tool.mypy.overrides]] | ||
# Migrations are generated without "-> None" | ||
# for the returns. Rather than require manually | ||
# fixing this for every migration generated, | ||
# disable the check for that folder. | ||
module = "api.db.migrations.versions.*" | ||
module = "src.db.migrations.versions.*" | ||
disallow_untyped_defs = false | ||
|
||
[tool.pytest.ini_options] | ||
|
@@ -108,5 +108,5 @@ markers = [ | |
"audit: mark a test as a security audit log test, to be run isolated from other tests"] | ||
|
||
[tool.coverage.run] | ||
omit = ["api/db/migrations/*.py"] | ||
omit = ["src/db/migrations/*.py"] | ||
|
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
app/api/api/schemas/response_schema.py → app/src/api/schemas/response_schema.py
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
6 changes: 3 additions & 3 deletions
6
app/api/api/users/__init__.py → app/src/api/users/__init__.py
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,10 +1,10 @@ | ||
from api.api.users.user_blueprint import user_blueprint | ||
from src.api.users.user_blueprint import user_blueprint | ||
|
||
# import user_commands module to register the CLI commands on the user_blueprint | ||
import api.api.users.user_commands # noqa: F401 E402 isort:skip | ||
import src.api.users.user_commands # noqa: F401 E402 isort:skip | ||
|
||
# import user_commands module to register the API routes on the user_blueprint | ||
import api.api.users.user_routes # noqa: F401 E402 isort:skip | ||
import src.api.users.user_routes # noqa: F401 E402 isort:skip | ||
|
||
|
||
__all__ = ["user_blueprint"] |
File renamed without changes.
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
18 changes: 9 additions & 9 deletions
18
app/api/api/users/user_routes.py → app/src/api/users/user_routes.py
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
4 changes: 2 additions & 2 deletions
4
app/api/api/users/user_schemas.py → app/src/api/users/user_schemas.py
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.