Skip to content

dappelbe/replicate

Repository files navigation

Replicate

REdcaP LogIC And Test gEnerator: Code to parse REDCap Logic expressions, either calculations or logic, and generate an Abstract Syntax Tree (AST). This AST can then be pushed into a parser that will generate a series of tests, in human-readable form, that can be used when undertaking validation.

Maintenance contributions welcome License: MIT REPLICATE Automated Tests

1. Requirements

  • PHP 7.1 and above
  • REDCap 8.8.2 as a minimum
  • Composer
  • phpunit

2. Installation

This code is intended to be utilised as a library. You can install in one of two ways:

2.1. Using Composer

If composer is not installed, please install as per the instructions at https://getcomposer.org/

composer require dappelbe/replicate

2.2. Manually:

If you are not using composer, clone this repository (as this will make it easier to keep up to date) into the directory where you are developing your code.

git clone https://github.com/dappelbe/replicate

You will then need to download the package mossadal/math-parser

3. Validation

Before using this library you should run the included unit tests to confirm that everything has been installed ok.

4. Usage Example

 use \NDORMS\REDCap\REDCapLexer;

 $lexer = new REDCapLexer();

5. How to contribute

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.

Steps to contribute:

  1. Fork this repository (link to your repository)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

6. Authors

Library created by Duncan Appelbe ([email protected])

7. Credits

Inspiration for this library has come from Frank Wikström's math-parser package - Kudos!

8. License

This project is licensed under the MIT License - see LICENSE for details.

University of Oxford © Duncan Appelbe

About

REdcaP LogIC And Test gEnerator: Code to parse REDCap Logic and generate tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published