Skip to content

Commit

Permalink
feat: Add notebook that converts raw data to HF
Browse files Browse the repository at this point in the history
  • Loading branch information
saattrupdan committed Oct 17, 2024
1 parent 2c364ae commit f0d92ea
Show file tree
Hide file tree
Showing 5 changed files with 3,142 additions and 1,256 deletions.
48 changes: 1 addition & 47 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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."

Expand All @@ -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); \
Expand All @@ -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
Expand All @@ -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."
Expand Down
Loading

0 comments on commit f0d92ea

Please sign in to comment.