Skip to content

Commit

Permalink
Remove MCPClient/lib directory
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Oct 17, 2024
1 parent 9e76fdf commit 8f701c4
Show file tree
Hide file tree
Showing 147 changed files with 13 additions and 15 deletions.
10 changes: 5 additions & 5 deletions hack/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,17 @@ 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/lib/:/src/src/MCPClient/lib/clientScripts:/src/src/archivematicaCommon/lib/:/src/src/dashboard/
ENV ARCHIVEMATICA_MCPCLIENT_ARCHIVEMATICACLIENTMODULES=/src/src/MCPClient/lib/archivematicaClientModules
ENV ARCHIVEMATICA_MCPCLIENT_CLIENTASSETSDIRECTORY=/src/src/MCPClient/lib/assets/
ENV ARCHIVEMATICA_MCPCLIENT_CLIENTSCRIPTSDIRECTORY=/src/src/MCPClient/lib/clientScripts/
ENV PYTHONPATH=/src/src/MCPClient/:/src/src/MCPClient/clientScripts:/src/src/archivematicaCommon/lib/:/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/

ENTRYPOINT ["pyenv", "exec", "python3", "/src/src/MCPClient/lib/archivematicaClient.py"]
ENTRYPOINT ["pyenv", "exec", "python3", "/src/src/MCPClient/archivematicaClient.py"]

# -----------------------------------------------------------------------------

Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ omit = [
include = [
"**/src/archivematicaCommon/lib/*",
"**/src/dashboard/*",
"**/src/MCPClient/lib/*",
"**/src/MCPClient/lib/clientScripts/*",
"**/src/MCPClient/*",
"**/src/MCPServer/lib/*",
]
branch = true
Expand Down Expand Up @@ -129,8 +128,7 @@ legacy_tox_ini = """
MCPSERVER_DIR = {env:MCPSERVER_ROOT}/lib
MCPSERVER_PYTHONPATH = {env:MCPSERVER_DIR}:{env:ARCHIVEMATICA_COMMON_DIR}:{env:DASHBOARD_DIR}
# MCP Client
MCPCLIENT_ROOT = {env:SRC_DIR}/MCPClient
MCPCLIENT_DIR = {env:MCPCLIENT_ROOT}/lib
MCPCLIENT_DIR = {env:SRC_DIR}/MCPClient
MCPCLIENT_PYTHONPATH = {env:MCPCLIENT_DIR}:{env:MCPCLIENT_DIR}/clientScripts:{env:ARCHIVEMATICA_COMMON_DIR}:{env:DASHBOARD_DIR}
# Storage Service
STORAGE_SERVICE_ROOT = {env:HACK_DIR}/submodules/archivematica-storage-service
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def get_supported_modules(modules_file_path: str) -> Dict[str, str]:
"""Create and return the ``supported_modules`` dict by parsing the MCPClient
modules config file (typically MCPClient/lib/archivematicaClientModules).
modules config file (typically MCPClient/archivematicaClientModules).
"""
supported_modules = {}
supported_modules_config = RawConfigParser()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/archivematicaCommon/lib/appconfig.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Configuration helper for MCPServer, MCPClient and Dashboard, used in:
- MCPClient/lib/settings/common.py
- MCPClient/settings/common.py
- MCPServer/lib/settings/common.py
- dashboard/settings/base.py
Expand Down
2 changes: 1 addition & 1 deletion src/archivematicaCommon/lib/identifier_functions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Functions to fetch identifiers for indexing in ElasticSearch.
See also src/MCPClient/lib/clientScripts/index_aip.py where these are used.
See also src/MCPClient/clientScripts/index_aip.py where these are used.
"""

from lxml import etree
Expand Down
2 changes: 1 addition & 1 deletion tests/MCPClient/test_create_aip_mets.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ class TestCustomStructMap(TestCase):
]
fixtures = [os.path.join(THIS_DIR, "fixtures", p) for p in fixture_files]
mets_xsd_path = os.path.abspath(
os.path.join(THIS_DIR, "../../src/MCPClient/lib/assets/mets/mets.xsd")
os.path.join(THIS_DIR, "../../src/MCPClient/assets/mets/mets.xsd")
)

@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/MCPClient/test_load_premis_events_from_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@pytest.fixture()
def xsd_path():
return os.path.abspath(
os.path.join(THIS_DIR, "../../src/MCPClient/lib/assets/premis/premis.xsd")
os.path.join(THIS_DIR, "../../src/MCPClient/assets/premis/premis.xsd")
)


Expand Down
2 changes: 1 addition & 1 deletion tests/MCPClient/upload-qubit-test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# upload-qubit script location
UPLOAD_QUBIT_PATH="${HOME}/archivematica/src/MCPClient/lib/clientScripts/upload-qubit.py"
UPLOAD_QUBIT_PATH="${HOME}/archivematica/src/MCPClient/clientScripts/upload-qubit.py"

# Qubit URL and login
URL="http://localhost/ica-atom/index.php/sword/deposit/archivematica"
Expand Down

0 comments on commit 8f701c4

Please sign in to comment.