Skip to content

workflow

Yogesh Hegde edited this page Mar 12, 2020 · 2 revisions

Porting Sensors & Adding Features Workflow

This guide is an overview of the Workflow to add feature/sensor to shunya interfaces

Before you begin Checklist

  • Ensure that the Sensor that you are porting or the feature that you are adding, has an issue on github.

Note: Issues help us track the phase of the feature.

Workflow

  1. Setup Env (Install Shunya OS)
  2. Clone Shunya Interfaces
  3. Write Code
  4. Write Examples
  5. Document the API's

Pre-requisites

  1. IoT Dev Board (Raspberry Pi 3/4 preferred)
  2. microSD card and microSD card Reader/Adapter
  3. Chosen Hardware Sensor (optional)

Step 1: Install Shunya OS.

Download and Install Shunya OS, follow this guide if you have any problems installing Shunya OS.

Boot into Shunya Interfaces and you are ready to test!.

This Step is required because we dont have instructions for cross-compilation. We will add cross-compilation in the near future. Please bear with us.

Step 2: Clone Shunya Interfaces

Running these commands below on the Terminal in Shunya OS, should get you the latest source.

# Clone the project, Skip if you have cloned the project.
git clone https://github.com/shunyaos/shunyainterfaces.git
cd shunyainterfaces

Create a new branch

Please create a new branch for the feature or sensor that you will be adding.

Branch Naming: Add Pre-fix feat- for every feature and feat-sensor- for every sensor that you are adding.

For Example:

  • feat-AWS-MQTT-support
  • feat-sensor-BME280

Running these commands on the terminal should do the trick.

git checkout develop
git checkout -b <branch-name>

Step 3: Write Code!

Now you can start writing code.

If you are porting a sensor, You can refer to the sensor porting guide.

Step 4: Write Examples

After you finish writing the code Please write examples and put it in the examples/ folder.

Checklist

  • Write examples that use the API's for the feature/sensor that you have added.
  • Make sure that you have separate examples for Simple API's and Advance API's.
  • Ensure that your Example compiles with the library.

Step 5: Document

Document all the new API's and the sensor ID's that you have added.

Documentation should be in Markdown format and should be put into /docs/docs directory. (think this through)

Checklist

  • Make sure you have documented the Sensor ID.

  • Ensure Simple API's and Advance API's are documented.

  • To @nvie for the git branching model that the project uses - Checkout link

Clone this wiki locally