Documenting your block
There is a standard way to document a nio Block. Much of this documentation can be generated automatically using the
These instructions assume that you are working in a nio project directory or that your block directory is inside of a directory labeled
blocks. In other words, "the root of your project" is equivalent to the directory where you can access your block repo with the path
blocks/<your block repo>.
release.jsonfile. Once you have built your block, navigate to the root of your project directory (or, if you aren't developing your block in a project directory, to the directory below
blocks/<block repo name>) and type
nio buildrelease <block repo name>
This will create a
release.jsonfile with meta information about your block.
spec.jsonfile. To create your
nio buildspec <block repo name>
Navigate into your
spec.jsonfile and manually add a text string description to any key labeled "description". You will need to add a description to the block and its properties, commands, inputs, and outputs.
"description": "List of attribute names and corresponding values to add to the incoming signals."
README.mdfile. Once your
spec.jsonis complete, you are ready to build your block's README. Navigate into the block folder and type
This will populate the README. Manually add any dependencies in this format
Dependencies ------------ - face_recognition - numpy - opencv-python
You can also add example code and other helpful information at the bottom.
Finally, check your block. To check your block, remain in your block directory and run
to check and lint your block. It will check PEP8 styles, confirm you have added descriptions to your
spec.json, and check your
release.json, and class and file names.