2.5.0 • Published 2 years ago

edk-route-verifier v2.5.0

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

EDK Route Verifier

CircleCI jest Cypress.io tests npm

EDK Route Verifier is a tool which allows user to verify provided KML file with EDK route against predefined set of rules (eg. minimal length) and provide route characteristics (eg. length, elevations).

It is delivered in 3 different flavours: API server, CLI tool and UI version.

UI

CLI

Usage

Prerequisities

  • NodeJS >= v12.x (using ES modules)
  • Google Maps API Key (using the following APIs: Google Maps Elevation API, Google Maps Embed API, Google Maps JavaScript API)

Installation

npm install --global edk-route-verifier

Configuration

You need to create JSON configuration file containing at least Google Maps API key.

You can use config.json.template file as a base.

Start

Check out usage at in CLI usage documentation or just execute:

edk-route-verifier --help

To start verifier you will need configuration file created in previous step. To run verifier as API server execute:

edk-route-verifier server -c config.json

Flavours

EDK Route Verifier is delivered in 3 different flavours:

  1. API - starts HTTP server exposing verification endpoint
  2. CLI - allows user to verify EDK route from command line
  3. UI - allows user to verify EDK routes with web UI

Testing

Local

Tests are developed using Jest and Cypress frameworks. All test-related code is stored in test subdirectory.

To run all tests (UI, API, CLI + static code analysis):

npm run test

Continuous Integration

CircleCI web application is used as for CI management. See .circleci/config.yml file for details of the build and test job configuration.

You can create your own branch, push it to remote and CI will start automatically. That way you can test your code even if you don't have local environment configured (NodeJS, Google Maps API Key, etc.).

Deployment

edk-route-verifier is published in NPM registry.

Follow this step-by-step guide to publish new version: 1. Create configuration file conf/config.json 2. Checkout master branch 3. Execute npm run publish:[prerelease|patch|minor|major] 4. After successful execution, check CircleCI 5. If everything went fine, then create release in GitHub releases