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.
- If the channel epoch ends before the embargo: No changes are made.
- 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:
- The restriction policy before the embargo is forced to open.
- The restriction policy after the embargo remains closed.
- If the epoch starts before the embargo and the restriction policy is closed, the epoch is split at the embargo date:
- 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 thestationXMLfile 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c31b297d0ec7d2d137199d2face2a224a1cb6c5b09249dd9c6226f32df25e831
|
|
| MD5 |
c468642e09aabb184becd869c0ece57a
|
|
| BLAKE2b-256 |
05e3da6eaeb8280d3d98d1d7d2573ea0331266ee246be62628f250e84f74e7fb
|
Provenance
The following attestation bundles were made for eida_embargo_roller-1.0.0.tar.gz:
Publisher:
publish.yml on EIDA/embargo-roller
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eida_embargo_roller-1.0.0.tar.gz -
Subject digest:
c31b297d0ec7d2d137199d2face2a224a1cb6c5b09249dd9c6226f32df25e831 - Sigstore transparency entry: 171543768
- Sigstore integration time:
-
Permalink:
EIDA/embargo-roller@a08af4b37c565e4030ac883de1af34a4ff8e55ca -
Branch / Tag:
refs/pull/16/merge - Owner: https://github.com/EIDA
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a08af4b37c565e4030ac883de1af34a4ff8e55ca -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file eida_embargo_roller-1.0.0-py3-none-any.whl.
File metadata
- Download URL: eida_embargo_roller-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2bcaf2148c5ec1b04d422b689390c8760d9f53c19bde8010c4f68a7ed147ee2
|
|
| MD5 |
cc2289423f74a292b5689e59620fd2c4
|
|
| BLAKE2b-256 |
a5efe0da8757a747f4f6d28061a490bd7025fb754011840c4e1b8c1a9239076f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eida_embargo_roller-1.0.0-py3-none-any.whl -
Subject digest:
c2bcaf2148c5ec1b04d422b689390c8760d9f53c19bde8010c4f68a7ed147ee2 - Sigstore transparency entry: 171543770
- Sigstore integration time:
-
Permalink:
EIDA/embargo-roller@a08af4b37c565e4030ac883de1af34a4ff8e55ca -
Branch / Tag:
refs/pull/16/merge - Owner: https://github.com/EIDA
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a08af4b37c565e4030ac883de1af34a4ff8e55ca -
Trigger Event:
pull_request
-
Statement type: