Skip to content

Commit

Permalink
dev: update cruft (#191)
Browse files Browse the repository at this point in the history
Auto-created
  • Loading branch information
MartinBernstorff authored Nov 6, 2023
1 parent f2529bc commit e6fd14d
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
1 change: 1 addition & 0 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"license": "MIT",
"package_name": "personal_mnemonic_medium",
"project_name": "personal-mnemonic-medium",
"release_to_pypi": "no",
"version": "0.0.0"
}
3 changes: 2 additions & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/MartinBernstorff/nimble-python-cookiecutter",
"commit": "8e9cf68661d4bc94541db5aa7c4988b81bf4067e",
"commit": "a68bfa18605c0fe171e2f9e8b4f047b786e93b56",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -13,6 +13,7 @@
"github_repo": "personal-mnemonic-medium",
"version": "0.0.0",
"copyright_year": "2023",
"release_to_pypi": "no",
"license": "MIT",
"_copy_without_render": [
"*.github"
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/BUILD": true
"**/BUILD": true,
"*.egg-info": true,
"*.pytest_cache": true,
},
"python.analysis.diagnosticMode": "workspace"
}
36 changes: 30 additions & 6 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,42 @@ validate: ## Run all checks
make test
make build

sync-pr:
merge-main:
git fetch
git merge --no-edit origin/main

push:
git push --set-upstream origin HEAD
git push

create-pr:
gh pr create -w || true
gh pr create --title "$$(git log -1 --pretty=%B)" --body "Auto-created" || true

enable-automerge:
gh pr merge --auto --squash --delete-branch

squash-from-parent:
git fetch
git reset $$(git merge-base origin/main $$(git rev-parse --abbrev-ref HEAD)) ; git add -A ; git commit -m "Squash changes from parent branch"

merge-pr:
gh pr merge --auto --merge --delete-branch
create-random-branch:
@git checkout -b "$$(date +'%d_%H_%M')_$(shell cat /dev/urandom | env LC_ALL=C tr -dc 'a-z' | fold -w 5 | head -n 1)"

pr-status:
@gh pr view | cat | grep "title"
@gh pr view | cat | grep "url"

pr: ## Run relevant tests before PR
make sync-pr
make push
make create-pr
make merge-main
make validate
make merge-pr
make enable-automerge
@echo "––– 🎉🎉🎉 All tests succeeded! 🎉🎉🎉 –––"
make pr-status

grow:
make pr
@echo "––– Growing into a new branch 🌳 –––"
make create-random-branch
make squash-from-parent
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ suppress-none-returning = true

[tool.ruff.isort]
known-third-party = ["wandb"]
split-on-trailing-comma = false

[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
Expand All @@ -149,3 +148,4 @@ build_command = "python -m pip install build; python -m build"

[tool.setuptools]
include-package-data = true

0 comments on commit e6fd14d

Please sign in to comment.