Skip to main content

Scientific project path utilities (find, split, symlink, versioning)

Project description

scitex-path

PyPI Python Tests Install Test Coverage Docs License: AGPL v3

SciTeX

Scientific project path utilities — find files / git root, symlink mgmt, version increment.

Full Documentation · pip install scitex-path


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 helpersmk_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)

Part of SciTeX

scitex-path is part of SciTeX.

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. 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.


SciTeX

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

scitex_path-0.1.5.tar.gz (412.5 kB view details)

Uploaded Source

Built Distribution

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

scitex_path-0.1.5-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file scitex_path-0.1.5.tar.gz.

File metadata

  • Download URL: scitex_path-0.1.5.tar.gz
  • Upload date:
  • Size: 412.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_path-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6b3a5e5a71641f067d10f489fb452ddd272286c3aa5574c27700678ea2f9b6f5
MD5 afd4ace256df94259b3f86c9de3ccdb4
BLAKE2b-256 c7ebfffdcf4d5f72e3ad4e21e8f0642733513429a5d19426777f473129f02f61

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_path-0.1.5.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-path

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_path-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: scitex_path-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_path-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d5dbbc786ad9a234a98dcabe80bc05eaccfd0a3bc22d4ab364e514c1e0e6f198
MD5 1000ba999214c5cb68f5dde38574ea04
BLAKE2b-256 e33c43a8466ed9845d025e78b880ccb7205c2f32bb94efac6ba2a5083c254996

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_path-0.1.5-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-path

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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