Skip to content

Work Flow

Sara Falamaki edited this page Jun 11, 2020 · 3 revisions

Introduction

We have created a Country Package for NSW, which only includes the Entities used in NSW legislation.

In order to implement legislation, you need to use our extension template. You can then proceed to encode your Variables and Test Cases.

Git Work Flow

The code is released from the Master branch. Reviewed changes are in the Next branch. Every so often, we do a release from the Master branch, this means that the version number is bumped up, a new pypi package is generated and uploaded, a tag is created, and Master has the same content as Next. All of this is done by CircleCI.

By using the template, you will have CircleCI set up for your repo. It will do continuous integration, and loosely enforce our work flow.

We suggest you write your code in your own dev branch. Once you are happy with your code, or would like some feedback, create a PR (pull request) against the Next branch. Once the code has been reviewed, it will be merged into Next.

Code Quality

You should write multiple tests for each Formula you encode. It's best to ask Policy writers for help with the test cases, to make sure you have interpreted the rules correctly.

The MakeFile provided runs Flake8 checks on your code automatically, and CircleCI tests wont pass unless they complete correctly. This helps weed out typos and ensures your code meets the PEP8 style guide.

Please make sure you run the tests regularly to avoid having huge problems to resolve.

Semantic Versioning

We use a 3 part version number: X.Y.Z

X gets incremented on breaking API changes. Users will have to update their systems to use this new version.

Y gets incremented on non breaking API changes. For example, a new API function is added.

Z gets incremented on changes that don't change the API, for example, bug fixes.

1 API for NSW

While each project creates a standalone API, which can be used independently, we also expose a single swagger API for all of the rules we've encoded for NSW. This API will have the latest released versions of all the extensions. This is hosted on the NSW DAC Azure cloud at https://np-dit-tu-rules-as-code-appservice.azurewebsites.net/.

You can browse the functions of this API on our legislation explorer http://nsw-rules-dev.herokuapp.com/

DCS logo

Clone this wiki locally