Skip to main content

B.I.F.U. - simple command runner and repository guardian

Project description

B.I.F.U.

Description

B.I.F.U. was created to help me remember to do some steps before committing to the repository.

Yeah... probably there are many others tools which can do it for you instead of this one ( more-less, i.e. pre-commit ) so maybe it's worth to try "pro" solution :)

B.I.F.U. will let you (only):

  • automamically/manually run your defined commands which should be executed before commiting or pushing to git repository (using git hooks)
  • secure selected branches before commiting (master, main or some productions or "closed" once)
  • [TODO] rebase all new commits to one before pushing to remote repository
  • [TODO] use it as a quick-runner (select some of all tasks to run instead of writing long commands with parameters by hand i.e. pytest, flake, mypy etc)
  • [TODO] force installing pre-commits in developer repository by executing command in python test script/library etc.

B.I.F.U doesn't install libraries or additional software in your enviroment.

Instead of that it is using your existing enviroment, so first you need to source your python virtual enviroment and then this tool will work.

Plus sides: instant execution and space saving.

B.I.F.U is short of "Before I F _ _ k Up".

Versioning

B.I.F.U is versioned using Calendar Versioning system:

Calendar Versioning schemas:

or

YY - Short year - 6, 16, 106
MM - Short month - 1, 2 ... 11, 12
DD - Short day - 1, 2 ... 30, 31
Micro - Patch (in case when more than one package is released in one day)

Instalation

To install B.I.F.U. go to your repository and run:

pip install bifu

Initiation

To initiate default config file use command:

$ bifu --init

This command will download B.I.F.U. configuration file .bifu.yml to current directory.

You can change this file as you like and test tasks from downloaded/changed file using next commands.

Remember: If you wish to test tasks from downloaded file you need to install requirements from test section (flake8, pytest, mypy etc).

pre-commit, pre-push installation

$ bifu --install pre-commit
$ bifu --install pre-push

Running all jobs

$ bifu --run pre-commit
$ bifu -r pre-push
$ bifu -r pre-commit -n 0

Running job number X

$ bifu --run pre-commit --number 1
$ bifu -r pre-push -n 3

pre-commit, pre-push uninstallation

$ bifu --uninstall pre-commit
$ bifu --uninstall pre-push

Requirements

To run B.I.F.U. you need to install python in version minimum 3.7 and additional libraries:

PyYAML = "^6.0"
types-PyYAML = '^6.0.3'
pygit2 = "^1.7.2"
munch = "^2.5.0"
requests = "^2.27.1"

Please check pyproject.toml file to see all requirements.

ToDo section

  • List all tasks
  • Create menu to select which task should be executed
  • Force installing pre-commit or pre-push
  • Rebase all new commits to one (auto rebase?)
  • Refactor - use dataclasses instead of munch

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

bifu-22.4.21.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

bifu-22.4.21-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file bifu-22.4.21.tar.gz.

File metadata

  • Download URL: bifu-22.4.21.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.0 Linux/5.10.0-11-amd64

File hashes

Hashes for bifu-22.4.21.tar.gz
Algorithm Hash digest
SHA256 8cbcdcbf8b9c4bf88639681ef77a9fe0d15cf49cf00d81549f6dd9c5d9f35a05
MD5 19b2159b27abdcf4c0f3f578ab286609
BLAKE2b-256 b4532ead26aafb5dc764e77a5ded665f45b45bd758c8f18200fb7c39a335b227

See more details on using hashes here.

File details

Details for the file bifu-22.4.21-py3-none-any.whl.

File metadata

  • Download URL: bifu-22.4.21-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.0 Linux/5.10.0-11-amd64

File hashes

Hashes for bifu-22.4.21-py3-none-any.whl
Algorithm Hash digest
SHA256 33f816832a810ce211013c840a218b3eb7c6ea5d911c6e1831c97e1535c0c246
MD5 e5624cbabb97d8af4170476e5579fc2d
BLAKE2b-256 8ebd4ae8c9c3ed4cb4488d69cd9aaa4bea37d20ca4350e3c73213aad674caee5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page