-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add notebook that converts raw data to HF
- Loading branch information
1 parent
2c364ae
commit f0d92ea
Showing
5 changed files
with
3,142 additions
and
1,256 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 |
---|---|---|
|
@@ -37,14 +37,11 @@ help: | |
install: ## Install dependencies | ||
@echo "Installing the 'foqa' project..." | ||
@$(MAKE) --quiet install-brew | ||
@$(MAKE) --quiet install-gpg | ||
@$(MAKE) --quiet generate-gpg-key | ||
@$(MAKE) --quiet install-pipx | ||
@$(MAKE) --quiet install-poetry | ||
@$(MAKE) --quiet install-dependencies | ||
@$(MAKE) --quiet setup-environment-variables | ||
@$(MAKE) --quiet setup-git | ||
@$(MAKE) --quiet add-repo-to-git | ||
@echo "Installed the 'foqa' project. You can now activate your virtual environment with 'source .venv/bin/activate'." | ||
@echo "Note that this is a Poetry project. Use 'poetry add <package>' to install new dependencies and 'poetry remove <package>' to remove them." | ||
|
||
|
@@ -54,30 +51,6 @@ install-brew: | |
echo "Installed Homebrew."; \ | ||
fi | ||
|
||
install-gpg: | ||
@if [ "$(shell which gpg)" = "" ] || [ "$(shell which gpg-agent)" = "" ]; then \ | ||
uname=$$(uname); \ | ||
case $${uname} in \ | ||
(*Linux*) distro=$$(lsb_release -i | sed 's/Distributor ID:\t//'); \ | ||
case $${distro} in \ | ||
(*Ubuntu*) installCmd='apt-get update && apt-get install -y gnupg gpg-agent'; ;; \ | ||
(*CentOS*) installCmd='yum install -y gnupg gpg-agent'; ;; \ | ||
(*) echo 'Could not automatically install gnupg for the $${distro} distribution. Please manually install gnupg and try again.'; exit 2; ;; \ | ||
esac; ;; \ | ||
(*Darwin*) installCmd='brew install gnupg pinentry-mac'; ;; \ | ||
(*) echo 'Could not automatically install gnupg. Please manually install gnupg and try again.'; exit 2; ;; \ | ||
esac; \ | ||
"$${installCmd}"; \ | ||
echo "Installed gnupg."; \ | ||
fi | ||
|
||
generate-gpg-key: | ||
@if [ "$(shell gpg --list-secret-keys --keyid-format=long | grep sec | sed -E 's/.*\/([^ ]+).*/\1/')" = "" ]; then \ | ||
echo "Generating a new GPG key - please follow the prompts."; \ | ||
gpg --full-generate-key; \ | ||
echo "Generated a new GPG key. Remember to register it to Github at https://github.com/settings/gpg/new, where you add the key generated by running 'gpg --armor --export <key>'"; \ | ||
fi | ||
|
||
install-pipx: | ||
@if [ "$(shell which pipx)" = "" ]; then \ | ||
uname=$$(uname); \ | ||
|
@@ -99,7 +72,7 @@ install-poetry: | |
fi | ||
|
||
install-dependencies: | ||
@poetry env use python3.11 && poetry install | ||
@poetry env use python3.11 && poetry install -E notebook | ||
|
||
setup-environment-variables: | ||
@poetry run python src/scripts/fix_dot_env_file.py | ||
|
@@ -112,27 +85,8 @@ setup-git: | |
@git init | ||
@git config --local user.name ${GIT_NAME} | ||
@git config --local user.email ${GIT_EMAIL} | ||
@if [ ${GPG_KEY_ID} = "" ]; then \ | ||
echo "No GPG key ID specified. Skipping GPG signing."; \ | ||
git config --local commit.gpgsign false; \ | ||
else \ | ||
git config --local commit.gpgsign true; \ | ||
git config --local user.signingkey ${GPG_KEY_ID}; \ | ||
echo "Signed with GPG key ID ${GPG_KEY_ID}."; \ | ||
fi | ||
@poetry run pre-commit install | ||
|
||
add-repo-to-git: | ||
@export GPG_TTY=$(tty) | ||
@gpgconf --kill gpg-agent | ||
@if [ ! "$(shell git status --short)" = "" ] && [ "$(shell git log --all)" = "" ]; then \ | ||
git add .; \ | ||
git commit --quiet -m "Initial commit"; \ | ||
fi | ||
@if [ "$(shell git remote)" = "" ]; then \ | ||
git remote add origin [email protected]:alexandrainst/foqa.git; \ | ||
fi | ||
|
||
docs: ## Generate documentation | ||
@poetry run pdoc --docformat google src/foqa -o docs | ||
@echo "Saved documentation." | ||
|
Oops, something went wrong.