Scientific project path utilities (find, split, symlink, versioning)
Project description
scitex-path
Scientific project path utilities for the SciTeX ecosystem.
Provides file/directory finding, path splitting, symlink management, and version incrementing.
Installation
pip install scitex-path
Usage
import scitex_path as sp
# Find files by pattern
matches = sp.find_file("*.csv", root="/data/project")
# Find the nearest git root
git_root = sp.find_git_root()
# Split path into components
parts = sp.split("/home/user/project/data/results.csv")
# Symlink management
sp.symlink("/data/raw", "/project/data/raw")
sp.list_symlinks("/project/data")
sp.fix_broken_symlinks("/project/data")
# Version incrementing
next_ver = sp.increment_version("v1.2.3", part="patch") # "v1.2.4"
latest = sp.find_latest("/results/experiment_v*")
API
| Function | Description |
|---|---|
find_file |
Find files matching a glob pattern |
find_dir |
Find directories matching a glob pattern |
find_git_root |
Locate the nearest .git root |
split |
Split a path into structured components |
symlink |
Create a symlink |
create_relative_symlink |
Create a relative symlink |
list_symlinks |
List symlinks under a directory |
fix_broken_symlinks |
Remove or report broken symlinks |
resolve_symlinks |
Resolve all symlinks to real paths |
increment_version |
Bump a version string |
find_latest |
Find the latest versioned path |
clean |
Clean/normalize a path |
getsize |
Get file/directory size |
get_spath / mk_spath |
Session path helpers |
this_path / get_this_path |
Get the path of the calling script |
License
AGPL-3.0 -- see LICENSE for details.
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(22.8 kB
view details)
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 scitex_path-0.1.0.tar.gz.
File metadata
- Download URL: scitex_path-0.1.0.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc47c8732d7c31b2379022487890d8653afbe3944b0c52d09a3e39cbed547ae7
|
|
| MD5 |
3efe4ae95f170dff98f27fb3c0374d95
|
|
| BLAKE2b-256 |
c5e46a5411ec20a882a1f582ee1ecb3c5e9d62a5fb3ce5c1f8cb0ec4dfb784ad
|
File details
Details for the file scitex_path-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scitex_path-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7569ad4ed7523260b4c7e1a56a6222d4dcdb1e8468ba77ba50aa259c16c0b0f2
|
|
| MD5 |
fb6b031dd1597cefad9e5e98c15e7345
|
|
| BLAKE2b-256 |
e38c7958776f0e49c7276836529318adda5196f883c640e828ddcbe03914f7ee
|