arcpub

Find the package here: https://gitlab.plantmicrobe.de/i01-private/arcpub/-/tree/main

Arcpub converts Annotated Reseach Context (ARC) metadata to metadata formats of different data repostitories. Currently supported formats are:

Installation

  1. Clone the repository:
git clone <REPO-URL>
cd arcpub

Installation via uv:

uv tool install .

Or if you want to to hack on it:

uv tool install --editable .

It’s recommended to use uv as it manages setting up of a virtual

environment, installation of the correct Python interpreter and handling of

dependencies all automatically.

You can find installation instructions for uv ifself in their

official documentation.

Installation with pip

If you prefer, you can of course also just use pip to install arcpub. Depending on your operating system, you are required to create a virtual environment. This can be done with

python -m venv <ENVIRONMANT-NAME>

where you can choose the environment’s name yourself. Depending on your Python installation it is necessary to change python to python3 in the above command. You can activate the environment with

source <ENVIRONMANT-NAME>/bin/activate

when you are using bash/zsh. Or via

# cmd.exe
.<ENVIRONMANT-NAME>Scriptsactivate.bat
# PowerShell
.<ENVIRONMANT-NAME>ScriptsActivate.ps1

on windows. You can find the usage with other shells and more information about virtual environments in the official documentation.

You can then install arcpub by executing

pip install .

in the project root, i.e., the directory where the pyproject.toml file is located. Depending on your Python installation it is necessary to change pip to pip3 in the above command.

When you installed inside a virtual environment, the arcpub command

will only be available when this virtual environment is active.

Usage

CLI

After installation you have access to the arcpub command. You can simply provide an ARC as a positional argument and specify the pulication target with the --target option. For example, to create a JSON file with metadata for publishing to FDAT:

arcpub --target fdat <PATH-TO-ARC-DIRECTORY>

This will create the JSON file and additionally a ZIP archive of your ARC with usage of the --zip option. If you want only want to check how the metadata file would look like, you can use the --dry-run option which produces no files but only prints the conversion result to stdout.

Interactive Web UI

You can also run arcpub interactively via

arcpub --interactive

This will run a web server that is reachable at http://localhost:8000 where you can choose your target format and subsequently upload your ARC of which the metadata then gets converted.

For all availabe options run

arcpub --help

Mapping of metadata fields

ARC to FDAT

ARC (isa.investigation.xlsx) FDAT (Invenio)
INVESTIGATION
Investigation Title metadata.title
Investigation Public Release Date metadata.publication_date
Investigation Description metadata.description
INVESTIGATOIN PUBLICATIONS
Investigation Publication PubMed ID metadata.related_identifiers.identifier
Investigation Publication DOI metadata.related_identifiers.identifier
INVESTIGATION CONTACTS
Investigation Person Last Name, Investigation Person First Name Investigation Person Mid Initials metadata.creators.person_or_org.name
Investigation Person Person First Name Investigation Person Mid Initials metadata.creators.person_or_org.given_name
Investigation Person Person Last Name metadata.creators.person_or_org.familiy_name
Investigation Person Afflilication metadata.creators.affliations
Investigation Person Roles metadata.creators.role
Comment[ORCID] metadata.creators.person_or_org.identifiers

Additional:

  • The name of the generated JSON file will be the name of the ARC directory with the ‘.json’ extension
  • metadata.related_idetifier.scheme -> doi for DOI and pmid for PMID
  • metadata.related_idetifier.relation_type.id -> issupplementedby for DOI and PMID
  • metadata.related_idetifier.resource_type.id -> publication-article

ARC to MediaTUM

ARC (isa.investigation.xlsx) mediaTUM (form fields)
INVESTIGATION
Investigation Title Title
Investigation Public Release Date
Investigation Description Description
INVESTIGATION CONTACTS
Investigation Person Last Name, Investigation Person First Name Investigation Person Mid Initials Authors (first author = ‘Corresponding Author’)
Investigation Person Person First Name Investigation Person Mid Initials
Investigation Person Person Last Name
Investigation Person Afflilication
Investigation Person Roles
Comment[ORCID]

Additional:

  • ‘Subject Areas’: ‘BIO’ gets checked
  • ‘Number of Files’ gets filled
  • ‘Links’ get filled with ’https://doi.org/Investigation Publication DOI’
  • The name of the generated PDF file will be the name of the ARC directory with the ‘.pdf’ extension
  • Combine descriptions to final description:
    • Description of investigation (in isa.investigation.xlsx)
    • Description of investigation study (in isa.investigation.xlsx)
    • Descriptions for each study (in each isa.study.xlsx)

ARC to LMU

ARC (isa.investigation.xlsx) LMU (XML)
INVESTIGATION
Investigation Title \\\\
Investigation Public Release Date (only year) \\
Investigation Description \\\\
INVESTIGATION CONTACTS
Investigation Person Last Name, Investigation Person First Name Investigation Person Mid Initials \\\\\\
Investigation Person Person First Name Investigation Person Mid Initials \\\\\\
Investigation Person Person Last Name \\\\\\
Investigation Person Afflilication
Investigation Person Roles
Comment[ORCID]

Additional:

  • The name of the generated XML file will be the name of the ARC directory with the ‘.xml’ extension

Dependencies

Name License
fastapi MIT
fastexcel MIT
gunicorn MIT
polars MIT
pydantic MIT
pydantic-xml OSI Approved, Public Domain (Unlicense)
pypdf BSD-3-Clause
python-dateutil Apache Software License, BSD License (Dual License)
rich MIT
uvicorn BSD-3-Clause

Development dependencies

Name License
basedpyright MIT
datamodel-code-generator MIT
pytest MIT
ruff MIT
types-python-dateutil Apache-2.0