GithubHelp home page GithubHelp logo

lsh-0 / validate-article-json Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elifesciences/validate-article-json

0.0 0.0 0.0 10.28 MB

api-raml json-schema validation for the article-json generated by the bot-lax-adaptor

License: GNU Affero General Public License v3.0

Shell 17.52% Go 80.83% Dockerfile 1.65%

validate-article-json's Introduction

validate-article-json

api-raml json-schema validation for the article-json generated by the bot-lax-adaptor using Go.

Build

./manage.sh build

Usage

$ go run . -h
Usage of /tmp/go-build3486126079/b001/exe/validate-article-json:
  -article-json string
        path to an article-json file or directory
  -buffer-size int
        maximum number of article-json files to keep in memory at once (default 1000)
  -num-workers int
        number of workers (goroutines) to process the article-json files
        0 for number of cpu cores (default), -1 for unbounded
  -sample-size int
        number of article-json files to parse (default -1)
  -schema-root string
        path to api-raml schema root

For example:

$ time go run main.go --schema-root /path/to/api-raml/ --article-json /path/to/article-json/files/ --sample-size 10
VOR valid in	 182ms: article-json/elife-00031-v1.xml.json
VOR valid in	 424ms: article-json/elife-00048-v1.xml.json
VOR valid in	 382ms: article-json/elife-00003-v1.xml.json
VOR valid in	 421ms: article-json/elife-00005-v1.xml.json
VOR valid in	 464ms: article-json/elife-00012-v1.xml.json
VOR valid in	 472ms: article-json/elife-00007-v1.xml.json
VOR valid in	 483ms: article-json/elife-00011-v1.xml.json
VOR valid in	 524ms: article-json/elife-00047-v1.xml.json
VOR valid in	 587ms: article-json/elife-00036-v1.xml.json
VOR valid in	 640ms: article-json/elife-00013-v1.xml.json

articles:10, failures:0, workers:12, wall-time:680ms, cpu-time:4s, average:457ms

real	0m0.758s
user	0m4.969s
sys	0m0.181s

Licence

Copyright © 2024 eLife Sciences

Distributed under the GNU Affero General Public Licence, version 3.

validate-article-json's People

Contributors

lsh-0 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.