Skip to content

Commit

Permalink
Add sphinx-lint as pre-commit (artefactual#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
eviau-artefactual authored Jan 5, 2024
1 parent 761c604 commit 8baced3
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 94 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ jobs:
- name: "Run build test"
run: |
make test
lint:
name: "Linting"
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
hooks:
- id: sphinx-lint
4 changes: 2 additions & 2 deletions admin-manual/installation-setup/integrations/atom-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ values.

Next, configure the connection between the two systems:

#. Confirm atom-worker is configured on the AtoM server by copying the ``atom-
worker.conf`` file from AtoM source to ``/etc/init/``.
#. Confirm atom-worker is configured on the AtoM server by copying the
``atom-worker.conf`` file from AtoM source to ``/etc/init/``.
#. Make sure that the SWORD plugin and AtoM REST API are enabled on the
:ref:`AtoM plugins menu <atom:manage-plugins>`.

Expand Down
6 changes: 3 additions & 3 deletions admin-manual/security/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ of any other servers or workstations that should be able to access it.
.. important::

If you are using AtoM as your access system, remember to perform this task on
your AtoM Elasticsearch index. Your AtoM site is more likely to be a public-
facing IP and therefore this is an important step.
your AtoM Elasticsearch index. Your AtoM site is more likely to be a
public-facing IP and therefore this is an important step.

For more advanced Elasticsearch installations follow `their security
documentation <elasticsearch-security-external_>`_. The
Expand Down Expand Up @@ -254,7 +254,7 @@ CAS backend configuration in Archivematica Dashboard
++++++++++++++++++++++++++++++++++++++++++++++++++++

#. Enable the authentication backend using the environment variable
`ARCHIVEMATICA_DASHBOARD_DASHBOARD_CAS_AUTHENTICATION``. You can find more
`ARCHIVEMATICA_DASHBOARD_DASHBOARD_CAS_AUTHENTICATION`. You can find more
details about this environment string in the
`configuration document <am-dashboard-config_>`_.

Expand Down
121 changes: 57 additions & 64 deletions dev-manual/api/api-reference-archivematica.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ Request body parameters:

``paths[]`` List of base64-encoded
``<location_uuid>:<relative_path>`` to be copied into the new
transfer. Location UUIDs should be associated with this pipe-
line, and relative path should be relative to the location.
transfer. Location UUIDs should be associated with this
pipeline, and relative path should be relative to the
location.

``row_ids[]`` ID of the associated TransferMetadataSet for disk image
ingest. Can be provided as ``[""]``.
Expand Down Expand Up @@ -164,46 +165,39 @@ Status

Response definitions:

================= ============================ ======================

``status`` One of FAILED, REJECTED, string
USER_INPUT, COMPLETE or
PROCESSING

``name`` Name of the transfer, string
e.g. "imgs"

``sip_uuid`` If status is COMPLETE, string
this field will exist
with either the UUID
of the SIP or 'BACKLOG'

``microservice`` Name of the current string
microservice

``directory`` Name of the directory, string
e.g. "imgs-52dd0c01-e803-
423a-be5f-b592b5d5d61c"

``path`` Full path to the transfer, string
e.g. "/var/archivematica/
sharedDirectory/watched
Directories/SIPCreation/
completedTransfers/imgs-
52dd0c01-e803-423a-
be5f-b592b5d5d61c/"

``message`` "Fetched status from string
<transfer UUID>
successfully."

``type`` "transfer" string

``uuid`` UUID of the transfer, string
e.g. "52dd0c01-e803-423a-
be5f-b592b5d5d61c"

================= ============================ ======================
.. list-table::

* - ``status``
- One of FAILED, REJECTED, USER_INPUT, COMPLETE or PROCESSING
- string
* - ``name``
- Name of the transfer, e.g. "imgs"
- string
* - ``sip_uuid``
- If status is COMPLETE, this field will exist with either the UUID
of the SIP or 'BACKLOG'
- string
* - ``microservice``
- Name of the current microservice
- string
* - ``directory``
- Name of the direcotry, e.g.
"imgs-52dd0c01-e803-423a-be5f-b592b5d5d61c"
- string
* - ``path``
- Full path to the transfer, e.g.
"/var/archivematica/sharedDirectory/watchedDirectories/SIPCreation/
completedTransfers/imgs-52dd0c01-e803-423a-be5f-b592b5d5d61c"
- string
* - ``message``
- "Fetched status from <transfer UUID> successfully."
- string
* - ``type``
- "transfer"
- string
* - ``uuid``
- UUID of the transfer, e.g. "52dd0c01-e803-423a-be5f-b592b5d5d61c"
- string

.. note::

Expand Down Expand Up @@ -321,28 +315,27 @@ Status

Response definitions:

================== ==========================================================

``status`` One of FAILED, REJECTED, USER_INPUT, COMPLETE or PROCESSING.

``name`` Name of the SIP, e.g. "imgs".

``microservices`` Name of the current microservice

``directory`` Name of the directory, e.g. "imgs-52dd0c01-e803-423a-be5f
\ -b592b5d5d61c"

``path`` Full path to the transfer, e.g. "/var/archivematica/shared
Directory/currentlyProcessing/imgs-52dd0c01-e803-423a-be5f-
/ b592b5d5d61c/".

``message`` "Fetched status for <SIP UUID> successfully."

``type`` "SIP"

``uuid`` UUID of the SIP, e.g. "52dd0c01-e803-423a-be5f-b592b5d61c".

================== ==========================================================
.. list-table::

* - ``status``
- One of FAILED, REJECTED, USER_INPUT, COMPLETE or PROCESSING.
* - ``name``
- Name of the SIP, e.g. "imgs".
* - ``microservices``
- Name of the current microservice
* - ``directory``
- Name of the directory,
e.g. "imgs-52dd0c01-e803-423a-be5f-b592b5d5d61c"
* - ``path``
- Full path to the transfer, e.g.
"/var/archivematica/sharedDirectory/
currentlyProcessing/imgs-52dd0c01-e803-423a-be5f/b592b5d5d61c/".
* - ``message``
- "Fetched status for <SIP UUID> successfully."
* - ``type``
- "SIP"
* - ``uuid``
- UUID of the SIP, e.g. "52dd0c01-e803-423a-be5f-b592b5d61c".

Example request:

Expand Down
4 changes: 2 additions & 2 deletions dev-manual/api/api-reference-storage-service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@ Move files to this location

=========== ================================= ===============================

``POST`` **/api/v2/location/<UUID>/** *Move files to specified pipe-
line location.*
``POST`` **/api/v2/location/<UUID>/** *Move files to
specified pipeline location.*

=========== ================================= ===============================

Expand Down
8 changes: 4 additions & 4 deletions getting-started/troubleshooting/error-handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ Other common error behaviours
Below is a list of common errors that, like normalization, will produce an
error report but will not fail the transfer.

#. Characterize and extract metadata: if FITS processing fails, the micro-
service will fail and the transfer will continue processing. Similarly, if
a tool within FITS fails, like JHOVE, you will see the pink error bar but
be able to continue processing.
#. Characterize and extract metadata: if FITS processing fails, the
micro-service will fail and the transfer will continue processing.
Similarly, if a tool within FITS fails, like JHOVE, you will see the pink
error bar but be able to continue processing.

#. Remove thumbs.db file: if Archivematica is unable to remove a thumbs.db
file, the microservice will fail and the SIP will continue processing.
Expand Down
13 changes: 7 additions & 6 deletions getting-started/troubleshooting/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ FAQ

#. **What does Archivematica do?**

The main purpose of Archivematica is to create standards-based, self-
documenting and system-independent archival information packages (AIPs). An
AIP includes a METS XML file with a robust PREMIS preservation metadata
implementation, and is packaged in the Library of Congress BagIt format,
which includes file manifests and information about the AIP contents. The
physical and logical structure of the AIP is described in the METS structMap.
The main purpose of Archivematica is to create standards-based,
self-documenting and system-independent archival information packages
(AIPs). An AIP includes a METS XML file with a robust PREMIS preservation
metadata implementation, and is packaged in the Library of Congress BagIt
format, which includes file manifests and information about the AIP
contents. The physical and logical structure of the AIP is described
in the METS structMap.

#. **Does Archivematica perform fixity checks?**

Expand Down
7 changes: 4 additions & 3 deletions user-manual/access/access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fields are mapped to the ISAD(G) template in AtoM:
=========== ===========================================
Dublin Core ISAD(G)
=========== ===========================================
title title
title title
identifier identifier
creator name of creator
date date of creation
Expand Down Expand Up @@ -126,8 +126,9 @@ is by providing the slug during the Upload DIP microservice.

2. A dialogue box will appear. Enter the permalink of the description in the
dialogue box. For example, if the URL of the archival description is
http://myAtoM.ca/my-target-description, enter ``my-target-
description``. See ``slug`` in the `AtoM glossary`_ for more information.
http://myAtoM.ca/my-target-description, enter
``my-target-description``. See ``slug`` in the `AtoM glossary`_ for more
information.

.. image:: images/atom-dip-upload.*
:align: center
Expand Down
4 changes: 2 additions & 2 deletions user-manual/administer/dashboard-admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ Options:
#. **1 - fastest compression** - the AIP will be compressed as quickly as possible.
#. **3 - fast compression** - a larger AIP that will be compressed quickly.
#. **5 - normal compression** - the compression tool will strike a balance
between speed and compression to make a moderately-sized, moderately-
compressed AIP.*
between speed and compression to make a moderately-sized,
moderately-compressed AIP.*
#. **7 - maximum compression** - a smaller AIP that takes longer to compress.
#. **9 - ultra compression** - the smallest possible AIP.

Expand Down
16 changes: 8 additions & 8 deletions user-manual/archival-storage/archival-storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Archival Storage tab consists of a table showing all of the stored Archival
Information Packages (AIPs) for the Archivematica instance. There is a search
interface at the top of the page where you can construct simple or boolean
queries to find AIPs or individual items in storage. At the top of the table is
the total size of the stored AIPs and the number of indexed files. By default,
the total size of the stored AIPs and the number of indexed files. By default,
the table lists the AIP's name, UUID, size on disk, date that the AIP was
created, it's status, and whether or not the AIP is encrypted.

Expand Down Expand Up @@ -57,7 +57,7 @@ documentation.
Browsing the AIP store
-----------------------

At the bottom of the Browse Archival Storage table is the **Select columns**
At the bottom of the Browse Archival Storage table is the **Select columns**
icon. Click on it to select which columns will be visible in the Archival
Storage table. The blue row indicates that a column is currently visible.
A white row indicates that the column is currently not visible.
Expand All @@ -67,7 +67,7 @@ A white row indicates that the column is currently not visible.
:width: 80%
:alt: The Select Columns options on the Archival Storage tab

Click on a blue or white row to toggle this value for each column. In the
Click on a blue or white row to toggle this value for each column. In the
example below, all the available columns are selected. Note that your column
selection choices will persist between your user sessions and apply to other
users of the same Archivematica pipeline.
Expand All @@ -77,7 +77,7 @@ users of the same Archivematica pipeline.
:width: 80%
:alt: The Archival Storage tab with all columns selected

You can click on the column headers to sort in ascending or descending order.
You can click on the column headers to sort in ascending or descending order.
An up or down caret (arrow point) will appear. (e.g. see **File count** below).

.. image:: images/archival-storage-sorted-column.*
Expand All @@ -101,7 +101,7 @@ The **Select columns** option is also available on the **Show files?** table.
:width: 80%
:alt: Selecting columns for the Show Files view

Column sorting is also available in the **Show files?** table (e.g. see **AIP**
Column sorting is also available in the **Show files?** table (e.g. see **AIP**
column below).

.. image:: images/archival-storage-show-files-sort.*
Expand All @@ -119,7 +119,7 @@ Downloading all AIP metadata in a CSV file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
All the values displayed in all of the columns available on the Browse Archival
Storage tab can be downloaded to a CSV (Comma Separated Values) file. This CSV
file can be used for more detailed analysis and filtering of AIP information,
file can be used for more detailed analysis and filtering of AIP information,
beyond the Search capabilities described below. The CSV data can also be used as
input to a reporting or charting tool.

Expand All @@ -133,7 +133,7 @@ storage** table.

You will be prompted for a place to store the CSV file. The CSV data will
include values for all the columns, regardless of which ones are currently
selected. It will also include the metadata for each AIP in archival storage,
selected. It will also include the metadata for each AIP in archival storage,
regardless of which ones are currently being displayed on the Archival Storage
tab.

Expand Down Expand Up @@ -176,7 +176,7 @@ You can also define your search string as a keyword, phrase, or date range:
* **Keyword**: by default, the Keyword option treats the search string as a
Boolean OR search - that is, every word is treated as a separate value
connected by OR operators. For example, searching for ``2015-Annual-Report``
actually searches for "2015 OR Annual OR Report", so the results contain
actually searches for "2015 OR Annual OR Report", so the results contain
anything named with "2015" or "Annual" or "Report". To search for a specific
strings, add quotation marks around the string - ``"2015-Annual-Report"``.
* **Phrase**: the Phrase option allows for more flexibility while searching. You
Expand Down

0 comments on commit 8baced3

Please sign in to comment.