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
Ersilia Version Control
eosvc is a small CLI for syncing large artifacts to S3, while your code remains in Git. It uploads and downloads with live progress, shows a colored local ↔ remote diff (view), and can delete remote artifacts with explicit, guarded confirmation.
eosvc supports two repo types (detected from access.json):
- Standard repos: manage
data/andoutput/ - Model repos: manage
model/checkpoints/andmodel/framework/fit/
The tool does not manage Git operations. Use git directly for code workflows.
Quick Start
Installation
Clone the repository and install the package (in editable mode -e):
git clone https://github.com/ersilia-os/eosvc.git
cd eosvc
pip install -e .
Verify that the CLI is available:
eosvc --help
AWS Credentials Setup
1. Create an AWS Access Key
Create an access key in AWS (IAM) for a user or role with permissions to access the target S3 bucket.
You will need:
- Access Key ID
- Secret Access Key
- Session Token (only if using temporary credentials)
- AWS Region (example:
eu-central-2)
2. Configure EOSVC
Run the following command and replace the placeholders with your credentials:
eosvc config \
--access-key-id "..." \
--secret-access-key "..." \
--session-token "..." \
--region "eu-central-2"
Access Rules Configuration (access.json)
Create or edit an access.json file in your working directory to define which folders are uploaded to S3 and their access level.
Example
{
"data": "public",
"output": "private"
}
- Files inside the
data/folder will be uploaded with public access. - Files inside the
output/folder will be uploaded with private access.
Git Ignore (Recommended)
If you are working inside a git repository, prevent folders specified in access.json from being committed by adding them to .gitignore:
data/
output/
Upload Data
Upload data from a local directory to S3:
eosvc upload --path <path-to-data-to-upload>
Download Data
Download data from S3 into a local directory:
eosvc download --path <path-to-data-to-download>
upload and download show live progress: a Rich progress bar (with size, speed and ETA) when run in a terminal, and one line per file when output is piped or redirected.
View Differences
Compare your local working tree against S3 and see exactly what is in sync, modified, local-only, or remote-only:
eosvc view
eosvc view --path data
Delete Remote Data
Remove artifacts from S3 (this only affects the remote copy — your local files are never touched):
eosvc delete --path <path-to-delete-remotely>
Technical Details
What eosvc stores where
eosvc syncs artifacts under an S3 prefix equal to the repo name.
By default, the repo name is the local folder name (repo directory base name).
If your folder name differs from the remote repo/S3 prefix, set:
export EVC_REPO_NAME="my-actual-repo-name"
Standard repos
Managed roots:
data/output/
S3 mapping for repo ersilia-repo:
s3://<bucket>/ersilia-repo/data/...s3://<bucket>/ersilia-repo/output/...
Model repos
Managed roots:
model/checkpoints/model/framework/fit/
Accepted path aliases for convenience:
checkpoints/...→model/checkpoints/...fit/...→model/framework/fit/...
S3 mapping for repo my-model-repo:
s3://<bucket>/my-model-repo/model/checkpoints/...s3://<bucket>/my-model-repo/model/framework/fit/...
In model repos, eosvc refuses operations on data/ and output/.
Buckets and access
Buckets:
| Bucket | Used by | Access |
|---|---|---|
eosvc-public |
Standard repos (data, output) |
Public |
eosvc-private |
Standard repos (data, output) |
Private |
eosvc-models-public |
Model repos (checkpoints, fit) |
Public |
eosvc-models-private |
Model repos (checkpoints, fit) |
Private |
Rules:
- Read from
eosvc-publicoreosvc-models-publicmay work without AWS credentials (unsigned S3 client). - Read from
eosvc-privateoreosvc-models-privaterequires AWS credentials. - Any upload or delete requires AWS credentials, regardless of bucket. Deleting also requires
s3:DeleteObjecton the target bucket.
Note: For unauthenticated reads to work, the public bucket policy must allow
s3:GetObject. For unauthenticatedviewto work, it must also allows3:ListBucketconstrained to the relevant prefixes.
Credentials
EOSVC resolves credentials in this order:
-
.envfiles (loaded withpython-dotenv) from:<repo>/.config/.envand<repo>/.config/eosvc/.env./.config/.envand./.config/eosvc/.env~/.eosvc/.config(written byeosvc config)<repo>/.envand./.env
-
AWS default credential chain (environment variables and/or
~/.aws/*if present) -
Falls back to anonymous — only valid for reads from public buckets
Option A: environment variables (standard AWS)
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_SESSION_TOKEN="..." # optional
export AWS_REGION="eu-central-2" # optional
Option B: EOSVC config (writes ~/.eosvc/.config)
eosvc provides a config command to store credentials in:
~/.eosvc/.config(permissions set to600when possible)
eosvc config \
--access-key-id "..." \
--secret-access-key "..." \
--session-token "..." \
--region "eu-central-2"
This is similar in spirit to aws configure, but EOSVC writes a .env file and loads it alongside other sources.
Option C: local .env files
Create .env in the repo (or current directory):
AWS_ACCESS_KEY_ID="..."
AWS_SECRET_ACCESS_KEY="..."
AWS_SESSION_TOKEN="..." # optional
AWS_REGION="eu-central-2" # optional
The access.json file (required)
eosvc requires an access.json at the repo root. The tool identifies the repo root by searching upward for access.json starting from the current directory.
Standard repo access.json
{
"data": "public",
"output": "private"
}
Model repo access.json
{
"checkpoints": "public",
"fit": "public"
}
Valid values are: "public" or "private".
Commands
config
Write AWS credentials to ~/.eosvc/.config:
eosvc config --access-key-id "..." --secret-access-key "..."
Optional flags:
eosvc config \
--access-key-id "..." \
--secret-access-key "..." \
--session-token "..." \
--region "eu-central-2" \
--default-region "eu-central-2"
view (local ↔ remote diff)
view compares your local working tree against S3 (by file size) and prints a colored, merged tree+table per managed category, with columns Path / Status / Local / Remote / Uploaded:
eosvc view
eosvc view --path data
eosvc view --path output
eosvc view --path model/checkpoints
eosvc view --path model/framework/fit
eosvc view --max-depth 1
Each file is classified by status (shown in the legend):
| Status | Meaning |
|---|---|
= both (same size) |
present locally and remotely with the same size |
~ both (modified) |
present in both, sizes differ |
+ local only |
present locally only (would be uploaded) |
- remote only |
present in S3 only (would be downloaded) |
Additional cues to make exploration fast:
- a per-category header with a sync dot (green = everything in sync, yellow = differences), the file count, and total local/remote sizes — with size units color-graded by magnitude (
B→KB→MB→GB→TB); - per-folder rollups on directory rows (e.g.
1+ 1- 2~ 3=plus the folder's byte totals); - a grand summary line across all categories (
Summary: N differ · M same size across K categories).
Use --max-depth N to collapse folders deeper than N into a single rollup row for a quick overview.
download
Download a file or folder from S3 into your repo:
eosvc download --path data/processed/file.csv
eosvc download --path output/
eosvc download --path model/checkpoints/
eosvc download --path model/framework/fit/
upload
Upload a file or folder to S3 (requires credentials):
eosvc upload --path output/some_folder
eosvc upload --path data/test
eosvc upload --path model/checkpoints/test-run
eosvc upload --path model/framework/fit/test-fit
delete
Delete a file or folder from S3 (remote only — your local files are never touched). This is a destructive action, so delete is deliberately careful:
eosvc delete --path data/old_file.csv
eosvc delete --path data
eosvc delete --path . # all managed artifacts
Before anything is removed, delete:
- prints a red preview of exactly which remote objects (and total size) will be deleted;
- shows a destructive-action warning — these artifacts are shared, so coordinate with your teammates first, and remember only the remote copy is affected;
- requires a typed confirmation — you type the path for a subpath delete, or the repository name for
eosvc delete --path ..
Flags:
--yes— skip the interactive confirmation (the warning is still shown). Required for non-interactive/scripted use; without it,deleterefuses to run when there is no terminal.--max-depth N— limit the depth of the preview tree (deeper folders are collapsed to a rollup).
delete always requires AWS credentials and s3:DeleteObject on the target bucket, regardless of whether the bucket is public or private.
Access lock (no public/private migration)
eosvc creates a local lock file:
.eosvc/access.lock.json
If you later change access.json (e.g., public → private), eosvc will refuse to run.
To override (not recommended), delete the lock file manually:
rm .eosvc/access.lock.json
About the Ersilia Open Source Initiative
The Ersilia Open Source Initiative is a tech-nonprofit organization fueling sustainable research in the Global South. Ersilia's main asset is the Ersilia Model Hub, an open-source repository of AI/ML models for antimicrobial drug discovery.
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
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 eosvc-1.2.0.tar.gz.
File metadata
- Download URL: eosvc-1.2.0.tar.gz
- Upload date:
- Size: 63.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fcaf129d5d245a7357ec2d40232da223663f4d2468d7d39520b6c65227b01f6
|
|
| MD5 |
765106536393bb81c41f9e47f7c8c6e3
|
|
| BLAKE2b-256 |
d6de1907069c642fa7f6b4be95a0e6c30400c865a339d9833f28923a2ccb5b9e
|
File details
Details for the file eosvc-1.2.0-py3-none-any.whl.
File metadata
- Download URL: eosvc-1.2.0-py3-none-any.whl
- Upload date:
- Size: 49.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b806ecfd64b80541f95c7acb673aca7543a2eb4bbdb16ca157f7f72b05dcaa
|
|
| MD5 |
2a0d6160f71494bd9d85016785ee19be
|
|
| BLAKE2b-256 |
0c0312c1de90077f36e2819299fa29e439f4d0d6da43088f554e2ba685ca7171
|