diff --git a/.gitignore b/.gitignore index 07be84ab..7f3fbbe2 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ .terraform terraform.tfstate* *.tfvars -/thin_egress_app/.chalice +/src/thin_egress_app/.chalice .coverage # Config diff --git a/Makefile b/Makefile index f25e3904..b234e381 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ SOURCES := \ - thin_egress_app/var/otel-config/collector.yaml \ - thin_egress_app/app.py \ - thin_egress_app/tea_bumper.py \ - thin_egress_app/update_lambda.py + src/thin_egress_app/var/otel-config/collector.yaml \ + src/thin_egress_app/app.py \ + src/thin_egress_app/tea_bumper.py \ + src/thin_egress_app/update_lambda.py HTML_TEMPLATES := $(wildcard templates/*.html) MD_TEMPLATES := $(wildcard templates/*.md) @@ -15,7 +15,7 @@ REQUIREMENTS_TXT := $(REQUIREMENTS_IN:.in=.txt) DIR := dist EMPTY := $(DIR)/empty # Temporary artifacts -DIST_SOURCES := $(SOURCES:thin_egress_app/%=$(DIR)/code/%) +DIST_SOURCES := $(SOURCES:src/thin_egress_app/%=$(DIR)/code/%) DIST_MD_RESOURCES := $(MD_TEMPLATES:%.md=$(DIR)/code/%.html) DIST_HTML_RESOURCES := $(HTML_TEMPLATES:%=$(DIR)/code/%) DIST_RESOURCES := $(DIST_HTML_RESOURCES) $(DIST_MD_RESOURCES) @@ -118,7 +118,7 @@ $(DIST_HTML_RESOURCES): $(DIR)/code/%: % cp $< $@ .SECONDARY: $(DIST_SOURCES) -$(DIST_SOURCES): $(DIR)/code/%: thin_egress_app/% +$(DIST_SOURCES): $(DIR)/code/%: src/thin_egress_app/% @mkdir -p $(@D) cp $< $@ $(PYTHON) scripts/sed.py -i $@ "" "${BUILD_ID}" diff --git a/docs/deploying.md b/docs/deploying.md index d1635107..a82cb678 100644 --- a/docs/deploying.md +++ b/docs/deploying.md @@ -22,12 +22,12 @@ environment management. To install the TEA CLI using git over SSH: ``` -pipx install git+ssh://git@github.com/asfadmin/thin-egress-app.git#subdirectory=tea-cli +pipx install git+ssh://git@github.com/asfadmin/thin-egress-app.git#subdirectory=src/tea-cli ``` Or, to install the TEA CLI using git over HTTPS: ``` -pipx install git+https://github.com/asfadmin/thin-egress-app.git#subdirectory=tea-cli +pipx install git+https://github.com/asfadmin/thin-egress-app.git#subdirectory=src/tea-cli ``` ### Using the TEA CLI diff --git a/docs/technical.md b/docs/technical.md index 3d87a5e9..f9f9c7db 100644 --- a/docs/technical.md +++ b/docs/technical.md @@ -19,7 +19,7 @@ file, parses out the IP CIDRs for the deploy region, and automatically updates the In-Region IAM Role's Policy Document `condition` block. This lambda is defined in -[update_lambda.py](https://github.com/asfadmin/thin-egress-app/blob/devel/thin_egress_app/update_lambda.py) +[update_lambda.py](https://github.com/asfadmin/thin-egress-app/blob/devel/src/thin_egress_app/update_lambda.py) ## Build Process diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..238252da --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +pythonpath = src/ diff --git a/tea-cli/pyproject.toml b/src/tea-cli/pyproject.toml similarity index 100% rename from tea-cli/pyproject.toml rename to src/tea-cli/pyproject.toml diff --git a/tea-cli/tea_cli/__init__.py b/src/tea-cli/tea_cli/__init__.py similarity index 100% rename from tea-cli/tea_cli/__init__.py rename to src/tea-cli/tea_cli/__init__.py diff --git a/tea-cli/tea_cli/__main__.py b/src/tea-cli/tea_cli/__main__.py similarity index 100% rename from tea-cli/tea_cli/__main__.py rename to src/tea-cli/tea_cli/__main__.py diff --git a/tea-cli/tea_cli/commands/__init__.py b/src/tea-cli/tea_cli/commands/__init__.py similarity index 100% rename from tea-cli/tea_cli/commands/__init__.py rename to src/tea-cli/tea_cli/commands/__init__.py diff --git a/tea-cli/tea_cli/commands/list_versions.py b/src/tea-cli/tea_cli/commands/list_versions.py similarity index 100% rename from tea-cli/tea_cli/commands/list_versions.py rename to src/tea-cli/tea_cli/commands/list_versions.py diff --git a/tea-cli/tea_cli/commands/quick_deploy.py b/src/tea-cli/tea_cli/commands/quick_deploy.py similarity index 100% rename from tea-cli/tea_cli/commands/quick_deploy.py rename to src/tea-cli/tea_cli/commands/quick_deploy.py diff --git a/tea-cli/tea_cli/deploy.py b/src/tea-cli/tea_cli/deploy.py similarity index 100% rename from tea-cli/tea_cli/deploy.py rename to src/tea-cli/tea_cli/deploy.py diff --git a/tea-cli/tea_cli/main.py b/src/tea-cli/tea_cli/main.py similarity index 100% rename from tea-cli/tea_cli/main.py rename to src/tea-cli/tea_cli/main.py diff --git a/tea-cli/tea_cli/selector.py b/src/tea-cli/tea_cli/selector.py similarity index 100% rename from tea-cli/tea_cli/selector.py rename to src/tea-cli/tea_cli/selector.py diff --git a/tea-cli/tests/__init__.py b/src/tea-cli/tests/__init__.py similarity index 100% rename from tea-cli/tests/__init__.py rename to src/tea-cli/tests/__init__.py diff --git a/tea-cli/tests/conftest.py b/src/tea-cli/tests/conftest.py similarity index 100% rename from tea-cli/tests/conftest.py rename to src/tea-cli/tests/conftest.py diff --git a/tea-cli/tests/test_main.py b/src/tea-cli/tests/test_main.py similarity index 100% rename from tea-cli/tests/test_main.py rename to src/tea-cli/tests/test_main.py diff --git a/thin_egress_app/__init__.py b/src/thin_egress_app/__init__.py similarity index 100% rename from thin_egress_app/__init__.py rename to src/thin_egress_app/__init__.py diff --git a/thin_egress_app/app.py b/src/thin_egress_app/app.py similarity index 100% rename from thin_egress_app/app.py rename to src/thin_egress_app/app.py diff --git a/thin_egress_app/tea_bumper.py b/src/thin_egress_app/tea_bumper.py similarity index 100% rename from thin_egress_app/tea_bumper.py rename to src/thin_egress_app/tea_bumper.py diff --git a/thin_egress_app/update_lambda.py b/src/thin_egress_app/update_lambda.py similarity index 100% rename from thin_egress_app/update_lambda.py rename to src/thin_egress_app/update_lambda.py diff --git a/thin_egress_app/var/otel-config/collector.yaml b/src/thin_egress_app/var/otel-config/collector.yaml similarity index 100% rename from thin_egress_app/var/otel-config/collector.yaml rename to src/thin_egress_app/var/otel-config/collector.yaml