This file contains hidden or 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
pipdeptree -f --warn silence | grep -v '[[:space:]]' > requirements.txt |
This file contains hidden or 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
$pipdeptree | |
certifi==2020.4.5.1 | |
ipykernel==5.3.0 | |
- appnope [required: Any, installed: 0.1.0] | |
- ipython [required: >=5.0.0, installed: 7.14.0] | |
- appnope [required: Any, installed: 0.1.0] | |
- backcall [required: Any, installed: 0.1.0] | |
- decorator [required: Any, installed: 4.4.2] | |
- jedi [required: >=0.10, installed: 0.17.0] | |
- parso [required: >=0.7.0, installed: 0.7.0] |
This file contains hidden or 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
$pip freeze | |
appnope==0.1.0 | |
backcall==0.1.0 | |
certifi==2020.4.5.1 | |
decorator==4.4.2 | |
ipykernel==5.3.0 | |
ipython==7.14.0 | |
ipython-genutils==0.2.0 | |
jedi==0.17.0 | |
jupyter-client==6.1.3 |
This file contains hidden or 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
SHELL := /usr/bin/env bash | |
####### | |
# Help | |
####### | |
.DEFAULT_GOAL := help | |
.PHONY: help | |
help: |
This file contains hidden or 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
.DEFAULT_GOAL := help | |
.PHONY: help | |
help: | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
This file contains hidden or 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
ipykernel==5.3.0 | |
pipdeptree==0.13.2 |
This file contains hidden or 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
.PHONY: add-to-jupyter | |
add-to-jupyter: ## Register the conda environment to Jupyter | |
$(ACTIVATE_ENV) && python -s -m ipykernel install --user --name $(CONDA_ENV_NAME) | |
.PHONY: remove-from-jupyter | |
remove-from-jupyter: ## Remove the conda environment from Jupyter | |
jupyter kernelspec uninstall $(CONDA_ENV_NAME) |
This file contains hidden or 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
.PHONY: clean-conda-env | |
clean-conda-env: ## Remove the conda environment and the relevant file | |
rm -rf $(CONDA_ENV_NAME) | |
rm -rf $(CONDA_ENV_NAME).zip |
This file contains hidden or 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
PY_VERSION := 3.8 | |
CONDA_ENV_NAME ?= conda-env-test | |
ACTIVATE_ENV = source activate ./$(CONDA_ENV_NAME) | |
.PHONY: build-conda-env | |
build-conda-env: $(CONDA_ENV_NAME) ## Build the conda environment | |
$(CONDA_ENV_NAME): | |
conda create -p $(CONDA_ENV_NAME) --copy -y python=$(PY_VERSION) | |
$(ACTIVATE_ENV) && python -s -m pip install -r requirements.txt |
This file contains hidden or 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
make install |