From aac0a6cce72762fdd661c4b3f1a841b5506986ba Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Thu, 17 Oct 2024 22:41:50 +0000 Subject: [PATCH] Remove archivematicaCommon/lib directory --- hack/Dockerfile | 12 ++++++------ pyproject.toml | 7 +++---- src/archivematicaCommon/{lib => }/__init__.py | 0 src/archivematicaCommon/{lib => }/appconfig.py | 0 .../{lib => }/archivematicaFunctions.py | 0 src/archivematicaCommon/{lib => }/bag.py | 0 src/archivematicaCommon/{lib => }/bindpid.py | 0 src/archivematicaCommon/{lib => }/common_metrics.py | 0 src/archivematicaCommon/{lib => }/countryCodes.py | 0 src/archivematicaCommon/{lib => }/custom_handlers.py | 0 .../{lib => }/databaseFunctions.py | 0 src/archivematicaCommon/{lib => }/dbconns.py | 0 src/archivematicaCommon/{lib => }/dicts.py | 0 .../{lib => }/elasticSearchFunctions.py | 0 src/archivematicaCommon/{lib => }/email_settings.py | 0 .../{lib => }/env_configparser.py | 0 .../{lib => }/executeOrRunSubProcess.py | 0 .../{lib => }/externals/HTML/HTML.py | 0 .../externals/HTML/Licence_CeCILL_V2-en.html | 0 .../externals/HTML/Licence_CeCILL_V2-fr.html | 0 .../{lib => }/externals/HTML/__init__.py | 0 .../{lib => }/externals/__init__.py | 0 .../{lib => }/externals/extractMaildirAttachments.py | 0 .../fido/archivematica_format_extensions.xml | 0 .../{lib => }/externals/fiwalk_plugins/ficonfig.txt | 0 .../externals/fiwalk_plugins/pronom_ident.py | 0 .../{lib => }/externals/maildirToMbox.py | 0 .../{lib => }/externals/xmltodict.py | 0 src/archivematicaCommon/{lib => }/fileOperations.py | 0 src/archivematicaCommon/{lib => }/gearman_encoder.py | 0 .../{lib => }/identifier_functions.py | 0 src/archivematicaCommon/{lib => }/namespaces.py | 0 src/archivematicaCommon/{lib => }/processing.py | 0 src/archivematicaCommon/{lib => }/storageService.py | 0 src/archivematicaCommon/{lib => }/version.py | 0 src/archivematicaCommon/{lib => }/xml2obj.py | 0 src/dashboard/main/migrations/0041_bind_pids.py | 2 +- 37 files changed, 10 insertions(+), 11 deletions(-) rename src/archivematicaCommon/{lib => }/__init__.py (100%) rename src/archivematicaCommon/{lib => }/appconfig.py (100%) rename src/archivematicaCommon/{lib => }/archivematicaFunctions.py (100%) rename src/archivematicaCommon/{lib => }/bag.py (100%) rename src/archivematicaCommon/{lib => }/bindpid.py (100%) rename src/archivematicaCommon/{lib => }/common_metrics.py (100%) rename src/archivematicaCommon/{lib => }/countryCodes.py (100%) rename src/archivematicaCommon/{lib => }/custom_handlers.py (100%) rename src/archivematicaCommon/{lib => }/databaseFunctions.py (100%) rename src/archivematicaCommon/{lib => }/dbconns.py (100%) rename src/archivematicaCommon/{lib => }/dicts.py (100%) rename src/archivematicaCommon/{lib => }/elasticSearchFunctions.py (100%) rename src/archivematicaCommon/{lib => }/email_settings.py (100%) rename src/archivematicaCommon/{lib => }/env_configparser.py (100%) rename src/archivematicaCommon/{lib => }/executeOrRunSubProcess.py (100%) rename src/archivematicaCommon/{lib => }/externals/HTML/HTML.py (100%) rename src/archivematicaCommon/{lib => }/externals/HTML/Licence_CeCILL_V2-en.html (100%) rename src/archivematicaCommon/{lib => }/externals/HTML/Licence_CeCILL_V2-fr.html (100%) rename src/archivematicaCommon/{lib => }/externals/HTML/__init__.py (100%) rename src/archivematicaCommon/{lib => }/externals/__init__.py (100%) rename src/archivematicaCommon/{lib => }/externals/extractMaildirAttachments.py (100%) rename src/archivematicaCommon/{lib => }/externals/fido/archivematica_format_extensions.xml (100%) rename src/archivematicaCommon/{lib => }/externals/fiwalk_plugins/ficonfig.txt (100%) rename src/archivematicaCommon/{lib => }/externals/fiwalk_plugins/pronom_ident.py (100%) rename src/archivematicaCommon/{lib => }/externals/maildirToMbox.py (100%) rename src/archivematicaCommon/{lib => }/externals/xmltodict.py (100%) rename src/archivematicaCommon/{lib => }/fileOperations.py (100%) rename src/archivematicaCommon/{lib => }/gearman_encoder.py (100%) rename src/archivematicaCommon/{lib => }/identifier_functions.py (100%) rename src/archivematicaCommon/{lib => }/namespaces.py (100%) rename src/archivematicaCommon/{lib => }/processing.py (100%) rename src/archivematicaCommon/{lib => }/storageService.py (100%) rename src/archivematicaCommon/{lib => }/version.py (100%) rename src/archivematicaCommon/{lib => }/xml2obj.py (100%) diff --git a/hack/Dockerfile b/hack/Dockerfile index 419498b0c0..ee239a893d 100644 --- a/hack/Dockerfile +++ b/hack/Dockerfile @@ -224,15 +224,15 @@ COPY --chown=${USER_ID}:${GROUP_ID} --link . /src FROM base AS archivematica-mcp-client ENV DJANGO_SETTINGS_MODULE=settings.common -ENV PYTHONPATH=/src/src/MCPClient/:/src/src/MCPClient/clientScripts:/src/src/archivematicaCommon/lib/:/src/src/dashboard/ +ENV PYTHONPATH=/src/src/MCPClient/:/src/src/MCPClient/clientScripts:/src/src/archivematicaCommon/:/src/src/dashboard/ ENV ARCHIVEMATICA_MCPCLIENT_ARCHIVEMATICACLIENTMODULES=/src/src/MCPClient/archivematicaClientModules ENV ARCHIVEMATICA_MCPCLIENT_CLIENTASSETSDIRECTORY=/src/src/MCPClient/assets/ ENV ARCHIVEMATICA_MCPCLIENT_CLIENTSCRIPTSDIRECTORY=/src/src/MCPClient/clientScripts/ # Some scripts in archivematica-fpr-admin executed by MCPClient rely on certain # files being available in this image (e.g. see https://git.io/vA1wF). -COPY --link src/archivematicaCommon/lib/externals/fido/ /usr/lib/archivematica/archivematicaCommon/externals/fido/ -COPY --link src/archivematicaCommon/lib/externals/fiwalk_plugins/ /usr/lib/archivematica/archivematicaCommon/externals/fiwalk_plugins/ +COPY --link src/archivematicaCommon/externals/fido/ /usr/lib/archivematica/archivematicaCommon/externals/fido/ +COPY --link src/archivematicaCommon/externals/fiwalk_plugins/ /usr/lib/archivematica/archivematicaCommon/externals/fiwalk_plugins/ ENTRYPOINT ["pyenv", "exec", "python3", "/src/src/MCPClient/archivematicaClient.py"] @@ -241,7 +241,7 @@ ENTRYPOINT ["pyenv", "exec", "python3", "/src/src/MCPClient/archivematicaClient. FROM base AS archivematica-mcp-server ENV DJANGO_SETTINGS_MODULE=settings.common -ENV PYTHONPATH=/src/src/MCPServer/:/src/src/archivematicaCommon/lib/:/src/src/dashboard/ +ENV PYTHONPATH=/src/src/MCPServer/:/src/src/archivematicaCommon/:/src/src/dashboard/ ENTRYPOINT ["pyenv", "exec", "python3", "/src/src/MCPServer/archivematicaMCP.py"] @@ -271,7 +271,7 @@ COPY --chown=${USER_ID}:${GROUP_ID} --from=archivematica-dashboard-frontend-buil WORKDIR /src/src/dashboard ENV DJANGO_SETTINGS_MODULE=settings.local -ENV PYTHONPATH=/src/src/dashboard/:/src/src/archivematicaCommon/lib/ +ENV PYTHONPATH=/src/src/dashboard/:/src/src/archivematicaCommon/ ENV AM_GUNICORN_BIND=0.0.0.0:8000 ENV AM_GUNICORN_CHDIR=/src/src/dashboard ENV FORWARDED_ALLOW_IPS=* @@ -305,7 +305,7 @@ RUN set -ex \ && mkdir -p /var/archivematica/.cache/ms-playwright \ && python3 -m playwright install firefox -ENV PYTHONPATH=/src/src/dashboard/:/src/src/archivematicaCommon/lib/ +ENV PYTHONPATH=/src/src/dashboard/:/src/src/archivematicaCommon/ # ----------------------------------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index ce5146c396..dab5b45810 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ norecursedirs = ".svn _build tmp* node_modules bower_components share .tox" [tool.coverage.run] omit = [ - "**/src/archivematicaCommon/lib/externals/*", + "**/src/archivematicaCommon/externals/*", "**/migrations/*", "**/south_migrations/*", "**/management/commands/*", @@ -15,7 +15,7 @@ omit = [ "**/manage.py", ] include = [ - "**/src/archivematicaCommon/lib/*", + "**/src/archivematicaCommon/*", "**/src/dashboard/*", "**/src/MCPClient/*", "**/src/MCPServer/*", @@ -118,8 +118,7 @@ legacy_tox_ini = """ SRC_DIR = {toxinidir}/src HACK_DIR = {toxinidir}/hack # Archivematica Common - ARCHIVEMATICA_COMMON_ROOT = {env:SRC_DIR}/archivematicaCommon - ARCHIVEMATICA_COMMON_DIR = {env:ARCHIVEMATICA_COMMON_ROOT}/lib + ARCHIVEMATICA_COMMON_DIR = {env:SRC_DIR}/archivematicaCommon # Dashboard DASHBOARD_DIR = {env:SRC_DIR}/dashboard DASHBOARD_PYTHONPATH = {env:DASHBOARD_DIR}:{env:ARCHIVEMATICA_COMMON_DIR} diff --git a/src/archivematicaCommon/lib/__init__.py b/src/archivematicaCommon/__init__.py similarity index 100% rename from src/archivematicaCommon/lib/__init__.py rename to src/archivematicaCommon/__init__.py diff --git a/src/archivematicaCommon/lib/appconfig.py b/src/archivematicaCommon/appconfig.py similarity index 100% rename from src/archivematicaCommon/lib/appconfig.py rename to src/archivematicaCommon/appconfig.py diff --git a/src/archivematicaCommon/lib/archivematicaFunctions.py b/src/archivematicaCommon/archivematicaFunctions.py similarity index 100% rename from src/archivematicaCommon/lib/archivematicaFunctions.py rename to src/archivematicaCommon/archivematicaFunctions.py diff --git a/src/archivematicaCommon/lib/bag.py b/src/archivematicaCommon/bag.py similarity index 100% rename from src/archivematicaCommon/lib/bag.py rename to src/archivematicaCommon/bag.py diff --git a/src/archivematicaCommon/lib/bindpid.py b/src/archivematicaCommon/bindpid.py similarity index 100% rename from src/archivematicaCommon/lib/bindpid.py rename to src/archivematicaCommon/bindpid.py diff --git a/src/archivematicaCommon/lib/common_metrics.py b/src/archivematicaCommon/common_metrics.py similarity index 100% rename from src/archivematicaCommon/lib/common_metrics.py rename to src/archivematicaCommon/common_metrics.py diff --git a/src/archivematicaCommon/lib/countryCodes.py b/src/archivematicaCommon/countryCodes.py similarity index 100% rename from src/archivematicaCommon/lib/countryCodes.py rename to src/archivematicaCommon/countryCodes.py diff --git a/src/archivematicaCommon/lib/custom_handlers.py b/src/archivematicaCommon/custom_handlers.py similarity index 100% rename from src/archivematicaCommon/lib/custom_handlers.py rename to src/archivematicaCommon/custom_handlers.py diff --git a/src/archivematicaCommon/lib/databaseFunctions.py b/src/archivematicaCommon/databaseFunctions.py similarity index 100% rename from src/archivematicaCommon/lib/databaseFunctions.py rename to src/archivematicaCommon/databaseFunctions.py diff --git a/src/archivematicaCommon/lib/dbconns.py b/src/archivematicaCommon/dbconns.py similarity index 100% rename from src/archivematicaCommon/lib/dbconns.py rename to src/archivematicaCommon/dbconns.py diff --git a/src/archivematicaCommon/lib/dicts.py b/src/archivematicaCommon/dicts.py similarity index 100% rename from src/archivematicaCommon/lib/dicts.py rename to src/archivematicaCommon/dicts.py diff --git a/src/archivematicaCommon/lib/elasticSearchFunctions.py b/src/archivematicaCommon/elasticSearchFunctions.py similarity index 100% rename from src/archivematicaCommon/lib/elasticSearchFunctions.py rename to src/archivematicaCommon/elasticSearchFunctions.py diff --git a/src/archivematicaCommon/lib/email_settings.py b/src/archivematicaCommon/email_settings.py similarity index 100% rename from src/archivematicaCommon/lib/email_settings.py rename to src/archivematicaCommon/email_settings.py diff --git a/src/archivematicaCommon/lib/env_configparser.py b/src/archivematicaCommon/env_configparser.py similarity index 100% rename from src/archivematicaCommon/lib/env_configparser.py rename to src/archivematicaCommon/env_configparser.py diff --git a/src/archivematicaCommon/lib/executeOrRunSubProcess.py b/src/archivematicaCommon/executeOrRunSubProcess.py similarity index 100% rename from src/archivematicaCommon/lib/executeOrRunSubProcess.py rename to src/archivematicaCommon/executeOrRunSubProcess.py diff --git a/src/archivematicaCommon/lib/externals/HTML/HTML.py b/src/archivematicaCommon/externals/HTML/HTML.py similarity index 100% rename from src/archivematicaCommon/lib/externals/HTML/HTML.py rename to src/archivematicaCommon/externals/HTML/HTML.py diff --git a/src/archivematicaCommon/lib/externals/HTML/Licence_CeCILL_V2-en.html b/src/archivematicaCommon/externals/HTML/Licence_CeCILL_V2-en.html similarity index 100% rename from src/archivematicaCommon/lib/externals/HTML/Licence_CeCILL_V2-en.html rename to src/archivematicaCommon/externals/HTML/Licence_CeCILL_V2-en.html diff --git a/src/archivematicaCommon/lib/externals/HTML/Licence_CeCILL_V2-fr.html b/src/archivematicaCommon/externals/HTML/Licence_CeCILL_V2-fr.html similarity index 100% rename from src/archivematicaCommon/lib/externals/HTML/Licence_CeCILL_V2-fr.html rename to src/archivematicaCommon/externals/HTML/Licence_CeCILL_V2-fr.html diff --git a/src/archivematicaCommon/lib/externals/HTML/__init__.py b/src/archivematicaCommon/externals/HTML/__init__.py similarity index 100% rename from src/archivematicaCommon/lib/externals/HTML/__init__.py rename to src/archivematicaCommon/externals/HTML/__init__.py diff --git a/src/archivematicaCommon/lib/externals/__init__.py b/src/archivematicaCommon/externals/__init__.py similarity index 100% rename from src/archivematicaCommon/lib/externals/__init__.py rename to src/archivematicaCommon/externals/__init__.py diff --git a/src/archivematicaCommon/lib/externals/extractMaildirAttachments.py b/src/archivematicaCommon/externals/extractMaildirAttachments.py similarity index 100% rename from src/archivematicaCommon/lib/externals/extractMaildirAttachments.py rename to src/archivematicaCommon/externals/extractMaildirAttachments.py diff --git a/src/archivematicaCommon/lib/externals/fido/archivematica_format_extensions.xml b/src/archivematicaCommon/externals/fido/archivematica_format_extensions.xml similarity index 100% rename from src/archivematicaCommon/lib/externals/fido/archivematica_format_extensions.xml rename to src/archivematicaCommon/externals/fido/archivematica_format_extensions.xml diff --git a/src/archivematicaCommon/lib/externals/fiwalk_plugins/ficonfig.txt b/src/archivematicaCommon/externals/fiwalk_plugins/ficonfig.txt similarity index 100% rename from src/archivematicaCommon/lib/externals/fiwalk_plugins/ficonfig.txt rename to src/archivematicaCommon/externals/fiwalk_plugins/ficonfig.txt diff --git a/src/archivematicaCommon/lib/externals/fiwalk_plugins/pronom_ident.py b/src/archivematicaCommon/externals/fiwalk_plugins/pronom_ident.py similarity index 100% rename from src/archivematicaCommon/lib/externals/fiwalk_plugins/pronom_ident.py rename to src/archivematicaCommon/externals/fiwalk_plugins/pronom_ident.py diff --git a/src/archivematicaCommon/lib/externals/maildirToMbox.py b/src/archivematicaCommon/externals/maildirToMbox.py similarity index 100% rename from src/archivematicaCommon/lib/externals/maildirToMbox.py rename to src/archivematicaCommon/externals/maildirToMbox.py diff --git a/src/archivematicaCommon/lib/externals/xmltodict.py b/src/archivematicaCommon/externals/xmltodict.py similarity index 100% rename from src/archivematicaCommon/lib/externals/xmltodict.py rename to src/archivematicaCommon/externals/xmltodict.py diff --git a/src/archivematicaCommon/lib/fileOperations.py b/src/archivematicaCommon/fileOperations.py similarity index 100% rename from src/archivematicaCommon/lib/fileOperations.py rename to src/archivematicaCommon/fileOperations.py diff --git a/src/archivematicaCommon/lib/gearman_encoder.py b/src/archivematicaCommon/gearman_encoder.py similarity index 100% rename from src/archivematicaCommon/lib/gearman_encoder.py rename to src/archivematicaCommon/gearman_encoder.py diff --git a/src/archivematicaCommon/lib/identifier_functions.py b/src/archivematicaCommon/identifier_functions.py similarity index 100% rename from src/archivematicaCommon/lib/identifier_functions.py rename to src/archivematicaCommon/identifier_functions.py diff --git a/src/archivematicaCommon/lib/namespaces.py b/src/archivematicaCommon/namespaces.py similarity index 100% rename from src/archivematicaCommon/lib/namespaces.py rename to src/archivematicaCommon/namespaces.py diff --git a/src/archivematicaCommon/lib/processing.py b/src/archivematicaCommon/processing.py similarity index 100% rename from src/archivematicaCommon/lib/processing.py rename to src/archivematicaCommon/processing.py diff --git a/src/archivematicaCommon/lib/storageService.py b/src/archivematicaCommon/storageService.py similarity index 100% rename from src/archivematicaCommon/lib/storageService.py rename to src/archivematicaCommon/storageService.py diff --git a/src/archivematicaCommon/lib/version.py b/src/archivematicaCommon/version.py similarity index 100% rename from src/archivematicaCommon/lib/version.py rename to src/archivematicaCommon/version.py diff --git a/src/archivematicaCommon/lib/xml2obj.py b/src/archivematicaCommon/xml2obj.py similarity index 100% rename from src/archivematicaCommon/lib/xml2obj.py rename to src/archivematicaCommon/xml2obj.py diff --git a/src/dashboard/main/migrations/0041_bind_pids.py b/src/dashboard/main/migrations/0041_bind_pids.py index fa5ffddc4f..9e5eda2069 100644 --- a/src/dashboard/main/migrations/0041_bind_pids.py +++ b/src/dashboard/main/migrations/0041_bind_pids.py @@ -23,7 +23,7 @@ def data_migration(apps, schema_editor): PID---generally the UUID of the entity---is passed during handle creation.) That the PURL (i.e., PID's URL) may be configured to resolve to different external (resolve) URLs depending on the qualifier (GET query - parameter) that is appended to it. See archivematicaCommon/lib/bindpid.py + parameter) that is appended to it. See archivematicaCommon/bindpid.py for more details. """