Giter VIP home page Giter VIP logo

compliance-checker-as-pf's People

Contributors

abirger avatar agstephens avatar benjwadams avatar bobfrat avatar castelao avatar daf avatar danieljmaher avatar fxmzb123 avatar ggalibert avatar kwilcox avatar lukecampbell avatar mbarimike avatar mhidas avatar ocefpaf avatar petejan avatar piotrflorek avatar robragsdale avatar rsignell-usgs avatar

Watchers

 avatar  avatar  avatar

compliance-checker-as-pf's Issues

Fix HTML output of compliance-checker

The IOOS compliance checker allows the user to specify multiple "tests" to run on a file.
Each "test" relates to a python class where each method (whose name begins with "check_")
constitutes a check to be made on that file.

The output can be written to a number of formats using the argument -f:

  • no arguments - output to the terminal
  • -f json -o output.json - write to JSON file
  • -f html -o output.html - write to HTML file
  • -f txt -o output.txt - write to Text file

The HTML output view is very useful but it currently only writes the output of the last
test to the output file. Any other tests are ignored or overwritten.

The task is to get the HTML file to show all tests that are run and their outputs.

Here is the task broken down in detail:

  1. Fork the compliance-checker on GitHub to your local GitHub:

https://github.com/ioos/compliance-checker

  1. Clone your fork to a local sandbox, and install dependencies in a virtual environment:
git clone https://github.com/<USERID>/compliance-checker
cd compliance-checker/

virtualenv --system-site-packages venv
source venv/bin/activate

pip install -r requirements.txt
pip install -r test_requirements.txt
pip install .
  1. Test it runs:
cchecker.py -test acdd --test cf compliance_checker/tests/data/bad_data_type.nc

This should show the results of both the "acdd" and "cf" tests on the bad_data_type.nc file.

  1. Run the text output and HTML output versions of the command:

To get text output:

cchecker.py -o output.txt -f text --test acdd --test cf compliance_checker/tests/data/bad_data_type.nc

And the HTML output:

cchecker.py -o output.html -f html --test acdd --test cf compliance_checker/tests/data/bad_data_type.nc

Compare the outputs and verify that only the second ("cf") test is stored in the output.html file.

  1. Investigate the code and fix:

Find out where the HTML output is written and modify the code to fix it so that it records results of
all tests.

  1. Add tests:

If necessary, add tests to the code base.

  1. Push changes to GitHub:

Push changes to your GitHub.

  1. Create Pull Request on IOOS repository:

Create a PR on the IOOS master repo.

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.