Created
September 12, 2025 09:20
-
-
Save ulfaslak/2acffef7072980c6f27ba115b8712ee1 to your computer and use it in GitHub Desktop.
adhoc-project-starter
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
| adhoc () { | |
| setopt RM_STAR_SILENT | |
| PROJECT_DIR="<PATH WHERE ADHOC EXPERIMENTS GET CREATED>" # <-- HEY LOOK HERE! | |
| TEMPLATE_REPO="https://github.com/pymc-labs/project-starter.git" | |
| PACKAGE_NAME="logic" | |
| if [ -z "$1" ] | |
| then | |
| echo "Usage: codenow.sh <project_name>" | |
| exit 1 | |
| fi | |
| project_name="$1" | |
| cd "$PROJECT_DIR" || exit | |
| git clone "$TEMPLATE_REPO" temp_project_starter | |
| cd temp_project_starter || exit | |
| rm -rf .git | |
| rm -rf .github | |
| find package_name -type f ! -name '__init__.py' -delete | |
| find package_name -mindepth 1 -type d -exec rm -rf {} + | |
| rm -rf tests/* | |
| rm -f .pre-commit-config.yaml | |
| rm -f setup.sh | |
| rm -f .gitignore | |
| rm -f LICENSE | |
| rm -f README.md | |
| rm -f template_README.md | |
| rm -f .codespellignore | |
| mv package_name "$PACKAGE_NAME" | |
| sed -i '' "s/package_name/$PACKAGE_NAME/g" pyproject.toml | |
| pixi install | |
| cd .. | |
| new_folder_name="$(date +%Y%m%d)-${project_name}" | |
| mv temp_project_starter "$new_folder_name" | |
| cd "$new_folder_name" || exit | |
| code . | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment