Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common Makefile rules, basic direnv / asdf setup #41

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

edvardm
Copy link

@edvardm edvardm commented Nov 21, 2023

No description provided.

@edvardm edvardm marked this pull request as ready for review November 21, 2023 14:30
# Note that rule should be idempotent and return immediately if there's nothing to do, so that
# eg. test can depend on this. Strictly speaking this depends on 'pyproject.toml' too, but often those changes
# are not relevant to dependencies and user can always do `make -B <rule> to force rebuild`
.make-dev-deps: poetry.lock
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might seem unnecessarily complex to have rule for just poetry install --sync, but like with many other rules, idea is to create trivial to use abstractions, so that it is easier to change tools afterwards without other needed changes

@@ -0,0 +1,3 @@
# this if config file for https://asdf-vm.com/
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that nothing would require use of asdf, but it would provide more convenient flow for those who use it

@@ -0,0 +1,12 @@
# Read .envrc settings in parent dirs if present
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cf before. direnv would not be required, but provided here as sample file

# needs only rule body (repeating .PHONY is not needed)
######################################################################################################

.PHONY: deps
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to comment these by default, so that rules that are not implemented are not visible with make help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant