
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@datalayer-jupyter/jupyterlab-git
Advanced tools
A JupyterLab extension for version control using git
A JupyterLab extension for version control using Git
To see the extension in action, open the example notebook included in the Binder demo.
>=2.x
)To install perform the following steps, with pip:
pip install --upgrade jupyterlab jupyterlab-git
jupyter lab build
or with conda:
conda install -c conda-forge jupyterlab jupyterlab-git
jupyter lab build
Once installed, extension behavior can be modified via the following settings which can be set in JupyterLab's advanced settings editor:
commit
, pull
, reset
, revert
) finish executing. Setting this to true
helps mitigate potential race conditions leading to data loss, conflicts, and a broken Git history. Unless running a slow network, UI suspension should not interfere with standard workflows. Setting this to false
allows for actions to trigger multiple concurrent Git actions.true
, when fetching and integrating changes from a remote repository, a conflicting merge is canceled and the working tree left untouched.true
, this setting guards against overwriting and/or losing uncommitted changes.true
, the extension displays status updates in the JupyterLab status bar, such as when pulling and pushing changes, switching branches, and polling for changes. Depending on the level of extension activity, some users may find the status updates distracting. In which case, setting this to false
should reduce visual noise.true
, all files with changes are automatically staged. When we develop in JupyterLab, we often only care about what files have changed (in the broadest sense) and don't need to distinguish between "tracked" and "untracked" files. Accordingly, this setting allows us to simplify the visual presentation of changes, which is especially useful for those less acquainted with Git.In ~/.jupyter/jupyter_notebook_config.py
:
c.JupyterLabGit.actions = {"post_init": ["touch dummy_init.dat"]}
Or equivalently in jupyter_notebook_config.json
:
{
"JupyterLabGit": {
"actions": {
"post_init": [
"touch dummy_init.dat"
]
}
}
}
Before consulting the following list, be sure the server extension and the frontend extension have the same version by executing the following commands:
jupyter serverextension list
jupyter labextension list
Issue: the Git panel does not recognize that you are in a Git repository.
Possible fixes:
Be sure to be in a Git repository in the filebrowser tab
Check the server log. If you see a warning with a 404 code similar to:
[W 00:27:41.800 LabApp] 404 GET /git/settings?version=0.20.0
Explicitly enable the server extension by running:
jupyter serverextension enable --py jupyterlab_git
If you are using JupyterHub or some other technologies requiring an initialization script which includes the jupyterlab-git extension, be sure to install both the frontend and the server extension before launching JupyterLab.
Issue: the Git panel is not visible.
Possible fixes:
Check that the JupyterLab extension is installed:
jupyter labextension list
If you don't see @jupyterlab/git v... enabled OK
in the list, explicitly install the jupyter labextension by running:
jupyter labextension install @jupyterlab/git
If you would like to contribute to the project, please read our contributor documentation.
JupyterLab follows the official Jupyter Code of Conduct.
Requires NodeJS
# Install new-ish JupyterLab
pip install -U jupyterlab
# Clone the repo to your local environment
git clone https://github.com/jupyterlab/jupyterlab-git.git
cd jupyterlab-git
# Install the server extension in development mode and enable it
pip install -e .[test]
pre-commit install
jupyter serverextension enable --py jupyterlab_git --sys-prefix
# Build and install your development version of the extension
jlpm
jupyter labextension install .
To rebuild the package after a change and the JupyterLab app:
jlpm run build
jupyter lab build
To continuously monitor the project for changes and automatically trigger a rebuild, start Jupyter in watch mode:
jupyter lab --watch
And in a separate session, begin watching the source directory for changes:
jlpm run watch
Now every change will be built locally and bundled into JupyterLab. Be sure to refresh your browser page after saving file changes to reload the extension (note: you'll need to wait for webpack to finish, which can take 10s+ at times).
To execute the tests
pytest jupyterlab_git
jlpm run test
The Jupyter Git extension is part of Project Jupyter and is developed by an open community of contributors. To see who has been active recently, please look at the "Contributors" tab. Below we list the people and entities who contributed in different ways to the project (emoji key):
This project follows the all-contributors specification. Contributions of any kind are welcomed!
To add yourself, or someone else, to this list you can either use the bot (@all-contributors please add <username> for <contributions>
) or the CLI (jlpm all-contributors add <username> <contributions>
).
If you manually edit the .all-contributorsrc
config file, run yarn run contributors:generate
.
FAQs
A JupyterLab extension for version control using git
The npm package @datalayer-jupyter/jupyterlab-git receives a total of 0 weekly downloads. As such, @datalayer-jupyter/jupyterlab-git popularity was classified as not popular.
We found that @datalayer-jupyter/jupyterlab-git demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.