Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for McStas McXtrace 3.5.16 #1

Merged
merged 145 commits into from
Dec 16, 2024

Conversation

willend
Copy link

@willend willend commented Dec 16, 2024

No description provided.

nthiery and others added 30 commits November 26, 2023 14:31
This should prevent the screen from being locked with an unknown password
We have been vendoring noVNC to get vnc_lite.html,
maintaining a patch file so we could upgrade the version of
noVNC used if needed.

noVNC publishes a JS library [on
npm](https://www.npmjs.com/package/@novnc/novnc)
that we can easily use instead, and stop vendoring the whole
package! This brings us the following massive advantages:

1. No more vendoring an entire package in!
2. Upgrades of noVNC client become practically trivial
3. We can change the frontend as we wish much more easily,
   compared to having to maintain a patch file as we do now.
   PRs like
   jupyterhub#7
   become easier.

This PR:

- Adds a `package.json` to include the noVNC js package
- Adds a `webpack.config.js` to provide JS bundling, so we can just ship
  a single `viewer.js` file that has everything.
- Adds appropriate bits (stolen and adapted from jupyterhub's config)
  to package the built JS in the final wheel as necessary.
- Upgrade from noVNC 1.2 to 1.4, but otherwise keep everything the
  same. I just copied our patched `vnc_lite.html` into `index.html`,
  and just split out the JS / CSS.
- prettier with pre-commit has done its thing on the JS, CSS and
  HTML. This is fine, as I am hoping we can make more changes to the
  UI after this.
- Modify the `Dockerfile` to setup the conda env first, and then
  separately install the python package with pip. This makes local
  development *much* faster.
- Add a `.gitignore` (which this repo was missing), with
  node_modules included as well as the dist/ directory with the built
  JS.
This allows for much faster iteration, by simply mounting
$(pwd) into /opt/install
- Remove ability to connect to arbitrary hosts and ports
  via query params. We already required websockify anyway, so
  this never worked. Plus, we only care about using the viewer for
  our own purposes, not as a general purpose novnc thing
- Get rid of the ctrlAltDelete function. It's not particularly useful
  in this context. I will work on adding more UI here, but this
  location is a good place for other buttons
This is almost always a random sequence of strings and is
not useful.
Was missed when I undid all the queryparam stuff
- Include a CSS reset
- Use Jupyter Brand Colors
- Add a helpful bit of info for clipboard popout
- Uses floating-ui for a proper popover for the clipboard
- Sort out the menu to look much better
- Has a hover state and an active state
I want to provide a button to the Hub Control Panel
when we are running under a JupyterHub. This requires conditional
rendering in some way - either we render the initial HTML as
a template, or setup an API endpoint that JS can use.

This PR templatizes the initial rendering. The following changes
are made:

1. Convert into a Jupyter Server extension. This gives us the
   flexibility we need here.
2. Inherit a handler directly from jupyter_server_proxy, enabling
   us to use the *same* URL for both the initial HTTP rendering
   and the websockify!

However, this means we lose the launcher icon - let's try
mitigate that somehow.
This is simpler than inheriting from the proxying handler
from jupyter_server_proxy directly, and more importantly keeps
our launcher entry simple and existing!
yuvipanda and others added 26 commits July 18, 2024 18:56
Resize desktop to window, instead of scaling
* Python 3.10 based image
* MantidWorkbench Desktop app (and Mantid python classes) installed via conda
* McStas installed via conda
* McStasScript installed via pip
* FullProf Desktop app
In Ubuntu 22.04 `netcat` was an alias for `netcat-openbsd`. This isn't present in 22.04 which base-notebook was recently upgraded to.
Separate screenshots for turbovnc and tigervnc
Install netcat-openbsd in tests and update screenshots for ubuntu 24.04
Pin dockerfile SHA, bump monthly with dependabot
(docker.io build pending upload of McXtrace conda package)
Bumps jupyter/base-notebook from `876e3c3` to `116c698`.

---
updated-dependencies:
- dependency-name: jupyter/base-notebook
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
…upyter/base-notebook-116c6982d52b25e5cdd459c93bb624718ecb2f13c603e72001a6bf8b85468a00

Bump jupyter/base-notebook from `876e3c3` to `116c698`
Copy link

github-actions bot commented Dec 16, 2024

Binder 👈 Launch a binder notebook on this branch for commit 4fa0622

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit e2cedca

Binder 👈 Launch a binder notebook on this branch for commit 3c327c3

@willend willend merged commit 9be7d29 into McStasMcXtrace:main Dec 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants