Skip to content

Use jsroot 7.9.0 in jupyter and http server docu [6.36] #18517

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

Merged
merged 2 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bindings/jupyroot/python/JupyROOT/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
################################################################################


from __future__ import print_function

import os
import sys
import select

Check failure on line 20 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:20:8: F401 `select` imported but unused
import tempfile
import itertools

Check failure on line 22 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:22:8: F401 `itertools` imported but unused
import re
import fnmatch
import time
Expand Down Expand Up @@ -74,7 +74,7 @@

// We are in jupyter notebooks, use require.js which should be configured already
requirejs.config({{
paths: {{ 'JSRootCore' : [ 'build/jsroot', 'https://root.cern/js/7.7.4/build/jsroot', 'https://jsroot.gsi.de/7.7.4/build/jsroot' ] }}
paths: {{ 'JSRootCore' : [ 'build/jsroot', 'https://root.cern/js/7.9.0/build/jsroot', 'https://jsroot.gsi.de/7.9.0/build/jsroot' ] }}
}})(['JSRootCore'], function(Core) {{
display_{jsDivId}(Core);
}});
Expand All @@ -97,7 +97,7 @@
// Try loading a local version of requirejs and fallback to cdn if not possible.
script_load_{jsDivId}(base_url + 'static/build/jsroot.js', function(){{
console.error('Fail to load JSROOT locally, please check your jupyter_notebook_config.py file');
script_load_{jsDivId}('https://root.cern/js/7.7.4/build/jsroot.js', function(){{
script_load_{jsDivId}('https://root.cern/js/7.9.0/build/jsroot.js', function(){{
document.getElementById("{jsDivId}").innerHTML = "Failed to load JSROOT";
}});
}});
Expand Down Expand Up @@ -231,7 +231,7 @@
out = ""
try:
out = check_output(command.split())
except:

Check failure on line 234 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E722)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:234:5: E722 Do not use bare `except`
if errMsg:
sys.stderr.write("%s (command was %s)\n" %(errMsg,command))
return out
Expand All @@ -246,7 +246,7 @@
the library, which we then load.
'''
command = 'root -l -q -b -e gSystem->CompileMacro(\"%s\",\"k\")*0'%fileName
out = _checkOutput(command, "Error ivoking ACLiC")

Check failure on line 249 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F841)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:249:5: F841 Local variable `out` is assigned to but never used
libNameBase = fileName.replace(".C","_C")
ROOT.gSystem.Load(libNameBase)

Expand All @@ -261,7 +261,7 @@
>>> _codeToFilename(code)[-2:]
'.C'
'''
code_enc = code if type(code) == bytes else code.encode('utf-8')

Check failure on line 264 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E721)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:264:24: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
fileNameBase = sha1(code_enc).hexdigest()[0:8]
timestamp = datetime.now().strftime("%H%M%S%f")
return fileNameBase + "_" + timestamp + ".C"
Expand All @@ -279,12 +279,12 @@
'''
fileName = _codeToFilename(code)
with open (fileName,'w') as ofile:
code_dec = code if type(code) != bytes else code.decode('utf-8')

Check failure on line 282 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E721)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:282:26: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
ofile.write(code_dec)
return fileName

def isPlatformApple():
return _getPlatform() == 'darwin';

Check failure on line 287 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E703)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:287:37: E703 Statement ends with an unnecessary semicolon

def invokeAclic(cell):
fileName = _dumpToUniqueFile(cell)
Expand Down Expand Up @@ -317,7 +317,7 @@

cnt = 0
for n in range(colors.GetLast()+1):
if colors.At(n): cnt = cnt+1

Check failure on line 320 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E701)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:320:22: E701 Multiple statements on one line (colon)

# add all colors if there are more than 598 colors defined
if cnt < 599 or prim.FindObject(colors):
Expand All @@ -338,7 +338,7 @@
canvas_json = ROOT.TBufferJSON.ConvertToJSON(canvas, 23)

# Cleanup primitives after conversion
if style is not None: prim.Remove(style)

Check failure on line 341 in bindings/jupyroot/python/JupyROOT/helpers/utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E701)

bindings/jupyroot/python/JupyROOT/helpers/utils.py:341:24: E701 Multiple statements on one line (colon)
if colors is not None: prim.Remove(colors)
if palette is not None: prim.Remove(palette)

Expand Down
4 changes: 2 additions & 2 deletions net/http/src/THttpServer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ void THttpServer::AddLocation(const char *prefix, const char *path)
///
/// One could specify address like:
///
/// * https://root.cern/js/7.6.0/
/// * https://jsroot.gsi.de/7.6.0/
/// * https://root.cern/js/7.9.0/
/// * https://jsroot.gsi.de/7.9.0/
///
/// This allows to get new JSROOT features with old server,
/// reduce load on THttpServer instance, also startup time can be improved
Expand Down
Loading