{"id":15020250,"url":"https://github.com/clearml/trains-jupyter-plugin","last_synced_at":"2025-10-25T10:30:50.768Z","repository":{"id":49256496,"uuid":"191134962","full_name":"clearml/trains-jupyter-plugin","owner":"clearml","description":"TRAINS Jupyter Notebook Plugin - Add GIT Support For Jupyter Notebook","archived":false,"fork":false,"pushed_at":"2021-06-21T17:49:59.000Z","size":83,"stargazers_count":42,"open_issues_count":0,"forks_count":23,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-31T06:51:19.834Z","etag":null,"topics":["git","jupyter","jupyter-notebook","learning","version-control","versioning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clearml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-10T09:12:14.000Z","updated_at":"2023-01-09T11:37:52.000Z","dependencies_parsed_at":"2022-08-20T07:01:30.405Z","dependency_job_id":null,"html_url":"https://github.com/clearml/trains-jupyter-plugin","commit_stats":null,"previous_names":["clearml/trains-jupyter-plugin","allegroai/trains-jupyter-plugin"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearml%2Ftrains-jupyter-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearml%2Ftrains-jupyter-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearml%2Ftrains-jupyter-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearml%2Ftrains-jupyter-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clearml","download_url":"https://codeload.github.com/clearml/trains-jupyter-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238120390,"owners_count":19419763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","jupyter","jupyter-notebook","learning","version-control","versioning"],"created_at":"2024-09-24T19:54:48.381Z","updated_at":"2025-10-25T10:30:50.456Z","avatar_url":"https://github.com/clearml.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Trains](https://github.com/allegroai/trains) Jupyter Plugin\n\n[![GitHub license](https://img.shields.io/github/license/allegroai/trains-jupyter-plugin.svg)](https://img.shields.io/github/license/allegroai/trains-jupyter-plugin.svg)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/trains-jupyter-plugin.svg)](https://img.shields.io/pypi/pyversions/trains-jupyter-plugin.svg)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/trains-jupyter-plugin.svg)](https://img.shields.io/pypi/v/trains-jupyter-plugin.svg)\n[![PyPI status](https://img.shields.io/pypi/status/trains-jupyter-plugin.svg)](https://pypi.python.org/pypi/trains-jupyter-plugin/)\n\n---\n### ‼️ Deprecation notice: As JupyterLab now includes git integration, there is no longer any need for a special notebook plugin\n\n---\n\n**trains-jupyter-plugin** is a Jupyter Notebook extension which enables you to push ipython notebooks to a git repository,\nusing a [git button](#Screenshots) added to the notebook toolbar.\n\nAfter saving a notebook, you can push the notebook to a predefined git repository (currently, pushing to a specific predefined branch is supported).\n\nWhen clicking the *version-control* button:\n* The notebook `.ipynb` file will be pushed to the git repository based on the folder structure in which it is located\n* The notebook will also be converted to a `.py` script, pushed alongside the `.ipynb` file\n* A `requirements.txt` will be created and updated according to the notebook imports, and pushed alongside the `.ipynb` file\n\nFor example, if you have two repositories:\n```\nrepo1/\n├── .git\n└── experiment1/\n   └── notebook.ipynb\n\nrepo2/\n├── .git\n└── experiment2/\n   └── notebook2.ipynb\n```\n\n`notebook1.ipynb` will be pushed to the `repo1` repository, and `notebook2.ipynb` will be pushed to the `repo2` repository.\n\nIn order to select the predefined branch into which the files will be pushed, use `git checkout` on the jupyter host machine.\n\nFor example, switch to `branch2` in `repo2`:\n```\n$ cd ~/repo2\n$ git checkout branch2\n```\nFrom this point onwards the jupyter notebook push will be done to the `branch2` branch in the `repo2` repository.\n\n## Installation\n\nTo use the plugin, execute the following script which installs the plugin and configures Jupyter to use it:\n\n```\npip install trains-jupyter-plugin\n\nif [ ! -f ~/.jupyter/jupyter_notebook_config.py ]; then\n   jupyter notebook --generate-config\nfi\necho 'c.NotebookApp.disable_check_xsrf = True' \u003e\u003e ~/.jupyter/jupyter_notebook_config.py\n\njupyter serverextension enable --py trains-jupyter-plugin\nsudo jupyter nbextension install --py trains-jupyter-plugin\n```\n\nTo enable the extension for all notebooks:\n\n```\njupyter nbextension enable --py trains-jupyter-plugin\n```\n\n## How to use\n\nOnce the Plugin is installed and Jupyter configured:\n\n1. Clone your git repository to a folder that will be assigned to a specific user\n\n1. Checkout a specific branch for the current user\n\n1.  Make sure git is configured with the correct credentials (we recommend verifying a password/passphrase is required when pushing)\n\n1. Run Jupyter Notebook\n\n1. Any commit/push of notebooks from this specific folder will be done to the checked out branch\n\n## Screenshots\n\nAn additional button to the Jupyter toolbar:\n\n![Extension](https://github.com/allegroai/trains-jupyter-plugin/blob/master/docs/extension.png?raw=true \"Extension added to toolbar\")\n\nThe git push dialog for pushing the notebook:\n\n![Commit Message](https://github.com/allegroai/trains-jupyter-plugin/blob/master/docs/commit.png?raw=true \"Commit Message\")\n\n![Success Message](https://github.com/allegroai/trains-jupyter-plugin/blob/master/docs/success.png?raw=true \"Success Message\")\n\n## Additional Documentation\n\nFor detailed information about the **Trains** open source suite, see our [Trains Documentation](https://allegro.ai/docs).\n\n## Acknowledgements\n\nThanks to [Lab41/sunny-side-up](https://github.com/Lab41/sunny-side-up) \u0026 [sat28/githubcommit](https://github.com/sat28/githubcommit) for laying the foundations for this plugin.\n\n## Community \u0026 Support\n\n* If you have a question, consult our **Trains** [FAQs](https://allegro.ai/docs/faq/faq) or tag your questions on [stackoverflow](https://stackoverflow.com/questions/tagged/trains) with \"*trains*\".\n* To request features or report bugs, see our [GitHub issues](https://github.com/allegroai/trains-jupyter-plugin/issues).\n* Email us at *[trains@allegro.ai](mailto:trains@allegro.ai?subject=Trains)*\n\n## Contributing\n\nWe encourage your contributions! See our **Trains** [Guidelines for Contributing](https://github.com/allegroai/trains/blob/master/docs/contributing.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearml%2Ftrains-jupyter-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclearml%2Ftrains-jupyter-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearml%2Ftrains-jupyter-plugin/lists"}