Framework to represent structured directories in python as FileTree objects. FileTrees can be read in from simple text files describing the directory structure. This is particularly useful for pipelines with large number of input, output, and intermediate files. It can also be used to visualise the data in structured directories using FSLeyes or file-tree on the command line.
- General documentation: https://open.win.ox.ac.uk/pages/fsl/file-tree/
- FSLeyes documentation on using FileTrees: https://open.win.ox.ac.uk/pages/fsl/fsleyes/fsleyes/userdoc/filetree.html
Setting up local development environment
This package uses uv for project management. You will need to install uv to develop this package.
First clone the repository:
git clone https://git.fmrib.ox.ac.uk/fsl/file-tree.git
Then we can ask uv to set up the local envoriment.
cd file-tree
uv sync
Running tests
Tests are run using the pytest framework.
This will already be available in the uv virtual environment.
uv run pytest src/tests
Compiling documentation
The documentation is build using sphinx.
cd doc
uv run sphinx-build source build
open build/index.html
Contributing
Merge requests with any bug fixes or documentation updates are always welcome.
For new features, please raise an issue to allow for discussion before you spend the time implementing them.
Releasing new versions
- Ensure CHANGELOG.md is up to date.
- All commits can be seen in gitlab by clicking the "Unreleased" link in "CHANGELOG.md"
- Add new header just below "## [Unreleased]" with the new version
- Update the footnotes for both the new version and [Unreleased]
- Edit the version number on
pyproject.toml - Create a new tag for the version number
- Push to gitlab (including tags)
- Check the tagged pipeline to see if it successfully uploaded file-tree to pypi.
- Upload code on conda-forge using their automated release detection.
Running tests
Tests are run using the pytest framework. After installation (pip install pytest) they can be run from the project root as:
pytest src/tests
Metadata
Release files for file-tree 1.6.1
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 | Actions |
|---|---|---|---|---|
| file_tree-1.6.1.tar.gz | 34.0 kB | Without provenance | Details for file_tree-1.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| file_tree-1.6.1-py3-none-any.whl | Python 3 | none | any | Details for file_tree-1.6.1-py3-none-any.whl |
Total release size: 71.0 kB
Release files / file_tree-1.6.1.tar.gz
| Download URL | file_tree-1.6.1.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f46705e9e51f2ac2648ac4ff849207e4574d2ac53e648286242df24c45598db9
|
|
BLAKE2b-256 checksum How to use checksums |
33c6161c43a5d5bad0e162b0597f05ef42ca63e281145dca1acb1dc00ad3566b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.9
|
Release files / file_tree-1.6.1-py3-none-any.whl
| Download URL | file_tree-1.6.1-py3-none-any.whl |
|---|---|
| Size | 37.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b010ed47827005dd9eb1d693759f42a6a9c90bbbc9fb7a4fa5859f7280bcb456
|
|
BLAKE2b-256 checksum How to use checksums |
476865572266ad315ea55391547a9e5a3ef5185a5019f1f5c0be1c935b94d661
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.9
|
Security for file-tree 1.6.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.