bcgov / DBC-APIM

DataBC OPEN API Services
Apache License 2.0
1 stars 0 forks source link

Heartbeat - Python parameters #44

Closed BK01 closed 7 years ago

BK01 commented 7 years ago

Skills / SW:

Background: https://github.com/bcgov/dbcrss/blob/master/heartbeat/README.md

Description:

Investigate and implement a new approach to passing in the request URLs to the python script. Currently the URLs are hardcoded and API key passed in as an argument. Is it possible to update the python script to be more generic and therefore universal to be used for other API request URLs? Fork and adjust as necessary. This repo uses both master and gh-pages branch.

Potential references: https://github.com/d3/d3/wiki/Time-Scales https://www.dashingd3js.com/d3js-scales

BK01 commented 7 years ago

DataBC to provide demo key.

banders commented 7 years ago

I have modified the python script to accept two parameters:

-url [URL TO TEST] -o [OUTPUT FILENAME]

The script can now be used to test the heartbeat of arbitrary URLs. Pull request is here.

Note: the Jenkins job that calls Heartbeat.py must be modified to call the script one time for each API being tested. Each call must be made with appropriate parameters. Example calls are given in the comments at the top of the .py file.