Skip to main content

EOSVC (Ersilia Version Control) is a Python-based tool designed to unify code versioning with data and result management by combining Git and S3 workflows around the main branch.

Project description

EOSVC (Ersilia Version Control)

EOSVC is a small CLI that combines:

  • Git for code (always on main)
  • S3 for large artifacts

It supports both standard repos (eg. ersilia-analysis-template which has data/outputs) and model repos (model artifacts only).


What EOSVC stores where

Standard repos

Artifacts are synchronized under the S3 prefix equal to the repo name:

  • data/
  • output/
  • model/checkpoints/ and model/framework/fit

So a repo named ersilia-repo maps to:

  • s3://<bucket>/ersilia-repo/data/...
  • s3://<bucket>/ersilia-repo/output/...
  • s3://<bucket>/ersilia-repo/model/<checkpoints or framework/fit>/...

Model repos

If the repo is a model repo, EOSVC only manages:

  • model/checkpoints/
  • model/framework/

Mapping example (my-model-repo):

  • s3://<bucket>/my-model-repo/model/checkpoints/...
  • s3://<bucket>/my-model-repo/model/framework/git/...

In model repos, EOSVC refuses operations on data/, output/


Buckets and access

Buckets:

  • Public bucket: eosvc-public
  • Private bucket: eosvc-private

Access rules intended by design:

  • Read from eosvc-public works without AWS credentials (unsigned S3 client).
  • Write to any bucket requires AWS credentials (env vars only).
  • Read from eosvc-private requires AWS credentials.

Note: For “public read without credentials” to actually work, the eosvc-public bucket policy must allow s3:GetObject (and if you want EOSVC view to work unauthenticated, also allow constrained s3:ListBucket with the expected prefixes).


Installation

pip install -e .
eosvc --help

Credentials (env vars only)

EOSVC will not read AWS credentials from:

  • ~/.aws/credentials
  • ~/.aws/config
  • AWS_PROFILE
  • EC2 metadata

It only reads from environment variables.

Option A (standard AWS env vars)

export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."

access.json (required after clone)

EOSVC requires an access.json at the repo root for all commands except clone.

Standard repo access.json

{
  "data": "public",
  "output": "private"
}

Valid values are: "public" or "private".

Model repo access.json

{
  "model": "public"
}

If access.json is missing during clone, EOSVC will do a git-only clone and refuse all other operations until you add access.json.


Clone behavior with mixed access

When cloning a standard repo:

  • If both data and output are private: EOSVC requires credentials.
  • If one is private and you have no credentials: EOSVC will still proceed and download the public part, skipping the private part.

Examples:

  • data=public, output=private with no creds → downloads data/ only.
  • data=private, output=public with no creds → downloads output dirs only.
  • data=private, output=private with no creds → fails.

For model repos:

  • model=private requires credentials.

Commands

Clone

eosvc clone ersilia-repo

Options:

eosvc clone ersilia-repo --org ersilia-os
eosvc clone ersilia-repo --dest /path/to/folder

Pull (git + refresh artifacts)

cd ersilia-repo
eosvc pull

This will:

  • git pull --rebase origin/main
  • delete existing managed artifact dirs locally
  • re-download from S3

Use -y to skip confirmation:

eosvc pull -y

Push (requires clean git)

cd ersilia-repo
git add .
# Also you may have some data or checkpoint change which will be uploaded to S3 storage
git commit -m "Your commit message"
eosvc push

eosvc push will fail if:

  • your working tree is dirty (git status --porcelain not empty)
  • you do not have credentials in env vars

Download a path

eosvc download --path data/processed/file.csv
eosvc download --path output/
eosvc download --path model/checkpoints/

Upload a path (requires creds)

eosvc upload --path output/some_folder
eosvc upload --path model/checkpoints/ckpt.pt

View S3 tree

eosvc view
eosvc view --path data
eosvc view --path model

Quick Test

  • Set the env variable values and
cd tests
chmod +x test.sh
./test.sh

Access lock (no public/private migration)

EOSVC creates a local lock file:

  • .eosvc/access.lock.json

If you later change access.json (e.g., publicprivate), EOSVC will refuse to run.

To override (not recommended), you must delete the lock file manually:

rm .eosvc/access.lock.json

Common troubleshooting (Might be caused by policy)

“AccessDenied” when downloading from eosvc-public without creds

Your bucket policy probably does not allow anonymous ListBucket / GetObject for the prefixes EOSVC uses.

If you want unauthenticated download to work:

  • allow s3:GetObject on arn:aws:s3:::eosvc-public/*

If you want unauthenticated view or directory downloads to work:

  • also allow s3:ListBucket on arn:aws:s3:::eosvc-public
  • restrict it using s3:prefix conditions matching your repo layout

“AWS credentials required (env vars only)”

Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (and optional session token) in your shell environment.

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

eosvc-0.1.2.tar.gz (49.6 kB view details)

Uploaded Source

Built Distribution

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

eosvc-0.1.2-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file eosvc-0.1.2.tar.gz.

File metadata

  • Download URL: eosvc-0.1.2.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for eosvc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8acba90fcd5467c94d95545bc13f0f4e80918e1b192237332d42e6546d0b31f2
MD5 19ff026f4978652f20ac881052b30661
BLAKE2b-256 f6ab559715504471c78ff301026297fa063925656059e35a998b74d6755b2df2

See more details on using hashes here.

File details

Details for the file eosvc-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: eosvc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for eosvc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f26ec8c9d21fc2c5913ad862597347f6e47f78fcec75fbecff0444845882c563
MD5 9477f690e422a766f6d05ca4b6051b97
BLAKE2b-256 54c3320e77801a4d5254df544b72b0cf1b33e1af2d61f2d7b00d75bad6781403

See more details on using hashes here.

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