
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.
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