readcon-db 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- readcon_db-0.1.2/.github/workflows/ci.yml +58 -0
- readcon_db-0.1.2/.github/workflows/crates_publish.yml +66 -0
- readcon_db-0.1.2/.github/workflows/pages.yml +43 -0
- readcon_db-0.1.2/.github/workflows/python_wheels.yml +113 -0
- readcon_db-0.1.2/.gitignore +11 -0
- readcon_db-0.1.2/CHANGELOG.md +38 -0
- readcon_db-0.1.2/CITATION.cff +18 -0
- readcon_db-0.1.2/Cargo.lock +998 -0
- readcon_db-0.1.2/Cargo.toml +44 -0
- readcon_db-0.1.2/LICENSE +21 -0
- readcon_db-0.1.2/PKG-INFO +7 -0
- readcon_db-0.1.2/README.md +89 -0
- readcon_db-0.1.2/assets/logo/BRAND.md +18 -0
- readcon_db-0.1.2/assets/logo/readcon-db-logo-512.png +0 -0
- readcon_db-0.1.2/assets/logo/readcon-db-logo-raster.jpg +0 -0
- readcon_db-0.1.2/assets/logo/readcon-db-logo.svg +26 -0
- readcon_db-0.1.2/assets/logo/readcon-db-wordmark.svg +6 -0
- readcon_db-0.1.2/docs/Makefile +9 -0
- readcon_db-0.1.2/docs/_static/logo.svg +26 -0
- readcon_db-0.1.2/docs/design.md +205 -0
- readcon_db-0.1.2/docs/orgmode/cooked-soa.org +36 -0
- readcon_db-0.1.2/docs/orgmode/readme.org +22 -0
- readcon_db-0.1.2/docs/requirements.txt +3 -0
- readcon_db-0.1.2/docs/source/_static/logo.svg +26 -0
- readcon_db-0.1.2/docs/source/api_c.md +42 -0
- readcon_db-0.1.2/docs/source/api_fortran.md +22 -0
- readcon_db-0.1.2/docs/source/api_python.md +35 -0
- readcon_db-0.1.2/docs/source/api_rust.md +35 -0
- readcon_db-0.1.2/docs/source/architecture.md +90 -0
- readcon_db-0.1.2/docs/source/changelog_link.md +3 -0
- readcon_db-0.1.2/docs/source/conf.py +55 -0
- readcon_db-0.1.2/docs/source/index.md +38 -0
- readcon_db-0.1.2/docs/source/install.md +62 -0
- readcon_db-0.1.2/docs/source/overview.md +17 -0
- readcon_db-0.1.2/docs/source/workflows.md +50 -0
- readcon_db-0.1.2/examples/bench_corpus_ops.rs +100 -0
- readcon_db-0.1.2/examples/bench_vs_ase_prep.py +9 -0
- readcon_db-0.1.2/examples/benchmarks/ase_db_bench.json +57 -0
- readcon_db-0.1.2/examples/benchmarks/ase_fair_campaign_1.json +399 -0
- readcon_db-0.1.2/examples/benchmarks/bench_ase_db.py +90 -0
- readcon_db-0.1.2/examples/benchmarks/db_vs_ase_table.md +7 -0
- readcon_db-0.1.2/examples/benchmarks/fair_campaign.py +465 -0
- readcon_db-0.1.2/examples/benchmarks/fair_db_vs_ase_table.md +25 -0
- readcon_db-0.1.2/examples/benchmarks/readcon_db_bench.json +52 -0
- readcon_db-0.1.2/examples/benchmarks/results_merged.json +111 -0
- readcon_db-0.1.2/examples/benchmarks/test_fair_select_parity.py +44 -0
- readcon_db-0.1.2/examples/ingest_select.rs +22 -0
- readcon_db-0.1.2/examples/workflows/metatrain_from_con.md +61 -0
- readcon_db-0.1.2/examples/workflows/options.metatrain.snippet.yaml +13 -0
- readcon_db-0.1.2/fortran/ReadConDb/fpm.toml +6 -0
- readcon_db-0.1.2/fortran/ReadConDb/src/readcon_db.f90 +246 -0
- readcon_db-0.1.2/include/readcon-db.h +129 -0
- readcon_db-0.1.2/pyproject.toml +15 -0
- readcon_db-0.1.2/python/pyproject.toml +15 -0
- readcon_db-0.1.2/src/bin/readcon-db.rs +593 -0
- readcon_db-0.1.2/src/cooked_soa.rs +239 -0
- readcon_db-0.1.2/src/corpus.rs +1892 -0
- readcon_db-0.1.2/src/error.rs +26 -0
- readcon_db-0.1.2/src/export_xyz.rs +65 -0
- readcon_db-0.1.2/src/ffi.rs +712 -0
- readcon_db-0.1.2/src/frame_scalars.rs +73 -0
- readcon_db-0.1.2/src/keys.rs +244 -0
- readcon_db-0.1.2/src/lib.rs +30 -0
- readcon_db-0.1.2/src/python.rs +321 -0
- readcon_db-0.1.2/src/select.rs +152 -0
- readcon_db-0.1.2/src/shard.rs +441 -0
- readcon_db-0.1.2/website/assets/logo.svg +26 -0
- readcon_db-0.1.2/website/assets/wordmark.svg +6 -0
- readcon_db-0.1.2/website/css/site.css +123 -0
- readcon_db-0.1.2/website/index.html +95 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ci-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
CARGO_TERM_COLOR: always
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
test:
|
|
21
|
+
name: cargo test (${{ matrix.os }})
|
|
22
|
+
runs-on: ${{ matrix.os }}
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
os: [ubuntu-latest, macos-latest]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
30
|
+
- name: Cache cargo
|
|
31
|
+
uses: Swatinem/rust-cache@v2
|
|
32
|
+
- name: Test (locked)
|
|
33
|
+
run: cargo test --locked --all-targets
|
|
34
|
+
- name: Clippy
|
|
35
|
+
run: cargo clippy --locked --all-targets -- -D warnings
|
|
36
|
+
- name: Docs
|
|
37
|
+
run: cargo doc --locked --no-deps
|
|
38
|
+
|
|
39
|
+
python:
|
|
40
|
+
name: maturin develop (ubuntu)
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
45
|
+
- uses: actions/setup-python@v5
|
|
46
|
+
with:
|
|
47
|
+
python-version: "3.12"
|
|
48
|
+
- name: Cache cargo
|
|
49
|
+
uses: Swatinem/rust-cache@v2
|
|
50
|
+
- name: Install maturin
|
|
51
|
+
run: pip install maturin
|
|
52
|
+
- name: Build extension
|
|
53
|
+
working-directory: python
|
|
54
|
+
run: maturin build --release --features python --out /tmp/wheels
|
|
55
|
+
- name: Install wheel and smoke import
|
|
56
|
+
run: |
|
|
57
|
+
pip install /tmp/wheels/*.whl
|
|
58
|
+
python -c "import readcon_db; print(readcon_db.__file__)"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Publish readcon-db to crates.io on version tags.
|
|
2
|
+
# Secret: CARGO_REGISTRY_TOKEN (same owner as crates.io publish).
|
|
3
|
+
name: Publish to crates.io
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
tags:
|
|
8
|
+
- 'v*'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
tag:
|
|
12
|
+
description: 'Tag to publish (e.g. v0.1.2); defaults to ref'
|
|
13
|
+
required: false
|
|
14
|
+
type: string
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
publish-crates-io:
|
|
21
|
+
name: Publish to crates.io
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
ref: ${{ inputs.tag || github.ref }}
|
|
27
|
+
|
|
28
|
+
- name: Install Rust toolchain
|
|
29
|
+
uses: dtolnay/rust-toolchain@stable
|
|
30
|
+
|
|
31
|
+
- name: Resolve crate version
|
|
32
|
+
id: check
|
|
33
|
+
run: |
|
|
34
|
+
version="$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)"
|
|
35
|
+
ref_name="${GITHUB_REF_NAME:-}"
|
|
36
|
+
if [ -n "${{ inputs.tag }}" ]; then
|
|
37
|
+
ref_name="${{ inputs.tag }}"
|
|
38
|
+
fi
|
|
39
|
+
if [[ "$ref_name" == v* ]]; then
|
|
40
|
+
tag_ver="${ref_name#v}"
|
|
41
|
+
if [ "$tag_ver" != "$version" ]; then
|
|
42
|
+
echo "tag ${ref_name} does not match Cargo.toml version ${version}" >&2
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
fi
|
|
46
|
+
echo "version=${version}" >> "$GITHUB_OUTPUT"
|
|
47
|
+
if curl -sfL \
|
|
48
|
+
-H "User-Agent: readcon-db-release-check (lode-org)" \
|
|
49
|
+
"https://crates.io/api/v1/crates/readcon-db/${version}" \
|
|
50
|
+
-o /dev/null; then
|
|
51
|
+
echo "already_published=true" >> "$GITHUB_OUTPUT"
|
|
52
|
+
echo "readcon-db ${version} is already published; skipping."
|
|
53
|
+
else
|
|
54
|
+
echo "already_published=false" >> "$GITHUB_OUTPUT"
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
- name: cargo publish
|
|
58
|
+
if: steps.check.outputs.already_published != 'true'
|
|
59
|
+
env:
|
|
60
|
+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
61
|
+
run: |
|
|
62
|
+
if [ -z "${CARGO_REGISTRY_TOKEN:-}" ]; then
|
|
63
|
+
echo "CARGO_REGISTRY_TOKEN secret is empty; set it on the repo." >&2
|
|
64
|
+
exit 1
|
|
65
|
+
fi
|
|
66
|
+
cargo publish --locked
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Pages
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
pages: write
|
|
9
|
+
id-token: write
|
|
10
|
+
concurrency:
|
|
11
|
+
group: pages
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
- name: Sphinx HTML
|
|
22
|
+
run: |
|
|
23
|
+
pip install -r docs/requirements.txt
|
|
24
|
+
sphinx-build -b html docs/source docs/_build/html
|
|
25
|
+
- name: Assemble site
|
|
26
|
+
run: |
|
|
27
|
+
mkdir -p _site
|
|
28
|
+
cp -a website/. _site/
|
|
29
|
+
mkdir -p _site/docs
|
|
30
|
+
cp -a docs/_build/html/. _site/docs/
|
|
31
|
+
cp -a assets _site/assets
|
|
32
|
+
- uses: actions/upload-pages-artifact@v3
|
|
33
|
+
with:
|
|
34
|
+
path: _site
|
|
35
|
+
deploy:
|
|
36
|
+
needs: build
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
environment:
|
|
39
|
+
name: github-pages
|
|
40
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
41
|
+
steps:
|
|
42
|
+
- id: deployment
|
|
43
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
name: Python wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
pull_request:
|
|
8
|
+
paths:
|
|
9
|
+
- 'src/**'
|
|
10
|
+
- 'Cargo.toml'
|
|
11
|
+
- 'Cargo.lock'
|
|
12
|
+
- 'python/**'
|
|
13
|
+
- '.github/workflows/python_wheels.yml'
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: python-wheels-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
env:
|
|
24
|
+
CARGO_HTTP_MULTIPLEXING: "false"
|
|
25
|
+
CARGO_NET_RETRY: "10"
|
|
26
|
+
CARGO_HTTP_TIMEOUT: "120"
|
|
27
|
+
RUSTFLAGS: "-C link-arg=-fuse-ld=bfd"
|
|
28
|
+
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: "cc"
|
|
29
|
+
|
|
30
|
+
jobs:
|
|
31
|
+
sdist:
|
|
32
|
+
name: Build sdist
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
defaults:
|
|
35
|
+
run:
|
|
36
|
+
working-directory: python
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
- name: Build sdist
|
|
40
|
+
uses: PyO3/maturin-action@v1
|
|
41
|
+
with:
|
|
42
|
+
command: sdist
|
|
43
|
+
args: --out ../dist
|
|
44
|
+
working-directory: python
|
|
45
|
+
- name: Validate sdist
|
|
46
|
+
run: pipx run twine check --strict ../dist/*
|
|
47
|
+
working-directory: python
|
|
48
|
+
- uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: sdist
|
|
51
|
+
path: dist/*.tar.gz
|
|
52
|
+
if-no-files-found: error
|
|
53
|
+
|
|
54
|
+
wheels:
|
|
55
|
+
name: Wheel (${{ matrix.os }}, ${{ matrix.target }})
|
|
56
|
+
runs-on: ${{ matrix.os }}
|
|
57
|
+
strategy:
|
|
58
|
+
fail-fast: false
|
|
59
|
+
matrix:
|
|
60
|
+
include:
|
|
61
|
+
- os: ubuntu-latest
|
|
62
|
+
target: x86_64
|
|
63
|
+
- os: macos-14
|
|
64
|
+
target: aarch64
|
|
65
|
+
- os: macos-15
|
|
66
|
+
target: x86_64
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v4
|
|
69
|
+
- uses: actions/setup-python@v5
|
|
70
|
+
with:
|
|
71
|
+
python-version: "3.12"
|
|
72
|
+
- name: Build wheels
|
|
73
|
+
uses: PyO3/maturin-action@v1
|
|
74
|
+
with:
|
|
75
|
+
target: ${{ matrix.target }}
|
|
76
|
+
manylinux: auto
|
|
77
|
+
working-directory: python
|
|
78
|
+
args: --release --out ../dist --features python --find-interpreter
|
|
79
|
+
docker-options: >-
|
|
80
|
+
-e CARGO_HTTP_MULTIPLEXING=false
|
|
81
|
+
-e CARGO_NET_RETRY=10
|
|
82
|
+
-e CARGO_HTTP_TIMEOUT=120
|
|
83
|
+
- name: Validate wheels
|
|
84
|
+
if: matrix.target != 'aarch64' || runner.os != 'Linux'
|
|
85
|
+
run: pipx run twine check --strict dist/*
|
|
86
|
+
- uses: actions/upload-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
|
89
|
+
path: dist/*.whl
|
|
90
|
+
if-no-files-found: error
|
|
91
|
+
|
|
92
|
+
publish:
|
|
93
|
+
name: Publish to PyPI
|
|
94
|
+
needs: [sdist, wheels]
|
|
95
|
+
runs-on: ubuntu-latest
|
|
96
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
97
|
+
environment:
|
|
98
|
+
name: pypi
|
|
99
|
+
url: https://pypi.org/p/readcon-db
|
|
100
|
+
permissions:
|
|
101
|
+
id-token: write
|
|
102
|
+
steps:
|
|
103
|
+
- uses: actions/download-artifact@v4
|
|
104
|
+
with:
|
|
105
|
+
pattern: '{sdist,wheels-*}'
|
|
106
|
+
merge-multiple: true
|
|
107
|
+
path: dist/
|
|
108
|
+
- name: List artifacts
|
|
109
|
+
run: ls -la dist/
|
|
110
|
+
- name: Publish to PyPI
|
|
111
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
112
|
+
with:
|
|
113
|
+
skip-existing: true
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.2 - 2026-06-28
|
|
4
|
+
|
|
5
|
+
### Documentation
|
|
6
|
+
- Install docs reflect crates.io / PyPI / Pages (no path-only wording)
|
|
7
|
+
- Package metadata: homepage and documentation URLs
|
|
8
|
+
|
|
9
|
+
### Continuous integration
|
|
10
|
+
- CI (test, clippy, maturin smoke), crates.io publish workflow, Python wheels + PyPI on tags
|
|
11
|
+
|
|
12
|
+
### Packaging
|
|
13
|
+
- Align `python/pyproject.toml` version with crate **0.1.2**
|
|
14
|
+
|
|
15
|
+
## 0.1.1 - 2026-06-28
|
|
16
|
+
### Features
|
|
17
|
+
- Optional RCSO cooked SoA tier (`frames_soa`) with cook/delete/numeric getters
|
|
18
|
+
- C/Python/CLI/Fortran exposure for cook and positions/forces fast path
|
|
19
|
+
- User docs: `docs/orgmode/cooked-soa.org` (CON authority; RCSO not fully equivalent)
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
- Dual-tier rules in architecture Sphinx summaries and README pointer
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 0.1.0 — 2026-06-27
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- Heed/LMDB `ConCorpus` with trajectory ingest, SoA-agnostic CON text blobs via `readcon-core`
|
|
29
|
+
- Secondary indexes: `idx_natoms`, `idx_symbol`
|
|
30
|
+
- **xxHash3-128** exact content identity: `frame_by_hash` / `hash_by_frame`, `Select::exact_hash`, `find_by_hash`
|
|
31
|
+
- C ABI (`rkrdb_*`) in `cdylib`/`staticlib`; `include/readcon-db.h` with C++ `readcon_db::Corpus`
|
|
32
|
+
- Optional PyO3 module (`--features python`), maturin project under `python/`
|
|
33
|
+
- Fortran `bind(C)` module under `fortran/ReadConDb`
|
|
34
|
+
- Example `ingest_select`
|
|
35
|
+
- **CLI** `readcon-db` (`ingest`, `ingest-dir`, `select`, `dedup-export`, `hash-file`)
|
|
36
|
+
- **`export_extxyz`** / **`ingest_directory`** / **`unique_frame_keys`** for metatrain-style pipelines
|
|
37
|
+
- Workflow docs: `examples/workflows/metatrain_from_con.md` + YAML snippet
|
|
38
|
+
- Sphinx docs, marketing `website/`, logo kit under `assets/logo/`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: "readcon-db: mmap CON corpus store with multi-language bindings"
|
|
3
|
+
message: "If you use readcon-db, please cite it using the metadata below."
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- given-names: Rohit
|
|
7
|
+
family-names: Goswami
|
|
8
|
+
email: rgoswami@ieee.org
|
|
9
|
+
orcid: "https://orcid.org/0000-0002-2393-8056"
|
|
10
|
+
license: MIT
|
|
11
|
+
repository-code: "https://github.com/lode-org/readcon-db"
|
|
12
|
+
version: 0.1.0
|
|
13
|
+
date-released: "2026-06-27"
|
|
14
|
+
keywords:
|
|
15
|
+
- CON
|
|
16
|
+
- LMDB
|
|
17
|
+
- trajectory
|
|
18
|
+
- molecular dynamics
|