Git Product home page Git Product logo

onsdigital.eq-publisher-v3's Introduction

eq-publisher-v3

A new version of eq-publisher for translating questionnaires built in Author into Runner V3 format. When finished, this project will replace eq-publisher within the eq-author-app repository.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. There are no deployment steps as this project is in development.

Prerequisites

eq-author-app is currently supports NodeJS version 10 and prior, therefore this application does the same. To swap to version 10, run nvm install 10 && nvm use 10 in the terminal, beneath the eq-publisher-v3 directory.

Installing

  1. Clone the repository
  2. Run yarn to install the dependencies
  3. Run yarn start to boot up the application

Development

Testing whether a converted schema is returned relies on passing author json to eq-publisher-v3.

It may be easier to set up an endpoint collection in Postman to view the converted schema.

If validating a schema during development envrionment variable EQ_VALIDATOR_URL is needed.

When the validator URL is set, it is possible to hit the /publish/validate endpoint for more detailed error messages.

Run yarn develop to start the application with Nodemon. Nodemon automatically refreshes the application when source files change, making development easy.

Running the tests

Run yarn test to kick-start the unit tests. Our unit tests are written in Jest, which allows a variety of flags to be passed along with the start command; you may use these at your leisure.

Run yarn test to run Jest on file changes.

We do not currently have end-to-end tests.

Coding style tests

Run yarn lint to examine the code for any common styling issues. We do this to ensure we write quality and consistent code.

Deployment

There are no deployment steps as this application is currently in development.

API Reference

Method Endpoint Description
POST /publish Convert author JSON into Eq/Runner JSON
POST /publish/validate Validates converted JSON with a schema validator

Publish

Converts author JSON to Eq/Runner V3 and returns the result

Validates converted questionnaire against schema

onsdigital.eq-publisher-v3's People

Contributors

jasehumphr avatar martyncolmer avatar mattelcock avatar tbaggaley avatar tjamesmac avatar zimboflyman 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.