Giter VIP home page Giter VIP logo

hepdata-converter-ws's Introduction

HEPData

GitHub Actions Build Status Coveralls Status License Docker Image Size GitHub Issues Documentation Status

The Durham High-Energy Physics Database (HEPData) has been built up over the past four decades as a unique open-access repository for scattering data from experimental particle physics. It currently comprises the data points from plots and tables related to several thousand publications including those from the Large Hadron Collider (LHC). HEPData is funded by a grant from the UK STFC and is based at the IPPP at Durham University.

HEPData is built upon Invenio v3 and is open source and free to use!

Research notice

Please note that this repository is participating in a study into sustainability of open source projects. Data will be gathered about this repository for approximately the next 12 months, starting from June 2021.

Data collected will include number of contributors, number of PRs, time taken to close/merge these PRs, and issues closed.

For more information, please visit the informational page or download the participant information sheet.

hepdata-converter-ws's People

Contributors

alisonrclarke avatar eamonnmag avatar graemewatt avatar jstypka avatar michal-szostak avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hepdata-converter-ws's Issues

Installation

As a relatively simple package I would suggest creating pip package for installation, instead of documentation describing how to do it "by hand". Of course possible connection of this service to any "real" web server (ngnix / apache / etc) would require additional manual work, but it would still be much better then doing it "invenio style"

If we're doing this style of installation then where should configuration be placed? /etc/hepdata-converter-ws/ sounds like a resonable idea.

Any comments @eamonnmag @jstypka ?

Add support for Sentry

See https://docs.sentry.io/platforms/python/flask/ . The dsn variable can be omitted from the configuration, since the SENTRY_DSN environment variable will be passed at runtime in deployment on the Kubernetes cluster at CERN.

For testing, it would be good to add the /debug-sentry endpoint as described in the Sentry docs.

WS return values

I originally was thinking that returned value in response to request should simply be a file, but how should multiple file formats be resolved then (mainly YAML)? Maybe a proper JSON response is more in order (with Base64 encoded binary?) though it would put additional strain on the service receiving data.

Another option may be to send tar.gz (or other compressed file format) with all files packed into it.

What do you think? @eamonnmag @jstypka

Webservice error handling could be improved

If the hepdata_converter.convert function fails, for example if the YAML does not validate, currently there is no error handling by the web service, so no useful info is passed back to the client.

We could modify the API to send back a 400 error response with an appropriate error message in the case of failure.

Decouple hepdata-converter-ws and hepdata-converter-ws-docker circular dependency

There's currently a circular dependency between hepdata-converter-ws-docker and hepdata-converter-ws: the docker image includes hepdata-converter-ws in its requirements, but the hepdata-converter-ws package runs its tests on the hepdata-converter-ws docker image.

We should instead run the hepdata-converter-ws tests on the hepdata-converter docker image. (It will need to install its requirements.) Then the hepdata-converter-ws docker image can install hepdata-converter-ws from pypi so it can run the service.

We'll need to move the requirements.txt from the docker repo. We should also see if we can install them for travis using the setup.py rather than a separate requirements.txt.

hepdata-converter-ws script has error during launch

Every time that script hepdata-converter-ws is run the following stack trace is produced:

Traceback (most recent call last):
  File "/usr/local/bin/hepdata-converter-ws", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/hepdata_converter_ws/__init__.py", line 33, in main
    app.run()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 772, in run
    run_simple(host, port, self, **options)
  File "/usr/local/lib/python2.7/site-packages/werkzeug/serving.py", line 623, in run_simple
    reloader_type)
  File "/usr/local/lib/python2.7/site-packages/werkzeug/_reloader.py", line 229, in run_with_reloader
    reloader.run()
  File "/usr/local/lib/python2.7/site-packages/werkzeug/_reloader.py", line 120, in run
    for filename in chain(_iter_module_files(), self.extra_files):
  File "/usr/local/lib/python2.7/site-packages/werkzeug/_reloader.py", line 22, in _iter_module_files
    filename = getattr(module, '__file__', None)
  File "/usr/local/Cellar/root6/6.04.00/lib/root/cppyy.py", line 131, in __getattr__
    klass = _backend.CreateScopeProxy( name, cls )
TypeError: requested class '__file__' does not exist

This error happens on MAC OS X, investigation must be made to check if it also happens on other systems (CentOS, Ubuntu)

@eamonnmag - that may be the reason why it didn't work with docker... but it did not produce any stack trace, so those two may be unrelated

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.