Giter VIP home page Giter VIP logo

scitree's Introduction

Scitree - Like tree, but optimized for science

Scitree - Like tree, but optimized for science

PyPI DOI

In computing, tree is a recursive directory listing command or program that produces a depth-indented listing of files. Wikipedia, 2022.

Scitree is like tree, but different. Instead of sorting content on its name, scitree sorts and highlights given opiniated scientific principles. In this way, you can inspect directory listings more easily.

Scitree is based on scisort, a Python package to sort file paths based on scientific principles.

Philosophy

Philosophy of scisort and scitree:

* Only for scitree.

For more information about the structure, see scisort/scisort/keygen.py.

Installation

Scitree requires Python 3.6 or later.

pip install scitree

Getting started

scitree command

Scittree command on the command line outputs a tree.

scitree
./
├── README.md
├── LICENSE.txt
├── jobs.sh
├── data/
│   └── Bos_2018.csv
├── scripts/
│   ├── get_plot.py
│   ├── merge_descriptives.py
│   └── merge_metrics.py
└── output/
    ├── simulation/
    │   └── Bos_2018/
    │       ├── metrics_sim_Bos_2018_0.json
    │       ├── metrics_sim_Bos_2018_6.json
    │       ├── metrics_sim_Bos_2018_559.json
    │       ├── metrics_sim_Bos_2018_1640.json
    │       ├── metrics_sim_Bos_2018_3154.json
    │       ├── metrics_sim_Bos_2018_3518.json
    │       ├── metrics_sim_Bos_2018_3519.json
    │       ├── metrics_sim_Bos_2018_3721.json
    │       ├── metrics_sim_Bos_2018_4612.json
    │       ├── metrics_sim_Bos_2018_4699.json
    │       ├── metrics_sim_Bos_2018_5673.json
    │       ├── plot_recall_sim_Bos_2018.png
    │       ├── descriptives/
    │       │   ├── wordcloud_Bos_2018.png
    │       │   ├── wordcloud_irrelevant_Bos_2018.png
    │       │   ├── wordcloud_relevant_Bos_2018.png
    │       │   └── data_stats_Bos_2018.json
    │       └── state_files/
    │           ├── sim_Bos_2018_0.asreview
    │           ├── sim_Bos_2018_6.asreview
    │           ├── sim_Bos_2018_559.asreview
    │           ├── sim_Bos_2018_1640.asreview
    │           ├── sim_Bos_2018_3154.asreview
    │           ├── sim_Bos_2018_3518.asreview
    │           ├── sim_Bos_2018_3519.asreview
    │           ├── sim_Bos_2018_3721.asreview
    │           ├── sim_Bos_2018_4612.asreview
    │           ├── sim_Bos_2018_4699.asreview
    │           └── sim_Bos_2018_5673.asreview
    └── tables/
        ├── data_descriptives.csv
        ├── data_descriptives.xlsx
        ├── data_metrics.csv
        └── data_metrics.xlsx

8 directories, 38 files

scitree function for Python

The scitree function in Python prints the tree for the current folder (".").

from scitree import scitree

scitree()

License

MIT

Contact

Feel free to reach out with questions, remarks, and suggestions. The issue tracker is a good starting point. You can also email me at [email protected].

scitree's People

Contributors

j535d165 avatar jteijema avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jteijema

scitree's Issues

support for images, serialized files,

Great project!

  • A lot of scientific projects also have images as output (or input). I would put those in a grey colour.
  • Another important file type is binary or serialized data. For R, that would be .rds, for python that's commonly .pkl. .bin could be another. This could also be under the "data" label.
  • Maybe there's something to be said for config files (.Rproj, .toml, etc.)

In general, would it not be a good idea to have the filetype extension filters depend on something external? I tried scitree out on one of my projects, and for example it did not recognise my .stan files as code.

Issue with setuptools

> scitree
Traceback (most recent call last):
  File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\program files\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "xxx\AppData\Roaming\Python\Python39\Scripts\scitree.exe\__main__.py", line 4, in <module>
  File "xxx\scitree\scitree\__main__.py", line 3, in <module>
    from setuptools_scm import get_version
ModuleNotFoundError: No module named 'setuptools_scm'

Directly after installing I get this error on the first run.

directory count includes git tree?

I have a small project with only a few directories, yet scitree prints the following:

image

perhaps that's because it is including the .git directory and its subdirectories in the count?

Bug with file and directory count.

For version 0.5.2 I get this result:

Successfully installed scitree-0.5.2
0 directories, 0 files
README Data Code

while for verison 0.5.1:

Successfully installed scitree-0.5.1
184 directories, 368 files
README Data Code

0.5.3 and 0.5.4 have the same issue. On windows terminal -> powershell.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.