Automatic print the git status of the package your are developing.
Project description
Use Case
This project is intended to improve datascience workflows. You may want to do these simultaneously:
- Developing a package (the package project), possibly a machine learning model or a data pipeline.
- Perform some experiments in another project (the experiment project) by such package project by running a jupyter notebook or a script.
- Log the git status of the package project for reproducibiliy.
git-monitor
help you to conviniently log the git status.
If we don't want the notebooks to polute the package project, we have to separate the experiment project from the package project, then we cannot track everying directly in a single git repo. This problem is what git-monitor
built for.
How to
Basic usage
- Install
git-monitor
into the environment of your package project. - Make a
.git_monitor
file in the experiment project:
<pkg-nm-1>=<path-to-package-1-project-root>
<pkg-nm-2>=<path-to-package-2-project-root>
- In the root
__init__.py
of the package project, add the lines:
import git_monitor
git_monitor.Monitor.by_env("<pkg-nm-1>")
Then everytime you import
or reload
the package project, git-monitor
will print the git status, including current branch, commit hash, untracked files and modified files.
logger
from git_monitor import logger
the messages of git-monitor
are directed to this logger
, which is a python native logging.Logger
and an logging.StreamHandler
has already been added to. The logging level is INFO
, and the StreamHandler
uses sys.stdout
.
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
Built Distribution
File details
Details for the file git_monitor-0.1.4.tar.gz
.
File metadata
- Download URL: git_monitor-0.1.4.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38493b86d9e03e9dd93983adf241b8fa0b959964b41c2eed6699b5bdc1f2e708 |
|
MD5 | 5d602e2f6f2418ca57900f49838c04fc |
|
BLAKE2b-256 | d5dda6f62b07096ab3642ca5c680ae28915aa49bc7055b00561d5574ee7f1c7c |
File details
Details for the file git_monitor-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: git_monitor-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6675f25d932cd673accc769b49987a4784ab8541e79ef20f0200bd433df1d2e |
|
MD5 | 60eb085fbeceff710d01044744a879c0 |
|
BLAKE2b-256 | 40d666fb6c4df16b9f28ffbe7c1be0c209bfab2d9d47f82c8b950027ae36a7b1 |