question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Testing web browser backend

See original GitHub issue

Ginga has a new backend, targeting canvases in HTML5 compliant browsers. I am looking for early feedback on this capability. You will need at least commit 97ec3d5e25a4c77498138d3db46cf74b3a20772e or later.

The easiest test right now is example2_pg.py Run it like this:

    $ python .../path/to/ginga/examples/pg/example2_pg.py --loglevel=20 --stderr path/to/some/fitsfile.fits

The very last line of the log output should tell you a URL to visit with an HTML5/websockets compliant browser. Visit this page and click on the link for the Ginga window. You should get something that looks like this: ginga_web_screenshot

But of course with your FITS file.

Helpful additional packages

For full functionality with graphical overlays you will need one of {aggdraw|PIL/pillow||opencv (cv2)} modules installed on the server side. PIL is a pretty common library included in many distributions. aggdraw provides the most complete experience similar to the native widgets (qt/gtk/tk)–you can get it here; currently it only supports python 2. opencv provides a huge boost to rotation performance, no matter what what widget set you are using. If you have it installed, add the --opencv flag to the command invocation.

Non-local access

The example program also supports the --host and --port options for listening on alternate interfaces. Start the example with:

--host=  

i.e. empty host to have the example listen on all interfaces. You can then connect from any other system that can connect to this host.

Sharing

Windows are shareable. This has interesting applications for collaboration. To test it, simply open another browser window to the same address, possibly from a different host.

Trackpad

In the example, there is a checkbox for “I’m using a trackpad”. Check it if you are, you will have a more pleasant experience zooming the window.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:25 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
austinbeauchcommented, Jul 6, 2017

Hi @ejeschke,

I’ve been working with Ginga’s web backend as in example2_pg.py and noticed there might be a slight hiccup when creating the viewer widget as on line 75 of example2_pg.py:

w = Viewers.GingaViewerWidget(viewer=fi)

There’s no issue there, but trying to create a different sized window using a command such as

w = Viewers.GingaViewerWidget(viewer=fi, width=1000, hiehgt=1000)

didn’t work and I noticed that lines 15/16 of Viewers.py could be altered in the slightest way.

def __init__(self, viewer=None, width=600, height=600):
   super(GingaViewerWidget, self).__init__(width=600, height=600)

could be changed to

def __init__(self, viewer=None, width=600, height=600):
   super(GingaViewerWidget, self).__init__(width=width, height=height)

so that the default values could be changed. It’s the smallest change and I doubt anyone will ever make use of it (I’m not even sure if we need any different sizes other than 600x600), but I could make a quick pull request with the change if you wanted!

0reactions
ejeschkecommented, Jul 6, 2017

@austinbeauch, I’d be happy to receive your PR!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frontend Testing vs Backend Testing: What's the Difference?
Backend testing is a type of testing that checks the Application and Database layer of a 3 Tier Architecture. In a complex software...
Read more >
Web Application Testing Complete Guide (How To Test A ...
Test web applications on different browsers like Internet Explorer, ... to be tested at the backend of every website that as system testing, ......
Read more >
Backend Testing Explained (Tools & Cases) | Mailtrap Blog
Backend Testing verifies the functionality of software's or application's serverside and database. This testing method makes sure that all ...
Read more >
Introduction to cross-browser testing - Learn web development
Cross-browser testing is the practice of ensuring that a website works across various browsers and devices. Web developers should consider:.
Read more >
Frontend Testing vs Backend Testing: What's the ... - Testsigma
Frontend testing is the testing of the user interface visible to the user by which users interact with the application. In contrast, backend...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found