Skip to content

pyranha-labs/build-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Tools

Cross-project setup and build tools that guarantee code/process consistency and quality.

Table Of Contents

How Tos

Installation and usage will vary based on the external project goal. The tools in this repository are designed to be used as either:

  • Starter templates to be copied into a project.
  • Pulled on-demand by the template once placed into a project.

Either way, the tools will typically not be used directly from a full clone of this project. Example use case:

  1. Copy the Python starter Makefile template from this project into a new project.
  2. Update the placeholders.
  3. Commit the completed template for future use.
  4. Use recipes, such as make setup and make wheel to configure the Python project and build a Python wheel.

Install Python Project Starter Makefile

  1. Copy the python-starter.mk template to Makefile in a new project.
  2. Update the placeholders at the top of the file.
    • UPSTREAM is required, and must be the project's upstream git repository path.
    • PYLINT_EXTRAS is optional, and can be used to add additional file(s)/folder(s) to the lint jobs.
  3. Run make setup to set up the project and clone the Python common recipes for future use.
  4. Optional: Follow Use Python Common Recipes as needed.

Install Python Common Makefile

The process is performed automatically by the Python project starter Makefile. To use the file manually:

  1. Copy the python.mk to python.mk in an existing project.
  2. Add -include python.mk to the top of the primary Makefile in the project.
  3. Follow Use Python Common Recipes as needed.

Use Python Common Recipes

  1. Run make <recipe> to perform a specific Python-based process. Example: make test.

The Python common Makefile contains the following recipes:

  • venv - Create a Python virtual environment for development/testing.
  • clean-venv - Remove the Python virtual environment.
  • format - Check source code format for consistent patterns.
  • lint - Check for common lint/complexity/style issues.
  • typing - Check typehints for static typing best practices.
  • security - Check for common security issues/best practices.
  • qa - Check full code quality suite (minus unit tests) against source.
  • test - Run basic unit tests.
  • wheel - Package the library into a pip installable.
  • release - Package the library into a pip installable.
  • clean - Remove the packages from previous builds.

Use Python Release Builder

The process is performed automatically by the make release shared python recipe. To use the file manually:

  1. Copy the build_python_release.sh to build_python_release.sh in an existing project.
  2. Run build_python_release.sh.
  3. Follow the steps printed to upload.

Contribute

Refer to the Contributing Guide for information on how to contribute to this project.

About

Lightweight tools for development setups and builds.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors