Skip to main content

AMARCORD Logo with Title Text

A Flexible Database for Multi-Dimensional Serial Crystallography

Pipeline Status Badge Test Coverage Badge Latest Release Badge

Documentation: We have extensive documentation in the form of GitLab pages on https://amarcord.pages.desy.de/amarcord/

Source Code: https://gitlab.desy.de/amarcord/amarcord


AMARCORD is a free and open-source database application designed to gather metadata about chemicals, runs and analysis results of serial crystallography (SX) experiments. The software features an easy-to-use, web-based user interface and was used in numerous experiments in order to cope with both the amount of data collected, as well as different experimental groups working during the same beam time. It was further extended not only to collect metadata, but also trigger analysis jobs and ingest the resulting figures of merit, resulting in a complete framework for running an SX experiment.

Python setup

uv

AMARCORD uses uv for managing its dependencies. So either install that and run:

uv venv

to create a venv with all dependencies installed. Running programs is then simply

uv run amarcord-<program-name> <arguments>

Plain pip

Since we have requirements.txt files, as long as you don’t want to add new dependencies, you can just create a virtual environment and activte it to get up and running:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Notes for Microsoft Windows users

We’re using python-magic to determine the type of uploaded files. This depends on libmagic which is not available on Windows. You can either do everything using WSL or you can manually pip install python-magic-bin which solves the issue.

If you manually created your virtual environment, the way to activate it on Windows isn’t

source venv/bin/activate

but rather

source venv/Scripts/activate

this is for idiotic reasons.

How to start a backend server

To start a backend server, you have to create a database first. This isn't done implicitly when starting the web server, since this created problems. It's easy to create one, however, just do this (yes, there are four / in the URL):

python amarcord/cli/upgrade_db_to_latest.py --db-connection-url 'sqlite+aiosqlite:////tmp/test.db'

To start a web server with a “blank”, but usable SQLite database in /tmp/test.db (adapt if you're on Windows), run:

DB_URL='sqlite+aiosqlite:////tmp/test.db' uvicorn --port 5000 amarcord.cli.webserver:app

which will open a web server on port 5000.

You won't see much when you point your browser to http://localhost:5000 though, because we haven't built the front-end yet, and we don't have a prebuilt version of the front-end in the repository. But, read on.

How to build and start the frontend

The frontend is written in Elm. You can download the elm compiler binary at the Install Elm web site.

If you just want to build the necessary files for the frontend, without being an active developer, you can simply navigate to the frontend/ directory and execute the ./build-elm-manually.sh script. It will put all the assets into frontend/output/build, which is the default search path for the web server, which you can run, described above. Then go to http://localhost:5000/index.html in your browser.

To run a live development environment, you need elm-live which, unfortunately, needs node.js. But you can install that really easily on different platforms.

Assuming you’ve got it installed, run:

npm install

To install the dependencies (you can also use Yarn, which might be more performant). Then, start a development server via:

./run-live-dev-env.sh

And point your browser to http://localhost:8000.

Nix

To speed up CI builds and unify dependencies, AMARCORD uses the Nix package manager. It also uses flakes, so enable those in your ~/.config/nix/nix.conf:

experimental-features = nix-command flakes

If you have Nix installed, building the AMARCORD Python package is as simple as

nix build '.#amarcord-python-package'

To build a Docker container:

nix build '.#amarcord-docker-image

To get a development shell with the Python dependencies:

nix develop

To get a development shell with the Elm dependencies:

cd frontend
nix develop '..#frontend'

For the CI build, we have an instance of gitlab-runner on cfeld-vm04 using the shell executor right now.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amarcord-1.5.1.tar.gz (4.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amarcord-1.5.1-py3-none-any.whl (241.5 kB view details)

Uploaded Python 3

File details

Details for the file amarcord-1.5.1.tar.gz.

File metadata

  • Download URL: amarcord-1.5.1.tar.gz
  • Upload date:
  • Size: 4.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.8","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for amarcord-1.5.1.tar.gz
Algorithm Hash digest
SHA256 8817b6e127dec6815087886aa385f2bade48bff4470cb8c07e115c2f49a6d1b3
MD5 e481fd9f831f6b6689893689960386a7
BLAKE2b-256 fd025d5d45d70f71bf2bc526e3087f83aed9befb353f556f304949bed5ad9887

See more details on using hashes here.

File details

Details for the file amarcord-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: amarcord-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 241.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.8","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for amarcord-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b9fce3429d59730606442cbb983a0da22e17eab9c66f0f1f4c6d8870df07ab8
MD5 fdb9c59dd13555bf8995fd9dbe0617e2
BLAKE2b-256 d1e906170500771addd93855ae465e800bc0ba18b561c1703cabf6ffed4ddf58

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.2

2 files

This release

1.5.1 This release

2 files

1.5

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page