Skip to content

coding-stash/pystash

Repository files navigation

PyStash

Description

This is the hidden stash for Python build under the following guidance:

  • The main goal is to learn about algorithms with no much available time.
  • The code is just for personal use (ex. small projects or competition).
  • The code should be easy to read and reasonable documented.
  • The code must be easy to copy and paste to be used in one source file.
  • The code should be hackable and reuse to solve problems in short time.
  • The code can only depend on the standard language features (no external libraries).
  • Ideally the code should be check for correctness and performance.

Installation

git clone git@gitlab.com:hidden-stash/pystash.git
cd pystash
pip install poetry
poetry config virtualenvs.in-project true
poetry install
source .venv/bin/activate

Interactive testing

cat pystash/graph/inputs/deep-first-search.txt | python pystash/graph/recursive_deep_first_search.py

Code testing

Using pytest directly

# Single test file
pytest test/graph/test_deep_first_search.py

# Unit tests only (no stress)
pytest -m "not stress"

# Stress tests in parallel (extended, slow)
pytest --numprocesses=auto -m stress

Full testing using tox

tox             # unit tests with coverage
tox -e stress   # stress tests in parallel
tox -e pylint   # lint
tox -e doc      # build docs

About

The coding stash in python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors