-
Notifications
You must be signed in to change notification settings - Fork 18
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
use cylc CLI and config dir #173
Conversation
@@ -43,8 +42,7 @@ def find_version(*file_paths): | |||
# don't pin versions, we will get whatever cylc-flow needs, and not | |||
# the bleeding-edge version. | |||
install_requires = [ | |||
('cylc-flow @ https://github.com/cylc/cylc-flow' | |||
'/tarball/master#egg=cylc-8.0a3.dev'), | |||
'cylc-flow>=8.0a3.dev', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to pip install from the git repo in GH actions when implemented.
Note: travis dead, will need to test locally until convterted to GH Actions - #174 |
* put commands behind the `cylc` console script * source the base config by default * source the user config from the .cylc dir when present
613105d
to
1aa96e8
Compare
b3b6f3f
to
100ffa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine for me 👍 .. Happy to merge after comment addressed
cylc/uiserver/config_defaults.py
Outdated
from cylc.uiserver import __file__ as uis_pkg | ||
|
||
|
||
DIST = Path(uis_pkg).parents[3] / 'cylc-ui/dist' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to setup a link here:
(uiserver) sutherlander@cortex-vbox:python3.7$ pwd
/home/sutherlander/.envs/uiserver/lib/python3.7
(uiserver) sutherlander@cortex-vbox:python3.7$ ls -l
total 12
lrwxrwxrwx 1 sutherlander sutherlander 31 Feb 24 01:09 cylc-ui -> /home/sutherlander/cylc/cylc-ui
drwxr-xr-x 142 sutherlander sutherlander 12288 Feb 24 00:56 site-packages
I suppose there's a better way of doing this..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok, I'm guessing you've not installed the UIS in editable mode so cylc.uiserver.__file__
is showing up as being within the python lib rather than the UIS working copy.
I'm not sure how we are going to install the UI into the UIS yet, I think DIST
should be configurable somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should now be able to set the static path for your UI installation using the user config like so:
# ~/.cylc/hub/config.py
c.Spawner.cmd = ['cylc', 'uiserver', '-s', '<path>']
I've now made the path to the UI files a configurable traitlet. The UIS now loads in the same config file as the hub but has it's own
I'm not sure I'm working with traitlets correctly, let me know if I'm going wrong. If it's more involved, happy to drop the last commit for now. |
d277638
to
c098677
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it didn't pick my config? (ah, now
[I 2021-02-25 09:16:02.207 JupyterHub spawner:1451] Spawning jupyterhub-singleuser --port=57197
Failed to set groups [Errno 1] Operation not permitted
Traceback (most recent call last):
File "/home/kinow/Development/python/workspace/cylc-uiserver/venv/bin/jupyterhub-singleuser", line 6, in <module>
from jupyterhub.singleuser import main
File "/home/kinow/Development/python/workspace/cylc-uiserver/venv/lib/python3.8/site-packages/jupyterhub/singleuser/__init__.py", line 5, in <module>
from .app import main
File "/home/kinow/Development/python/workspace/cylc-uiserver/venv/lib/python3.8/site-packages/jupyterhub/singleuser/app.py", line 16, in <module>
App = import_item(JUPYTERHUB_SINGLEUSER_APP)
File "/home/kinow/Development/python/workspace/cylc-uiserver/venv/lib/python3.8/site-packages/traitlets/utils/importstring.py", line 30, in import_item
module = __import__(package, fromlist=[obj])
ModuleNotFoundError: No module named 'notebook'
Does it mean users must create the config elsewhere first? I assume that means users that have a jupyterhub_config.py
already in use, will have to link/copy it where cylc hub
looks for, or deploy it to a folder and start jupyterhub
?
I think Jupyterhub only ever looks for the If you already have a
Not sure how you got that traceback, is that from running |
Yes, running Running If I install with
|
If you want to bypass # run the cylc hub
# NOTE: does not source your user config automatically
$ jupyterhub -f cylc/uiserver/config_defaults.py
The In order to package the config it has to go into the source library somehow so the user was always going to have to search for the config. This way there is a command they can use which does this for them, otherwise they can locate the file using
For a non-editable install you will need to specify the ui path in your user config:
|
Thanks! |
closes #123
cylc
console scriptThe
cylc hub
script just calls Jupyterhub sourcing our configuration module which loads the default and user configuration files. This command can be called from anywhere on the filesystem and appears in thecylc help
output:I've added a preliminary user config location for now, will need to add a site configuration too, will raise the config locations (#111) at the next meetup.
closes #161
addresses #111 (full solution requires resolution of outstanding questions)
addresses #80 (the dependence on having cylc-ui and cylc-uiserver in the same dir remains for now)
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.