Name | bouillon JSON |
Version |
2.9.0
JSON |
| download |
home_page | None |
Summary | Tool for releasing machine learning model and service projects and other fast paced python projects. |
upload_time | 2024-11-29 20:30:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
building
maintenance
utility
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
.. Copyright (c) 2020, Janus Heide.
.. All rights reserved.
..
.. Distributed under the "BSD 3-Clause License", see LICENSE.rst.
Bouillon
========
.. image:: https://github.com/janusheide/bouillon/actions/workflows/unittests.yml/badge.svg
:target: https://github.com/janusheide/bouillon/actions/workflows/unittests.yml
:alt: Unit tests
.. image:: https://img.shields.io/pypi/pyversions/bouillon
:alt: PyPI - Python Version
.. image:: https://img.shields.io/librariesio/github/janusheide/bouillon
:alt: Libraries.io dependency status for GitHub repo
A Tool for releasing machine learning model and service projects and other fast
paced python projects. The base module can also be used as a basis for a custom
cli.
Bouillon contains; a) a project structure, b) a Command Line Interface (CLI)
for releasing etc., that is easy to adapt and, c) a couple of modules that
provides helper functionality if your writing your own cli.
The idea is that you together with your project ship a program that assist the
developers to release the project, and other tedious tasks, helping you to;
* Reduce time spent on repetetive tasks.
* Guareentee a well defined development environement, reducing human error.
* Simplify setup of CI/CD, as the same commands locally and remotely.
Getting Started
---------------
Will pip install packages (a venv is recommended)::
pip install bouillon[standard]
bouillon --help
usage: bouillon [-h]
[-i INFILE]
[--log-level {DEBUG,INFO,WARNING,ERROR,CRITICIAL}]
[--log-file LOG_FILE]
[--dry-run]
{build,clean,release} ...
Bouillon
positional arguments:
{build,clean,release}
available sub commands
build build.
clean clean temp files.
release release me.
options:
-h, --help show this help message and exit
-i INFILE, --infile INFILE
path to input file (default: pyproject.toml)
--log-level {DEBUG,INFO,WARNING,ERROR,CRITICIAL}
set log level. (default: WARNING)
--log-file LOG_FILE set log file. (default: None)
--dry-run perform a dry run, its helpfull to also set the log-level. (default: False)
Print help for the ``release`` command::
bouillon release --help
usage: bouillon release [-h]
[--check-branch]
[--releaseable-branch RELEASEABLE_BRANCH]
[--distribution-dir DISTRIBUTION_DIR]
[--news-files NEWS_FILES [NEWS_FILES ...]]
[--build-steps BUILD_STEPS [BUILD_STEPS ...]]
[--lint-steps LINT_STEPS [LINT_STEPS ...]]
[--test-steps TEST_STEPS [TEST_STEPS ...]]
version
The following checks and actions will be performed:
1. Check that the choosen tag does not already exists.
2. Check that we are releasing from the default_branch.
3. Check that there are no unstaged changes on the current branch.
4. Cleans the distribution folder.
5. Run all linters.
6. Run tests.
7. Opens all news files for editing.
8. Add and commit all news files.
9. Creates the tag.
10. Build the project.
11. Uploads to pypi.
12. Push the commit and tag to the origin.
Note that precedence of settings in decreasing order is as follows:
commandline arguments -> project file (pyproject.toml) -> defaults.
positional arguments:
version release version (e.g. '1.2.3').
options:
-h, --help show this help message and exit
--check-branch check that the branch is clean and up to date with remote. (default: True)
--releaseable-branch RELEASEABLE_BRANCH
branches from which release is allowed ('*' for any branch) (default: main)
--distribution-dir DISTRIBUTION_DIR
distribution directory. (default: dist)
--news-files NEWS_FILES [NEWS_FILES ...]
news files to open for edits. (default: ['NEWS.rst'])
--build-steps BUILD_STEPS [BUILD_STEPS ...]
build steps. (default: [['python', '-m', 'build']])
--lint-steps LINT_STEPS [LINT_STEPS ...]
lint steps. (default: [['brundle'], ['licensecheck']])
--test-steps TEST_STEPS [TEST_STEPS ...]
test steps. (default: [['pytest']])
.. note::
If the upload to pypi fails for any reason the tag will be deleted and the
release commit will be rolled back.
Usage::
bouillon release 0.0.1
Settings
--------
The following settings (with defaults) can be overwritten in ``pyproject.toml``::
[tool.bouillon]
check_branch = true
releaseable_branch = the git default branch
distribution_dir = "dist"
news_files = ["NEWS.rst",]
build_steps = [["python", "-m", "build"],]
lint_steps = [["brundle"],]
test_steps = [["pytest"],]
.. note::
releaseable_branch defaults to the git default branch, but can be set to a
static branch name like "dev" or "*" if all branches are permitted.
Logging
-------
Supports standard log levels; ``DEBUG``, ``INFO``, ``WARNING``, ``ERROR``, ``CRITICAL``, and writing
log to a file.
Set the log level to ``DEBUG``::
bouillon --log-level=DEBUG test
Set the log level to ``DEBUG`` and redirect output from executed commands to
``bar.log``::
bouillon --log-level=DEBUG test >> bar.log
Set the log level to ``DEBUG`` and redirect output from executed commands to
``bar.log`` and log information to ``foo.log``::
bouillon --log-level=DEBUG --log-file=foo.log test >> bar.log
Set the log level to ``DEBUG`` and redirect output from executed commands and
log information to ``foo.log``::
bouillon --log-level=DEBUG --log-file=foo.log test >> foo.log
Customize CLI
-------------
The standard bouillon command relies on varios other tools, e.g. pytest, twine
and various linters, if you want to use some other tools you can install the
base dependencies only, install the tools you like and configure bouillon
according or make you own cli altogheter.::
pip install bouillon
You can get the base cli by downloading this git repository, e.g.::
git clone git@github.com:janusheide/bouillon.git
cd src/bouillon
Start A New Project
-------------------
You can use *this* repository as a template, `use repository as a template guide. <https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template>`__
Alternatively a more manual approach could be something like the following,
where new_project is a empty git repository.
Clone the repository and remove the history::
git clone git@github.com:janusheide/bouillon.git
cd bouillon
rm -rf .git
Copy the project structure into your existing (empty) git repository::
cp -r * ../new_project
cd ../new_project/
git add .
git commit -m 'Initial commit'
git push
You should now have a project with the following structure, and should modify
as indicated below::
├── LICENSE.txt (replace)
├── NEWS.rst (replace)
├── pyproject.toml (modify)
├── README.rst (replace)
├── src (replace)
│ ├── bouillon
│ │ ├── bouillon.py
│ │ ├── cli.py (optinally copy and modify)
│ │ ├── git.py
│ │ └── __init__.py
└── test (replace)
└── bouillon
├── test_bouillon.py
├── test_cli.py
└── test_git.py
At some point it might be convenient to fork *this* repository, make any changes
you need and use that as your template repository.
Goals
-----
The primary use is intended for, but not limited to, projects with frequently
releases, e.g. ML models and services.
The goal is to make it quick and easy to set up a new project with the basic
testing and releasing functionality.
User Friendliness
.................
* Make the life of the user easier.
* Use plain Python and modules that many are familiar with.
* Quick and easy to setup and run repetitive tasks.
* All tasks should be equally easy to rin locally as in a CI/CD environement.
Reproducibility
................
* Results and builds should be easy to reproduce.
* All dependencies must be hard (versioned).
* The main branch should always be green.
Simplicity
..........
* Simplicity over features.
* Components should be easy to replace.
Automation
..........
* Reduce maintenance, repetitive tasks, and human errors.
* Easy to upgrade dependencies.
* Use merge policies and triggered and scheduled events.
Raw data
{
"_id": null,
"home_page": null,
"name": "bouillon",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "building, maintenance, utility",
"author": null,
"author_email": "Janus Heide <janusheide@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/36/92/da62ec7bd29dc35b1e1ff326aba2c1bc3737c16deb9b877f29cd439b4129/bouillon-2.9.0.tar.gz",
"platform": null,
"description": ".. Copyright (c) 2020, Janus Heide.\n.. All rights reserved.\n..\n.. Distributed under the \"BSD 3-Clause License\", see LICENSE.rst.\n\nBouillon\n========\n\n.. image:: https://github.com/janusheide/bouillon/actions/workflows/unittests.yml/badge.svg\n :target: https://github.com/janusheide/bouillon/actions/workflows/unittests.yml\n :alt: Unit tests\n\n.. image:: https://img.shields.io/pypi/pyversions/bouillon\n :alt: PyPI - Python Version\n\n.. image:: https://img.shields.io/librariesio/github/janusheide/bouillon\n :alt: Libraries.io dependency status for GitHub repo\n\nA Tool for releasing machine learning model and service projects and other fast\npaced python projects. The base module can also be used as a basis for a custom\ncli.\n\nBouillon contains; a) a project structure, b) a Command Line Interface (CLI)\nfor releasing etc., that is easy to adapt and, c) a couple of modules that\nprovides helper functionality if your writing your own cli.\n\nThe idea is that you together with your project ship a program that assist the\ndevelopers to release the project, and other tedious tasks, helping you to;\n\n* Reduce time spent on repetetive tasks.\n* Guareentee a well defined development environement, reducing human error.\n* Simplify setup of CI/CD, as the same commands locally and remotely.\n\n\nGetting Started\n---------------\n\nWill pip install packages (a venv is recommended)::\n\n pip install bouillon[standard]\n bouillon --help\n\n usage: bouillon [-h]\n [-i INFILE]\n [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICIAL}]\n [--log-file LOG_FILE]\n [--dry-run]\n {build,clean,release} ...\n\n Bouillon\n\n positional arguments:\n {build,clean,release}\n available sub commands\n build build.\n clean clean temp files.\n release release me.\n\n options:\n -h, --help show this help message and exit\n -i INFILE, --infile INFILE\n path to input file (default: pyproject.toml)\n --log-level {DEBUG,INFO,WARNING,ERROR,CRITICIAL}\n set log level. (default: WARNING)\n --log-file LOG_FILE set log file. (default: None)\n --dry-run perform a dry run, its helpfull to also set the log-level. (default: False)\n\n\nPrint help for the ``release`` command::\n\n bouillon release --help\n usage: bouillon release [-h]\n [--check-branch]\n [--releaseable-branch RELEASEABLE_BRANCH]\n [--distribution-dir DISTRIBUTION_DIR]\n [--news-files NEWS_FILES [NEWS_FILES ...]]\n [--build-steps BUILD_STEPS [BUILD_STEPS ...]]\n [--lint-steps LINT_STEPS [LINT_STEPS ...]]\n [--test-steps TEST_STEPS [TEST_STEPS ...]]\n version\n\n The following checks and actions will be performed:\n\n 1. Check that the choosen tag does not already exists.\n 2. Check that we are releasing from the default_branch.\n 3. Check that there are no unstaged changes on the current branch.\n 4. Cleans the distribution folder.\n 5. Run all linters.\n 6. Run tests.\n 7. Opens all news files for editing.\n 8. Add and commit all news files.\n 9. Creates the tag.\n 10. Build the project.\n 11. Uploads to pypi.\n 12. Push the commit and tag to the origin.\n\n Note that precedence of settings in decreasing order is as follows:\n commandline arguments -> project file (pyproject.toml) -> defaults.\n\n positional arguments:\n version release version (e.g. '1.2.3').\n\n options:\n -h, --help show this help message and exit\n --check-branch check that the branch is clean and up to date with remote. (default: True)\n --releaseable-branch RELEASEABLE_BRANCH\n branches from which release is allowed ('*' for any branch) (default: main)\n --distribution-dir DISTRIBUTION_DIR\n distribution directory. (default: dist)\n --news-files NEWS_FILES [NEWS_FILES ...]\n news files to open for edits. (default: ['NEWS.rst'])\n --build-steps BUILD_STEPS [BUILD_STEPS ...]\n build steps. (default: [['python', '-m', 'build']])\n --lint-steps LINT_STEPS [LINT_STEPS ...]\n lint steps. (default: [['brundle'], ['licensecheck']])\n --test-steps TEST_STEPS [TEST_STEPS ...]\n test steps. (default: [['pytest']])\n\n\n.. note::\n\n If the upload to pypi fails for any reason the tag will be deleted and the\n release commit will be rolled back.\n\nUsage::\n\n bouillon release 0.0.1\n\n\nSettings\n--------\n\nThe following settings (with defaults) can be overwritten in ``pyproject.toml``::\n\n [tool.bouillon]\n check_branch = true\n releaseable_branch = the git default branch\n distribution_dir = \"dist\"\n news_files = [\"NEWS.rst\",]\n build_steps = [[\"python\", \"-m\", \"build\"],]\n lint_steps = [[\"brundle\"],]\n test_steps = [[\"pytest\"],]\n\n\n.. note::\n\n releaseable_branch defaults to the git default branch, but can be set to a\n static branch name like \"dev\" or \"*\" if all branches are permitted.\n\n\nLogging\n-------\n\nSupports standard log levels; ``DEBUG``, ``INFO``, ``WARNING``, ``ERROR``, ``CRITICAL``, and writing\nlog to a file.\n\nSet the log level to ``DEBUG``::\n\n bouillon --log-level=DEBUG test\n\nSet the log level to ``DEBUG`` and redirect output from executed commands to\n``bar.log``::\n\n bouillon --log-level=DEBUG test >> bar.log\n\nSet the log level to ``DEBUG`` and redirect output from executed commands to\n``bar.log`` and log information to ``foo.log``::\n\n bouillon --log-level=DEBUG --log-file=foo.log test >> bar.log\n\nSet the log level to ``DEBUG`` and redirect output from executed commands and\nlog information to ``foo.log``::\n\n bouillon --log-level=DEBUG --log-file=foo.log test >> foo.log\n\n\nCustomize CLI\n-------------\n\nThe standard bouillon command relies on varios other tools, e.g. pytest, twine\nand various linters, if you want to use some other tools you can install the\nbase dependencies only, install the tools you like and configure bouillon\naccording or make you own cli altogheter.::\n\n pip install bouillon\n\nYou can get the base cli by downloading this git repository, e.g.::\n\n git clone git@github.com:janusheide/bouillon.git\n cd src/bouillon\n\n\nStart A New Project\n-------------------\n\nYou can use *this* repository as a template, `use repository as a template guide. <https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template>`__\n\n\nAlternatively a more manual approach could be something like the following,\nwhere new_project is a empty git repository.\n\nClone the repository and remove the history::\n\n git clone git@github.com:janusheide/bouillon.git\n cd bouillon\n rm -rf .git\n\nCopy the project structure into your existing (empty) git repository::\n\n cp -r * ../new_project\n cd ../new_project/\n git add .\n git commit -m 'Initial commit'\n git push\n\n\nYou should now have a project with the following structure, and should modify\nas indicated below::\n\n \u251c\u2500\u2500 LICENSE.txt (replace)\n \u251c\u2500\u2500 NEWS.rst (replace)\n \u251c\u2500\u2500 pyproject.toml (modify)\n \u251c\u2500\u2500 README.rst (replace)\n \u251c\u2500\u2500 src (replace)\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 bouillon\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 bouillon.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 cli.py (optinally copy and modify)\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 git.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 __init__.py\n \u2514\u2500\u2500 test (replace)\n \u2514\u2500\u2500 bouillon\n \u00a0\u00a0 \u251c\u2500\u2500 test_bouillon.py\n \u00a0\u00a0 \u251c\u2500\u2500 test_cli.py\n \u00a0\u00a0 \u2514\u2500\u2500 test_git.py\n\nAt some point it might be convenient to fork *this* repository, make any changes\nyou need and use that as your template repository.\n\n\nGoals\n-----\n\nThe primary use is intended for, but not limited to, projects with frequently\nreleases, e.g. ML models and services.\nThe goal is to make it quick and easy to set up a new project with the basic\ntesting and releasing functionality.\n\nUser Friendliness\n.................\n\n* Make the life of the user easier.\n* Use plain Python and modules that many are familiar with.\n* Quick and easy to setup and run repetitive tasks.\n* All tasks should be equally easy to rin locally as in a CI/CD environement.\n\nReproducibility\n................\n\n* Results and builds should be easy to reproduce.\n* All dependencies must be hard (versioned).\n* The main branch should always be green.\n\nSimplicity\n..........\n\n* Simplicity over features.\n* Components should be easy to replace.\n\nAutomation\n..........\n\n* Reduce maintenance, repetitive tasks, and human errors.\n* Easy to upgrade dependencies.\n* Use merge policies and triggered and scheduled events.\n",
"bugtrack_url": null,
"license": null,
"summary": "Tool for releasing machine learning model and service projects and other fast paced python projects.",
"version": "2.9.0",
"project_urls": {
"Changelog": "https://github.com/janusheide/bouillon/blob/main/NEWS.rst",
"Homepage": "https://github.com/janusheide/bouillon",
"Repository": "https://github.com/janusheide/bouillon"
},
"split_keywords": [
"building",
" maintenance",
" utility"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5f4e7f229d872fdf4ca9c826567546443a53946a917e0a022199ddef60002568",
"md5": "3aabe12fdd0c7fffd995e2ab95c10704",
"sha256": "42aa92dff33b61bbaa95f90882f82244f4762714afb6e6726aadaf62a7b821aa"
},
"downloads": -1,
"filename": "bouillon-2.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3aabe12fdd0c7fffd995e2ab95c10704",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11205,
"upload_time": "2024-11-29T20:30:33",
"upload_time_iso_8601": "2024-11-29T20:30:33.227492Z",
"url": "https://files.pythonhosted.org/packages/5f/4e/7f229d872fdf4ca9c826567546443a53946a917e0a022199ddef60002568/bouillon-2.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3692da62ec7bd29dc35b1e1ff326aba2c1bc3737c16deb9b877f29cd439b4129",
"md5": "cbb4053fb069fec991108201710e52a2",
"sha256": "59cff6df201cdd9625540c4bdf3a879aa05c7740debaaa0e4e80f6021c9fd32a"
},
"downloads": -1,
"filename": "bouillon-2.9.0.tar.gz",
"has_sig": false,
"md5_digest": "cbb4053fb069fec991108201710e52a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 17101,
"upload_time": "2024-11-29T20:30:50",
"upload_time_iso_8601": "2024-11-29T20:30:50.134183Z",
"url": "https://files.pythonhosted.org/packages/36/92/da62ec7bd29dc35b1e1ff326aba2c1bc3737c16deb9b877f29cd439b4129/bouillon-2.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-29 20:30:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "janusheide",
"github_project": "bouillon",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "bouillon"
}