Constructs and utilities for managing projects (Python, NodeJS etc) with Projen enforcing solid build, test and linting structures
Project description
projen-practical-constructs
Constructs and utilities for managing projects with Projen enforcing solid build, test and linting structures.
This repo have additional Constructs not present in official projen repo such as RUFF, Makefile etc.
Currently there is support for Python projects, but in the future more will be added.
Check in /examples folder the target structure that these project types will produce.
For Python project types
Project type name: python_basic
The basic stack supported by this project is:
- Makefile: scripts management
- pip: virtual environments management
- Mypy: code Type check
- RUFF: code formatting and linting
- pytest + coverage: test management
- pip-audit: dependencies vulnerability checks
- pip-tools: dependencies lock file generation (contrainsts.txt)
- vs-code plugins: code editor feedback
This project was used as reference for the target project structure created by this projen project type.
Usage
npx projen new --from projen_practical_constructs python_basic
The constructs can be used separately to adapt to your specific needs, but you can use the PythonProject construct with a default configuration of the entire stack to easily have a full project structure with build, test and linting capabilities.
Development
Tests
- We use a lot of snapshots on our tests, which in general is not a good practice. But in our case we decided to use it because there are lots of files and the snapshots will check if the file contents were changed.
- Be careful checking manually the errors on snapshots before updating them to be sure that it's not a breaking change to the users of the library
JSII
- The options of the constructs have to be "interface", not "types" because they are exposed to JSII and it works well only with interfaces
- The Project type must have an attribute with name "options" in constructor
- https://aws.github.io/jsii/specification/2-type-system/
References
- Projen quick start: https://projen.io/docs/quick-starts/python/hello-world/
- https://projen.io/docs/concepts/projects/building-your-own/
- Sample code for Python contructs: https://github.com/projen/projen/blob/main/src/python/pip.ts
- https://kennethwinner.com/2021/03/07/projen-external-module-github/
- Example project of a Python Projen Type: https://github.com/kcwinner/projen-github-demo
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file projen_practical_constructs-0.1.3.tar.gz.
File metadata
- Download URL: projen_practical_constructs-0.1.3.tar.gz
- Upload date:
- Size: 115.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cd3b1ec3606a22b43ba8b25999c4f5676bdf8515d3611fd74f0622e30b2d2ee
|
|
| MD5 |
08b8f93db6aa518f4856b88fe89b0285
|
|
| BLAKE2b-256 |
455cdc9ef92f28b97d71f323647d8b6bec97bde15a6a34ab5821fa26dff1fef9
|
File details
Details for the file projen_practical_constructs-0.1.3-py3-none-any.whl.
File metadata
- Download URL: projen_practical_constructs-0.1.3-py3-none-any.whl
- Upload date:
- Size: 114.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e5159fca9a09d152a22a171c22c005d447df41b46210a27571bab6c36c2613c
|
|
| MD5 |
bd0e0d245a3aeea672fb93f4f92a9519
|
|
| BLAKE2b-256 |
f7cf819bd93b5985e3947def0475056a3f7a9fe18f9cb73dfa0fb050395324df
|