title |
---|
Contributing |
If you would like to become an active contributor to this project, please submit an issue with the contributor template.
In this strategy, there is only a single branch or "source of truth" - the master
branch. The idea behind this strategy is to minimize the amount of human interaction required to maintain branches and to minimize the overrall number of maintained branches in general.
-
When developing a new feature or resolving a bug, checkout to a
features/*
orbugs/*
branch using your approved GitHub issue number. For example,features/git-issue-6
. -
When you are finished developing, you'll push your code and create a pull request to the
master
branch. -
Once the branch is approved and merged the branch will be deleted.
-
Clone the repository or pull the latest changes from
master
.git clone git@github.com:dgonzo27/py-iot-utils.git && cd py-iot-utils git pull origin master
-
Install and enable pre-commit.
pre-commit install
-
Checkout to a
features/*
orbugs/*
branch.git checkout -b features/git-issue-27
-
Create and activate a virtual environment.
python3 -m venv .venv source .venv/bin/activate
-
Install
dev-requirements.txt
.python3 -m pip install --upgrade pip python3 -m pip install -r requirements-dev.txt
-
Build a package.
cd iot-storage-client python3 -m build cd ..
-
Test a package.
cd iot-storage-client coverage run -m unittest discover tests -b coverage report -m cd ..
-
Deactivate virtual environment.
deactivate
This application is developed using React and Material UI. It is packaged into a Docker image that leverages a multi-stage build, running NGINX under the hood. This image is deployed to the Azure Container Registry and is run as a containerized App Service all through the use of Terraform and GitHub Actions.
In order to support and develop against the official documentation app, there are a few pre-requisites.
-
Local development should be done from a UNIX-based machine - use Linux, MacOS or WSL2 if you're on a Windows machine.
-
NPM should not be installed globally on your machine. Instead, manage your version of NPM with Node Version Manager. This application is currently being developed with the LTS version of node - v16.16.0 at the time of writing (npm v8.11.0).
-
Docker Desktop should be installed on your machine for building and validating images that are run in cloud environments. It is not sufficient to only develop and test using the
npm start
command. You will want to build and run your Docker images to ensure a successful deployment to the cloud.
Before contributing to this repository, please review the code of conduct.