Skip to main content

A tool to help create directories for data science project

Project description

FileTree

pip install file-tree-ds

Description

Extension of treelib to provide handy utilities for making directories with ML/data science experiments in mind. Two ways of creating trees

  1. 'node view' this has fine control of appending nodes to create a tree
  2. 'product view' this includes list of lists - each list is created in sublevel of element of higher level list (termed product tree). For example if inputting a list of lists [[a,b],[C,D]] we would expect the following tree
root
├── a
│   ├── C
│   └── D
└── b
    ├── C
    └── D

The latter may for example capture different values of tuning parameters that are then organised into a tree hierarchy.

The package can create directories to disk after designing the tree. It is then possible to filter paths based on keywords. The user may wish to, for example, organise higher level directories according to a timestamp.

Additional details

Tree data structure recap:

  1. Each node is assigned a unique identifier. Used when adding a child node to a parent.
  2. Node data -- in this case carrying the name of a folder -- is stored in the node tag property

See https://treelib.readthedocs.io/en/latest/ for more details.

Simple example

The following provides an example of the 'node view'.

from FileTree.FileTree import FileTree

tree = FileTree()
n1 = tree.create_node('node1',identifier='1')
n2 = tree.create_node('node2',identifier='2', parent='1')
n3 = tree.create_node('node3',identifier='3', parent='1')
node = tree.create_node('node4',identifier='4',parent='3')

tree.show()

print(tree.path_search('node2',assert_on_disk=False)) 
print(tree.path_search('node4',assert_on_disk=False))

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

file-tree-ds-1.0.6.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

file_tree_ds-1.0.6-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file file-tree-ds-1.0.6.tar.gz.

File metadata

  • Download URL: file-tree-ds-1.0.6.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for file-tree-ds-1.0.6.tar.gz
Algorithm Hash digest
SHA256 3cb0233c86f600de40a333920829fb751cf9953921c94330269713052a99d910
MD5 4b71a97ab916d4bf3a694173ffc203ea
BLAKE2b-256 f438232bed155993c0495afb0c9adfd5edba13bfd6fcd0fea1ef18b68bdcf247

See more details on using hashes here.

File details

Details for the file file_tree_ds-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: file_tree_ds-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for file_tree_ds-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 534870f2a2a089011b9cef2bb0697533a0d88d2f8709d07115afbbc1e0b3e868
MD5 7ae1b0723071b92a91b1ac80e23acfcd
BLAKE2b-256 22e13bb16e9dd7f79604c0cad162ac04c20f27f81f765f571eaf5a8fe1478c6c

See more details on using hashes here.

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