From db117c95d29d2f6bcfcb8ebffa60adb829a208e1 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Thu, 14 Dec 2023 18:38:35 +0000 Subject: [PATCH 1/3] refactor: rename tmadmin-manage --> tmadmin_manage --- pyproject.toml | 2 +- tm_admin/{tmadmin-manage.py => tmadmin_manage.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tm_admin/{tmadmin-manage.py => tmadmin_manage.py} (100%) diff --git a/pyproject.toml b/pyproject.toml index f7ad6015..a12f43a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,4 +101,4 @@ exclude = [ convention = "google" [project.scripts] -tmadmin-manage = "tm_admin.tmadmin-manage:main" +tmadmin-manage = "tm_admin.tmadmin_manage:main" diff --git a/tm_admin/tmadmin-manage.py b/tm_admin/tmadmin_manage.py similarity index 100% rename from tm_admin/tmadmin-manage.py rename to tm_admin/tmadmin_manage.py From 7a1ad79af13448bc2d66aec54648874379cacd25 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Thu, 14 Dec 2023 18:38:52 +0000 Subject: [PATCH 2/3] docs: update info about tmadmin_manage.py file --- docs/api.md | 2 +- docs/dataflow.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index 8ecac8b2..292f6030 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,6 +1,6 @@ # API Docs for TM-Admin -## tmadmin-manage.py +## tmadmin_manage.py ::: tm_admin.tmadmin-manage options: diff --git a/docs/dataflow.md b/docs/dataflow.md index bb14abbe..9889a429 100644 --- a/docs/dataflow.md +++ b/docs/dataflow.md @@ -24,7 +24,7 @@ internal data structure for that file. More information on the config file [is here](configuring.md). The actual database schemas are created from the generated SQL -files. The *tmadmin-manage.py* file has a class that also runs +files. The *tmadmin_manage.py* file has a class that also runs standalone and generates all the SQL, python, and protobuf files using the *Generate* class. Once it generates the SQL files, it creates the database and tables. From 908006a0d908c0458899c2ac0c0107b8dd39bf2f Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Thu, 14 Dec 2023 18:58:25 +0000 Subject: [PATCH 3/3] build: replace mv with cp in ci build --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0042c900..e4767b90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,8 +119,8 @@ FROM runtime as ci ARG PYTHON_IMG_TAG COPY --from=extract-deps \ /opt/python/requirements-ci.txt /opt/python/ -RUN mv /root/.local/bin/* /usr/local/bin/ \ - && mv /root/.local/lib/python${PYTHON_IMG_TAG}/site-packages/* \ +RUN cp -r /root/.local/bin/* /usr/local/bin/ \ + && cp -r /root/.local/lib/python${PYTHON_IMG_TAG}/site-packages/* \ /usr/local/lib/python${PYTHON_IMG_TAG}/site-packages/ \ && set -ex \ && apt-get update \ @@ -131,7 +131,7 @@ RUN mv /root/.local/bin/* /usr/local/bin/ \ && pip install --upgrade --no-warn-script-location \ --no-cache-dir -r \ /opt/python/requirements-ci.txt \ - && rm -r /opt/python \ + && rm -r /opt/python && rm -r /root/.local \ # Pre-compile packages to .pyc (init speed gains) && python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)" # Override entrypoint, as not possible in Github action