This repository has been archived by the owner on Feb 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
140 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,3 +110,9 @@ dmypy.json | |
|
||
# OSX files | ||
.DS_Store | ||
|
||
# Notebook | ||
*.ipynb | ||
|
||
# Locks | ||
*.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
CONDA_ACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate ; conda activate | ||
CONDA_DEACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda deactivate | ||
CONDA_REMOVE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda remove -y --all -n | ||
|
||
ENV_NAME=jupyterlab-kernel-usage | ||
|
||
.PHONY: clean build dist env cp | ||
|
||
.EXPORT_ALL_VARIABLES: | ||
|
||
default: all ## Default target is all. | ||
|
||
help: ## display this help. | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
||
all: clean install build dist ## Clean, install and build. | ||
|
||
build: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
yarn build ) | ||
|
||
clean: | ||
rm -fr build || true | ||
rm -fr dist || true | ||
rm -fr *.egg-info || true | ||
rm -fr jupyterlab-kernel-usage/labextension || true | ||
find . -name '*.egg-info' -exec rm -fr {} + || true | ||
find . -name '__pycache__' -exec rm -fr {} + || true | ||
|
||
env-rm: | ||
-conda remove -y --all -n ${ENV_NAME} | ||
|
||
env: | ||
-conda env create -f environment.yaml | ||
@echo | ||
@echo -------------------------------- | ||
@echo ✨ ${ENV_NAME} environment is created. | ||
@echo -------------------------------- | ||
@echo | ||
|
||
install-dev: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
pip install -e . && \ | ||
jlpm && \ | ||
jlpm build && \ | ||
jupyter server extension enable jupyterlab_kernel_usage && \ | ||
jupyter labextension develop --overwrite .) | ||
|
||
jlab: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
jupyter lab \ | ||
--ServerApp.jpserver_extensions="{'jupyterlab': True, 'jupyterlab_kernel_usage': True}" \ | ||
--no-browser \ | ||
--port 8234) | ||
|
||
jlab-dev: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
jupyter lab \ | ||
--ServerApp.jpserver_extensions="{'jupyterlab': True, 'jupyterlab_kernel_usage': True}" \ | ||
--no-browser \ | ||
--dev-mode \ | ||
--extensions-in-dev-mode \ | ||
--port 8234) | ||
|
||
jlab-watch: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
jupyter lab \ | ||
--watch \ | ||
--ServerApp.jpserver_extensions="{'jupyterlab_resource_usage': True}" \ | ||
--port 8234) | ||
|
||
watch: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
yarn watch ) | ||
|
||
main: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
python -m jupyterlab_resource_usage ) | ||
|
||
publish: | ||
($(CONDA_ACTIVATE) ${ENV_NAME}; \ | ||
rm -fr dist/* && \ | ||
yarn clean && \ | ||
yarn build && \ | ||
python setup.py sdist bdist_wheel && \ | ||
twine upload dist/* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: jupyterlab-kernel-usage | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- pip | ||
- psutil | ||
- setuptools | ||
- tornado | ||
- twine | ||
- yarn | ||
- pip: | ||
- jupyterlab==4.0.0a19 | ||
- jupyter_packaging==0.10.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters