Skip to main content

No project description provided

Project description

EIDA Embargo Roller

Description

This program processes a stationXML file and updates channel epochs to reflect the specified embargo start date while maintaining the original structure of the data.

  1. If the channel epoch ends before the embargo: No changes are made.
  2. If the channel epoch ends after the embargo:
    • If the epoch starts before the embargo and the restriction policy is closed, the epoch is split at the embargo date:
      1. The restriction policy before the embargo is forced to open.
      2. The restriction policy after the embargo remains closed.
  3. After processing, the program merges contiguous channels with matching embargo statuses while keeping track of comments.

Additionally, channels are sorted alphabetically by name and chronologically by start date.


Usage

eida_embargo_roller [-i] [-e YYYY-MM-DD] station.xml

Options:

  • -i: Transform the stationXML file in place.
  • -e: Embargo start date. All channels before this date will have their restriction policy changed to open.
  • --allow-partial: If enabled, allows partial restriction statuses instead of converting them to open.

Installation Guide for EIDA Embargo Roller

Recommended: Using UV

1. Install UV

If uv is not already installed, follow this guide.

2. Install and Run the Script

  • On Windows:

    uvx eida-embargo-roller -e YYYY-MM-DD station.xml
    
  • On Linux: (due to different executable naming)

    uvx --from eida-embargo-roller eida_embargo_roller -e YYYY-MM-DD station.xml
    

Alternative: Installing from Source

If you prefer to install manually, you can download and run the script from the repository.

1. Clone the Repository

git clone https://github.com/EIDA/embargo-roller.git
cd embargo-roller

2. Install Dependencies

uv sync

3. Run the Script

uv run eida_embargo_roller -e YYYY-MM-DD station.xml

Rust and Cargo Requirement

Certain dependencies (e.g., pendulum) require Rust and Cargo to build. If you encounter errors such as maturin failing due to missing Cargo, install Rust and Cargo by following the official Rust installation guide.

Testing & Debugging

Running Tests

To run the entire test suite using pytest:

uvx pytest

Example Debug Output:

2024-06-17 12:00:00 - __main__ - DEBUG - Processing Channel: {'code': 'CH1', 'startDate': '2020-01-01T00:00:00'}
2024-06-17 12:00:00 - __main__ - DEBUG - Comparing with Previous Channel: {'code': 'CH1', 'endDate': '2020-06-01T00:00:00'}
2024-06-17 12:00:00 - __main__ - DEBUG - Channels merged successfully.

Notes

  • The program does not modify station metadata beyond embargo-related changes.
  • Sorting is performed alphabetically by channel name and chronologically by start date.
  • Merging ensures only on channels with embargo-related comments .

Project details


Download files

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

Source Distribution

eida_embargo_roller-1.0.0.tar.gz (69.9 kB view details)

Uploaded Source

Built Distribution

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

eida_embargo_roller-1.0.0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file eida_embargo_roller-1.0.0.tar.gz.

File metadata

  • Download URL: eida_embargo_roller-1.0.0.tar.gz
  • Upload date:
  • Size: 69.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for eida_embargo_roller-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c31b297d0ec7d2d137199d2face2a224a1cb6c5b09249dd9c6226f32df25e831
MD5 c468642e09aabb184becd869c0ece57a
BLAKE2b-256 05e3da6eaeb8280d3d98d1d7d2573ea0331266ee246be62628f250e84f74e7fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for eida_embargo_roller-1.0.0.tar.gz:

Publisher: publish.yml on EIDA/embargo-roller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eida_embargo_roller-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for eida_embargo_roller-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2bcaf2148c5ec1b04d422b689390c8760d9f53c19bde8010c4f68a7ed147ee2
MD5 cc2289423f74a292b5689e59620fd2c4
BLAKE2b-256 a5efe0da8757a747f4f6d28061a490bd7025fb754011840c4e1b8c1a9239076f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eida_embargo_roller-1.0.0-py3-none-any.whl:

Publisher: publish.yml on EIDA/embargo-roller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page