Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
openbis
openbis-public
jupyter
jupyter-openbis-gui-server
Commits
393e9635
Commit
393e9635
authored
Feb 27, 2020
by
vermeul
Browse files
Merge branch 'release/0.1.2'
parents
cd019b6b
cba59a8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
393e9635
## jupyter-openbis-server 0.1.2
-
fixed missing re import bug
## jupyter-openbis-server 0.1.1
-
the environment variables OPENBIS_URL and OPENBIS_TOKEN are now used in the connection list
...
...
jupyter-openbis-server/__init__.py
View file @
393e9635
name
=
'jupyter-openbis-server.server'
__author__
=
'Swen Vermeul'
__email__
=
'swen@ethz.ch'
__version__
=
'0.1.
1
'
__version__
=
'0.1.
2
'
def
_jupyter_server_extension_paths
():
return
[{
...
...
jupyter-openbis-server/main.py
View file @
393e9635
from
notebook.utils
import
url_path_join
import
os
import
re
from
urllib.parse
import
urlparse
import
yaml
from
notebook.utils
import
url_path_join
from
.connection
import
OpenBISConnections
,
OpenBISConnectionHandler
,
register_connection
from
.dataset
import
DataSetTypesHandler
,
DataSetDownloadHandler
,
DataSetUploadHandler
...
...
@@ -30,8 +32,8 @@ def _load_configuration(paths, filename='openbis-connections.yaml'):
config
=
yaml
.
safe_load
(
stream
)
for
connection
in
config
[
'connections'
]:
connections
.
append
(
connection
)
except
yaml
.
YAMLexception
as
e
:
print
(
e
)
except
yaml
.
YAMLexception
as
e
rr
:
print
(
e
rr
)
return
None
return
connections
...
...
@@ -63,7 +65,6 @@ def load_jupyter_server_extension(nb_server_app):
print
(
"Cannot establish connection to: {}"
.
format
(
conn
.
url
))
if
"OPENBIS_URL"
in
os
.
environ
and
"OPENBIS_TOKEN"
in
os
.
environ
:
from
urllib.parse
import
urlparse
up
=
urlparse
(
os
.
environ
[
"OPENBIS_URL"
])
match
=
re
.
search
(
r
'(?P<username>.*)-.*'
,
os
.
environ
[
"OPENBIS_TOKEN"
])
username
=
match
.
groupdict
()[
'username'
]
...
...
setup.py
View file @
393e9635
...
...
@@ -11,7 +11,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setup
(
name
=
'jupyter-openbis-server'
,
version
=
'0.1.
1
'
,
version
=
'0.1.
2
'
,
author
=
'Swen Vermeul | ID SIS | ETH Zürich'
,
author_email
=
'swen@ethz.ch'
,
description
=
'Server Extension for Jupyter notebooks to connect to openBIS and download/upload datasets, inluding the notebook itself'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment