scitex-path
Scientific project path utilities — find files / git root, symlink mgmt, version increment.
Full Documentation · uv pip install scitex-path[all]
Problem and Solution
| # | Problem | Solution |
|---|---|---|
| 1 | Scripts hard-code /home/user/proj/... paths — break the moment someone else runs them |
find_git_root() + get_spath(filename) — paths auto-resolve to the repo root and the current script's _out/ dir |
| 2 | {script}_out/ convention implemented 33 different ways — inconsistent, error-prone |
Canonical helpers — mk_spath, get_this_path, create_relative_symlink, find_latest standardize the pattern |
Installation
pip install scitex-path
Quick Start
import scitex_path as sp
git_root = sp.find_git_root()
matches = sp.find_file("*.csv", root="/data/project")
1 Interfaces
Python API
import scitex_path as sp
# Find
sp.find_file("*.csv", root="/data/project")
sp.find_dir("results_*", root="/runs")
sp.find_git_root()
sp.find_latest("/results/experiment_v*")
# Path manipulation
sp.split("/home/user/project/data/results.csv")
sp.clean("path/with/../spaces ")
sp.getsize("/path/to/dir")
# Symlinks
sp.symlink("/data/raw", "/project/data/raw")
sp.create_relative_symlink(src, dst)
sp.list_symlinks("/project/data")
sp.fix_broken_symlinks("/project/data")
sp.resolve_symlinks(path)
# Versioning
sp.increment_version("v1.2.3", part="patch") # "v1.2.4"
# Session paths (relative to calling script)
sp.this_path() / sp.get_this_path()
sp.get_spath(filename) / sp.mk_spath(filename)
Architecture
scitex_path/
├── _find.py ← find_file, find_dir, find_git_root, find_latest
├── _split_clean.py ← split, clean, getsize
├── _symlink.py ← symlink, create_relative_symlink,
│ list_symlinks, fix_broken_symlinks, resolve_symlinks
├── _version.py ← increment_version (semver bumps)
└── _session.py ← this_path / get_spath / mk_spath
(caller-script-relative `_out/` dirs)
Demo
flowchart LR
A[script.py] -->|find_git_root| B[repo root]
A -->|mk_spath| C[script_out/]
C --> D[results.csv]
D -->|create_relative_symlink| E[repo/latest.csv]
F[/runs/experiment_v*/] -->|find_latest| G[experiment_v17]
import scitex_path as sp
root = sp.find_git_root() # → /home/me/proj/myrepo
out = sp.mk_spath("results.csv") # → <script>_out/results.csv
sp.create_relative_symlink(out, root / "latest.csv")
print(sp.find_latest("/runs/experiment_v*")) # → /runs/experiment_v17
/home/me/proj/myrepo
/home/me/proj/myrepo/scripts/train_out/results.csv
/runs/experiment_v17
Part of SciTeX
scitex-path is part of SciTeX. Install via
the umbrella with pip install scitex[path] to use as
scitex.path (Python) or scitex path ... (CLI).
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
License
AGPL-3.0 — see LICENSE for details.
Metadata
Release files for scitex-path 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| scitex_path-0.1.7.tar.gz | 8.6 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scitex_path-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 MB
Release files / scitex_path-0.1.7.tar.gz
| Download URL | scitex_path-0.1.7.tar.gz |
|---|---|
| Size | 8.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05b9492ce4f2b66a29441f5c524cfd62e7785ed21dd2da0bc6cd8406cea61c4d
|
|
BLAKE2b-256 checksum How to use checksums |
ac3b5df76e62210b8144ce10bf254135ebb62668f83917969f62d995318ac682
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2026.
Transparency logRelease files / scitex_path-0.1.7-py3-none-any.whl
| Download URL | scitex_path-0.1.7-py3-none-any.whl |
|---|---|
| Size | 8.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed44cb97dbca8149f0f75999ad4b0c9a0fd594839a181a719c6b85862ee1d299
|
|
BLAKE2b-256 checksum How to use checksums |
f28bbfebb632098d8b737ca69bf286bf325c0295dc3386b13068f5f8e4e3704c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2026.
Transparency logSecurity for scitex-path 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for scitex_path-0.1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.