Code Monkey home page Code Monkey logo

archapp's People

Contributors

klauer avatar n-wbrown avatar zllentz avatar zrylettc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

archapp's Issues

Add readme examples

  • Data between two periods of time
  • Alternative merge + resample methods
  • Others?

And:

  • Reflect the above in confluence, if not there already.
  • Maybe make a note about that intermediate resampling object

`signal` usage in `get_raw`/`get_json` incompatible with threading

The last thing I had on the docket here was to try and toss the archapp calls into a thread, in order to free up the gui while PV's were being added to the archive viewer. I tried a few things, but ended up hitting upon the fact that python's signal only works in the main thread of the main interpreter. ๐Ÿ˜ž

traceback
Traceback (most recent call last):
  File "/cds/home/r/roberttk/devrepos/atef/atef/qt_helpers.py", line 332, in run
    self.return_value = self.func(*self.args, **self.kwargs)
  File "/cds/home/r/roberttk/devrepos/atef/atef/widgets/config/data.py", line 267, in add_sig
    widget.add_signal(pv, dev_attr=dev_attr, update_curves=False)
  File "/cds/home/r/roberttk/devrepos/atef/atef/widgets/archive_viewer.py", line 314, in add_signal
    data = self.get_pv_data_snippet(pv)
  File "/cds/home/r/roberttk/devrepos/atef/atef/widgets/archive_viewer.py", line 348, in get_pv_data_snippet
    data = self.archapp._data.get_raw(pv, prev, today)
  File "/cds/home/r/roberttk/devrepos/archapp/archapp/data.py", line 166, in get_raw
    data = get_json(url)
  File "/cds/home/r/roberttk/devrepos/archapp/archapp/url.py", line 70, in get_json
    signal.signal(signal.SIGALRM, _raise_timeout)
  File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.5.1/lib/python3.9/signal.py", line 56, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread of the main interpreter

perhaps a deeper rework of archapp could help, but at least for now caching should make this less painful on repeat archive-viewer openings?

Originally posted by @tangkong in pcdshub/atef#132 (comment)

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.