Package to validate makefile contents
Project description
python-makefile-checker
Verify that scripts in your project's makefile actually exist. Use from within your GitHub actions workflow file or from python code itself!
Context
During a development cycle, it's common for files to be renamed during the end-to-end development of a pull request or project. Batch jobs that run make targets in python projects must have these files present in a filesystem to run successfully, and so renames / edits to python scripts that aren't reflected in the Makefile can have unintended consequences. It would be great to catch these errors early, before a PR is merged.
What it does
This python project publishes a package that one can use to verify that scripts listed in a Makefile actually exist within a filesystem. Since this utility is a script, it can be called from github actions itself, or from within python code itself. I'll provide an example on how to use from within a GitHub Actions workflow file below.
- Finds all makefiles from within working directory, including those that are nested in subdirectories
- Validates that the scripts those makefiles specify exist
- If scripts exist within a Makefile but not within the filesystem, an exception is raised detailing which scripts are missing
How to use
If using in a Github Actions workflow file, you can follow these steps.
First install the package
pip install makefile-checker
Add the following step to your workflow file:
- name: Check Makefile(s)
shell: bash
working-directory: <your working directory>
run: |
poetry run check-makefile
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file makefile_checker-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: makefile_checker-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.9 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e970ec46e1f25584d2a35491481ee9564278d4a7cb8e926c46b07a115f2aaf |
|
MD5 | 0ae59a00b543ba5f93ab84c8557ce3aa |
|
BLAKE2b-256 | a06305415cf364e9dd2d7a491212656779403859d1ba0caf1d0aed0d64418565 |