Giter Club home page Giter Club logo

dgc-business-rules-testdata's Introduction

Digital COVID Certificates: Business Rules testdata

AboutOrganisationTesting & StatusLicensing

About

This repository holds business rules to determine whether a person is deemed fit-for-travel into a country-of-arrival (CoA) based on their vaccination, test, and recovery status, as encoded using the Digital COVID Certificate. The status of the business rules here is unofficial: the actual rules will be available from the DCGC Gateway. Its main purpose is to help with developing interchangeable business rules.

This repository performs automatic validation and testing on all the rules, and their tests, contributed to it. This validation and testing runs on every Pull Request, but can also be run locally from the commandline, as follows:

$ (cd tooling ; sh build.sh)

The “CertLogic Validation” GitHub Action performs this exact same command. It requires a UNIX-like shell, Git, curl, and a recent Node.js (with the NPM package manager) to be installed.

After having run this command once, you can just run the validation/testing as follows:

$ (cd tooling ; npm test)

Validation encompasses the following:

  • The JSON file of every rule is validated against this JSON Schema.
  • The Logic field of every rule is validated as a CertLogic expression, which is a format/language that's specified here.
  • The specified AffectedFields field is checked against the fields of the DCC payload accessed from the Logic field.
  • ...more validations and checks to follow

Testing means that all rules' tests are executed using the JS-implementation of CertLogic. JSON files containing tests must adhere to this JSON Schema.

All rules are also executed against every DCC found in the DCC test data repo. The results are exposed as an artifact (called rules-on-testData.json) of the "Validation and Testing of Rule Sets" GitHub Action.

Organisation

This repository contains the following:

  • GitHub Actions configuration
  • tests: testing material called by the “Business Rule Validation” GitHub Action
  • tooling: testing material called by the “CertLogic Validation” GitHub Action
  • EU: EU template/recommendation rules
  • DE, FI, NL, etc.: actual rules for EU Member States

Testing & Status

  • If you found any problems, please create an Issue.
  • Current status: Work-In-Progress + see above.

Licensing

Copyright (c) 2021 Dutch Ministry of Health, Science, and Sports, and all other contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE for the specific language governing permissions and limitations under the License.

dgc-business-rules-testdata's People

Contributors

dslmeinte avatar schulzesttsi avatar ggrund-tsi avatar astagi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.