Skip to main content

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:

  1. Developing a package (the package project), possibly a machine learning model or a data pipeline.
  2. Perform some experiments in another project (the experiment project) by such package project by running a jupyter notebook or a script.
  3. 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

  1. Install git-monitor into the environment of your package project.
  2. 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>
  1. 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

git_monitor-0.1.5.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

git_monitor-0.1.5-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file git_monitor-0.1.5.tar.gz.

File metadata

  • Download URL: git_monitor-0.1.5.tar.gz
  • Upload date:
  • Size: 6.2 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

Hashes for git_monitor-0.1.5.tar.gz
Algorithm Hash digest
SHA256 152116da9ab68ea9cf78a857b4424528fb4b767e7d7d9429ebde3bf5408332c3
MD5 b4bd98cfc83f97bf7d61b23618fc771c
BLAKE2b-256 dd223d0b14077eea168864d9db1547965d30338f49b1590fa5a3671f6a54bd0a

See more details on using hashes here.

File details

Details for the file git_monitor-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: git_monitor-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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

Hashes for git_monitor-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 92239494df57ca45e72c7fb7848a8da3bd0115504172608d39f6d13f7cb0f382
MD5 0e3b5cb169e4822f1016a8d0736e10ed
BLAKE2b-256 f1d94ee5ef1808d89fd5b632b11e77a06d8790e20bc93d3f6da44f05cd73cf76

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