walkmate

Traverse the file tree.

MIT License

Downloads
125
Stars
2

Walkmate

Traverse the file tree.

Installing

pip install walkmate

Documentation

Documentation and more detailed examples are hosted on Github Pages.

Usage

Given a multi-level directory structure:

.
├── one.py
├── two.py
└── child
    └── three.py

We can list all the files tree:

>>> tree("test/fixtures")
["one.py", "two.py", "child/three.py"]

Filter with a regex:

>>> tree("test/fixtures", r"one\.py$")
["one.py"]

Add exclude patterns too:

>>> tree("test/fixtures", r"\.py$", [r"one\.py$"])
["two.py", "child/three.py"]

Specify the maximum depth:

>>> tree("test/fixtures", depth=1)
["one.py", "two.py"]

Tooling

Dependencies

To install dependencies:

yarn install
pip install .[all]

Tests

To run tests:

thx test

Documentation

To generate the documentation locally:

thx docs

Linters

To run linters:

thx lint

Formatters

To run formatters:

thx format

Contributing

Please read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.

This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.

Bump2version is used to version and tag changes. For example:

bump2version patch

Contributors

Remarks

Lots of love to the open source community!