Skip to content

Commit

Permalink
Rename archivematicaCommon package
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Oct 19, 2024
1 parent 0a1ce5b commit 1823bbf
Show file tree
Hide file tree
Showing 72 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion code_review.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ expectations for contributors about what to expect.
- [ ] Does this duplicate functionality found elsewhere?
- [ ] Does it make more sense for this to be implemented elsewhere? E.g. Should
this happen in the storage service vs. a client script, or should a helper
function live in archivematicaCommon?
function live in common?
- [ ] Does this add or reduce technical debt?
- [ ] Does this conflict with or benefit from work being done in parallel?
- [ ] Does this have security implications? Does it add or close a security
Expand Down
12 changes: 6 additions & 6 deletions hack/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/:/src/src/dashboard/
ENV PYTHONPATH=/src/src/MCPClient/:/src/src/MCPClient/clientScripts:/src/src/common/:/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/externals/fido/ /usr/lib/archivematica/archivematicaCommon/externals/fido/
COPY --link src/archivematicaCommon/externals/fiwalk_plugins/ /usr/lib/archivematica/archivematicaCommon/externals/fiwalk_plugins/
COPY --link src/common/externals/fido/ /usr/lib/archivematica/common/externals/fido/
COPY --link src/common/externals/fiwalk_plugins/ /usr/lib/archivematica/common/externals/fiwalk_plugins/

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

Expand All @@ -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/:/src/src/dashboard/
ENV PYTHONPATH=/src/src/MCPServer/:/src/src/common/:/src/src/dashboard/

ENTRYPOINT ["pyenv", "exec", "python3", "/src/src/MCPServer/archivematicaMCP.py"]

Expand Down Expand Up @@ -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/
ENV PYTHONPATH=/src/src/dashboard/:/src/src/common/
ENV AM_GUNICORN_BIND=0.0.0.0:8000
ENV AM_GUNICORN_CHDIR=/src/src/dashboard
ENV FORWARDED_ALLOW_IPS=*
Expand Down Expand Up @@ -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/
ENV PYTHONPATH=/src/src/dashboard/:/src/src/common/

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

Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ norecursedirs = ".svn _build tmp* node_modules bower_components share .tox"

[tool.coverage.run]
omit = [
"**/src/archivematicaCommon/externals/*",
"**/src/common/externals/*",
"**/migrations/*",
"**/south_migrations/*",
"**/management/commands/*",
Expand All @@ -15,7 +15,7 @@ omit = [
"**/manage.py",
]
include = [
"**/src/archivematicaCommon/*",
"**/src/common/*",
"**/src/dashboard/*",
"**/src/MCPClient/*",
"**/src/MCPServer/*",
Expand Down Expand Up @@ -55,7 +55,7 @@ warn_unused_configs = true

[[tool.mypy.overrides]]
module = [
"src.archivematicaCommon.executeOrRunSubProcess",
"src.common.executeOrRunSubProcess",
"src.MCPClient.client.*",
"src.MCPClient.clientScripts.characterize_file",
"src.MCPClient.clientScripts.has_packages",
Expand All @@ -64,7 +64,7 @@ module = [
"src.MCPClient.clientScripts.policy_check",
"src.MCPClient.clientScripts.transcribe_file",
"src.MCPClient.clientScripts.validate_file",
"tests.archivematicaCommon.test_execute_functions",
"tests.common.test_execute_functions",
"tests.dashboard.fpr.test_views",
"tests.dashboard.test_oidc",
"tests.integration.test_oidc_auth",
Expand Down Expand Up @@ -118,7 +118,7 @@ legacy_tox_ini = """
SRC_DIR = {toxinidir}/src
HACK_DIR = {toxinidir}/hack
# Archivematica Common
ARCHIVEMATICA_COMMON_DIR = {env:SRC_DIR}/archivematicaCommon
ARCHIVEMATICA_COMMON_DIR = {env:SRC_DIR}/common
# Dashboard
DASHBOARD_DIR = {env:SRC_DIR}/dashboard
DASHBOARD_PYTHONPATH = {env:DASHBOARD_DIR}:{env:ARCHIVEMATICA_COMMON_DIR}
Expand All @@ -145,7 +145,7 @@ legacy_tox_ini = """
# dependencies in the tox host
linting: HOME = {temp_dir}/user
changedir =
archivematica-common: {toxinidir}/tests/archivematicaCommon
archivematica-common: {toxinidir}/tests/common
dashboard: {toxinidir}/tests/dashboard
mcp-server: {toxinidir}/tests/MCPServer
mcp-client: {toxinidir}/tests/MCPClient
Expand Down
2 changes: 1 addition & 1 deletion src/MCPClient/clientScripts/bind_pids.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _bind_pid_to_model(job, mdl, shared_path, config):
"""Binds a PID (Handle persistent identifier) to the (SIP or Directory)
model ``mdl`` by making a request to a Handle web service endpoint, given
the configuration in ``config`` (which is configured in a dashboard form).
Uses ``bind_pid`` from the bindpid.py module in archivematicaCommon. If
Uses ``bind_pid`` from the bindpid.py module in common. If
successful, adds the PID to the model's ``identifiers`` attribute.
"""
is_sip = isinstance(mdl, SIP)
Expand Down
2 changes: 1 addition & 1 deletion src/MCPClient/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ code: (see [`the example`](./clientConfig.conf))

MCPClient will look for a configuration file in one of two locations:

- `/etc/archivematica/archivematicaCommon/dbsettings`
- `/etc/archivematica/common/dbsettings`
- `/etc/archivematica/MCPClient/clientConfig.conf`

Traditionally, the dbsettings file was used to hold mysql login credentials,
Expand Down
2 changes: 1 addition & 1 deletion src/MCPClient/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def workers(config, section):
config.read_defaults(StringIO(CONFIG_DEFAULTS))
config.read_files(
[
"/etc/archivematica/archivematicaCommon/dbsettings",
"/etc/archivematica/common/dbsettings",
"/etc/archivematica/MCPClient/clientConfig.conf",
]
)
Expand Down
2 changes: 1 addition & 1 deletion src/MCPServer/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ code: (see [`the example`](./serverConfig.conf))

MCPClient will look for a configuration file in one of two locations:

- `/etc/archivematica/archivematicaCommon/dbsettings`
- `/etc/archivematica/common/dbsettings`
- `/etc/archivematica/MCPServer/serverConfig.conf`

Traditionally, the dbsettings file was used to hold mysql login credentials,
Expand Down
2 changes: 1 addition & 1 deletion src/MCPServer/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
config.read_defaults(StringIO(CONFIG_DEFAULTS))
config.read_files(
[
"/etc/archivematica/archivematicaCommon/dbsettings",
"/etc/archivematica/common/dbsettings",
"/etc/archivematica/MCPServer/serverConfig.conf",
]
)
Expand Down
5 changes: 0 additions & 5 deletions src/archivematicaCommon/externals/fiwalk_plugins/ficonfig.txt

This file was deleted.

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.
5 changes: 5 additions & 0 deletions src/common/externals/fiwalk_plugins/ficonfig.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# Configuration file for fiwalk
#

* dgi python /usr/lib/archivematica/common/externals/fiwalk_plugins/pronom_ident.py
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/dashboard/components/administration/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class HandleForm(SettingsForm):
directories, as well as the resolution of URLs based on those PIDs, i.e.,
PURLs, to specified URLs.
Note: the attributes of this form are (and must remain) identical to
archivematicaCommon/bindpid::CFGABLE_PARAMS.
common/bindpid::CFGABLE_PARAMS.
"""

pid_web_service_endpoint = forms.URLField(
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ of these settings or provide values to mandatory fields.

The Dashboard will look for a configuration file in one location:

- `/etc/archivematica/archivematicaCommon/dbsettings`
- `/etc/archivematica/common/dbsettings`

Traditionally, the dbsettings file was used to hold mysql login credentials,
which are then shared with other Archivematica components like MCPClient.
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/main/migrations/0041_bind_pids.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/bindpid.py
parameter) that is appended to it. See common/bindpid.py
for more details.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def _get_settings_from_file(path):

config = Config(env_prefix="ARCHIVEMATICA_DASHBOARD", attrs=CONFIG_MAPPING)
config.read_defaults(StringIO(CONFIG_DEFAULTS))
config.read_files(["/etc/archivematica/archivematicaCommon/dbsettings"])
config.read_files(["/etc/archivematica/common/dbsettings"])


path_of_this_file = os.path.abspath(os.path.dirname(__file__))
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.

0 comments on commit 1823bbf

Please sign in to comment.