Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #38
Here's a few notes:
First, this assumes UNIX-based environment; Makefiles are seldom appropriate for Windows. This should work on any UNIX-like system (Mac/Linux/BSD) with Python 3.6 or later installed. On Ubuntu, you may need to install
python3-venv
, but actually running the Makefile will indirectly prompt the user to install that anyhow. ;)Second, I'm doing everything in the context of a virtual environment. There's seldom, if ever, a reason not to do this stuff outside of one! The Makefile sets up the venv, installs the necessary packages, and then performs the appropriate tasks.
The virtual environment is never actually activated; its binaries are called directly, and they know to only use the venv. It's a neat little trick.
Third, I expanded the
.gitignore
, mainly to prevent virtual environments from getting committed, but secondarily to untrack my own development tools. Hopefully that file is better organized now.I see no reason why the Actions cannot be adjusted to use the Makefile for almost everything now, but I recommend the primary maintainer be the one to make those adjustments. I'm not overly familiar with Actions yet.
Makefile targets:
make
: Runsclean dist
.make help
: List all (most) targets.make lint
: Run flake8 linters.make format
: Run blackmake test
: Run tests, bootstrapping with Ward from PyPImake prep
: Gets the code ready to send as a pull request:lint format test tidy
make build
: Alias fordist
.make dist
: First runslint format test
, and then builds usingsetup.py
. This createsdist/
.make tidy
: Cleans up all cache,.pyc
, and egg files. (I adorepycleanup
!)make clean
: Removes thebuild/
,dist/
, andmake-venv/
directories. Does not calltidy
, because I don't wantclean
to require the virtual environment.The
make-venv
target is not listed because I don't like the name; it is only there so that the virtual environment is not recreated if it already exists.