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.
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.3.tar.gz
.
File metadata
- Download URL: git_monitor-0.1.3.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 | 9396363ad4f3b715a5d41667bc2786096f255be4c6881ba7de351caa9584c09f |
|
MD5 | c94a82da7f3d7af44a6406b8958e7efd |
|
BLAKE2b-256 | fa3581bc6d3ccb1555084c3988406bc67d55b490b82c4a96ab5b150b83610086 |
File details
Details for the file git_monitor-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: git_monitor-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.9 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 | f86c26cd78f0aa806f7b0ded5e4f9d6f64763b20730caa0b4c18aca303990c94 |
|
MD5 | 41a2e07ac89977e4e438462908b022ce |
|
BLAKE2b-256 | 5772cd6d98135667c38f1aee267c438db080fdf8bc5fb5b7ff0215d40d18ad2d |