Git Product home page Git Product logo

bird's Introduction

What are BIRD watchers? ๐Ÿ”ญ

BIRD watchers are documented test cases that can be programmatically extracted to "watch" a BIRD implementation and make sure it is correct. These test cases can be considered unit-tests. We break these up into 2 categories:

  • Derivations: Generation of Enriched Input Layer (EIL) attributes from Input Layer (IL) attributes
  • Report Mappings: Generation of report cell values from EIL attributes

Structure

Each watcher has 4 components:

  1. Documentation: A free-form collection of information that describes what the implementation should do from a business user's perspective. These are typically referred in the industry as business requirements. These should be clear, concise and thorough.
  2. Tests: A structured file(s) that conforms to the specified (JSON/CSV) test schema. The tests represent simple input/output examples that can be programmatically read and used to test software implementations.
  3. Metadata: A structured file that conforms to the specified (JSON/CSV) metadata schema. The metadata file should give a high-level overview of the watcher, what it is for, what it does and a direct link to where documentation/more information can be found.
  4. Implementations: These are actual executable files (SQL, Python etc.) contributed by community members and that pass all the tests. If a new test is added and an implementation no longer passes all the tests, it will need to be refactored in order to be included in the next release version.

Running the tests in Github CodeSpaces

Open the repository in a codespace by clicking on Code->CodeSpaces-> + in the github page (e.g. https://github.com/RBirdwatcher/bird/tree/main ) In the 'terminal' on the bottom right just type ./run_tests.sh and press return..you should see pass/fail output like:

@RBirdwatcher โžœ /workspaces/bird (main) $ ./run_tests.sh

testing primary example

{'fwd_start': 'FALSE', 'start_date': '29/09/21', 'report_date': '01/10/21', 'end_date': '-', 'trade_date': '-', 'description': 'primary example'}

Passed

testing primary example

{'fwd_start': 'FALSE', 'start_date': '01/10/21', 'report_date': '01/10/21', 'end_date': '-', 'trade_date': '-', 'description': 'primary example'}

Passed

testing primary example

{'fwd_start': 'TRUE', 'start_date': '04/10/21', 'report_date': '01/10/21', 'end_date': '-', 'trade_date': '-', 'description': 'primary example'}

Failed

testing no start date (like equities held?)

{'fwd_start': 'FALSE', 'start_date': '-', 'report_date': '01/10/21', 'end_date': '-', 'trade_date': '-', 'description': 'no start date (like equities held?)'}

Passed

testing product ends on same day as it starts

{'fwd_start': 'TRUE', 'start_date': '29/09/21', 'report_date': '01/10/21', 'end_date': '29/09/21', 'trade_date': '-', 'description': 'product ends on same day as it starts'}

Failed

testing products traded before the reporting date but starting after for technical reasons

{'fwd_start': 'FALSE', 'start_date': '03/10/21', 'report_date': '01/10/21', 'end_date': '-', 'trade_date': '01/10/21', 'description': 'products traded before the reporting date but starting after for technical reasons'}

Passed

testing start date is weekend

{'fwd_start': 'FALSE', 'start_date': '02/10/21', 'report_date': '01/10/21', 'end_date': '-', 'trade_date': '01/10/21', 'description': 'start date is weekend'}

Passed

bird's People

Contributors

muratabur avatar rbirdwatcher 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.