-
Notifications
You must be signed in to change notification settings - Fork 54
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
Make Rosie Work under packaging (branched from #2360) #2366
Make Rosie Work under packaging (branched from #2360) #2366
Conversation
May want to rebase - squash :) |
4564d64
to
ff73042
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.
Note that at present pip
installing Rose doesn't quite work as due to an incompatibility with 8.0a0
which is all we have on pipy right now. I've tested against master using the following diff and all is fine:
diff --git a/setup.py b/setup.py
index 8303bd3c3..062720788 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,10 @@ with open("README.md", "r") as fh:
INSTALL_REQUIRES = [
"jinja2>=2.10.1, <2.11.0",
- "cylc-flow==8.0a0",
+ (
+ 'cylc-flow @ https://github.com/cylc/cylc-flow'
+ '/tarball/master#egg=cylc-8.0a1.dev'
+ ),
"aiofiles",
"tornado",
"sqlalchemy",
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.
Technically sound, tested as working.
Some documentation issues resulting from an over-zealous search and replace:
b158578
to
e29e859
Compare
(Unassigning myself for review, as discussed with Tim offline. I'm not the best placed to review this one, having little experience with packaging.) |
9bd39fd
to
f2769fb
Compare
OK, I think we are good to go here, you've managed to do that thing with your commits where they are all duplicated for some reason. Can you squash them down? And how the heck does this happen anyway! |
4004012
to
49d422b
Compare
* Get rid of ROSE_HOME * Lots of syntax help from Oliver Sanders * Made refs to isodatetime work with metomi.isodatetime
49d422b
to
ea60ad9
Compare
I think this was caused by me working on a branch of a branch whilst the first branch was under review and the rebasing or merging badly after making changes to the first branch. I can't squash them easily. I took a diff and created something new that should be tidier. Detail has been lost though. |
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.
Tentative approval! I think this is OK, installed locally pip install -e .
.
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.
Installed via pip install -e .
with no issues.
(venv) kinow@kinow-VirtualBox:~/Development/python/workspace/rose$ python -c 'from metomi.rose import __version__;print(__version__)'
2.0.0alpha3
pip show -f metomi-rose
is behaving a bit weird, but in the issues I found related to the message "Cannot locate installed-files.txt" the issue was actually elsewhere (e.g. in pip or wheels).
And after installing with pip install .
(not editable) pip show -f metomi-rose
works. Looking at the files generated, METADATA
is missing platform, but I don't think that's a blocker. I don't know rose well enough, but I think I spotted something that could prevent rosie from working, so will add comments for @wxtim or somebody else to take a look.
But great work! You did it really quick, something that took me over a month to get it right-ish for Cylc Flow haha. 👏 And packaging in Python is probably one of the hardest, when comparing with other programming languages like PHP, JavaScript, and Java.
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.
@wxtim I have finished adding a bunch of comments, then re-read the ticket description, but from this part "this ticket is to re-activate them", I reckon you've accomplished what was desired here.
Feel free to resolve my comments and merge if you'd like. These comments can all be tackled in another ticket later, as I think this one was just to re-enable tests.
import rosie.suite_id | ||
import rosie.ws_client | ||
import rosie.ws_client_cli | ||
import pygraphviz |
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.
This is raising an issue in my virtual environment, due to pygraphviz
not being installed after pip install .
. I don't see any graphviz related dependencies in setup.py
... is this file used by rose
or rosie
? If so, we may need to include the dependencies in setup.py
.
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.
Yes. Thanks!
This is nasty: 😞 - I'm afraid there is more work to be done on removing pygraphviz from the dependency tree in both rose and rosie. I failed to notice this because of the skips in the tests.
Pygraphviz can be installed via conda, but there is no surety of installing it correctly using pip, and therefore, since we are planning to remove it anyway it should be removed. It looks fairly involved, however, since it needs to change rosie graph and rose graph significantly so with the permission of @kinow @oliver-sanders I'm going to suggest that it should be a separate issue.
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.
Yep, this dependency has been left floating about, it will be removed in due course, I think we will copy the solution from the new Cylc Graph.
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.
For now either delete rosie graph
or add pygraphviz
to the dependencies (note it's a bit of a pain to install).
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.
@kinow I'm afraid I'm just going to leave this for this PR and create a new issue to deal with removing this. There's no point getting this test working as the item tested will be removed and re-written in the new GUI. I do not want to include pygraphviz in the package dependencies since the need for it will be removed.
issue #2369 created
Really didn't want to block the PR. If you prefer to move some of the work here for later please feel free. I just got confused because I read the title and went straight to review it without reading the issue description, sorry! One thing that I saved for later but that's bugging me is an alert on my IDE, that I tested later and indeed didn't work... again, not blocker, but if you are looking at the code again, perhaps you could try and let me know if this works for you (I think your environment is slightly different with miniconda, conda, etc... so it could be my environment). (venv) kinow@ranma:~/Development/python/workspace/rose$ python
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from metomi.rose.macro import get_macros_for_config
>>> get_macros_for_config(config=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kinow/Development/python/workspace/rose/metomi/rose/macro.py", line 802, in get_macros_for_config
config = metomi.rose.config.ConfigNode()
UnboundLocalError: local variable 'metomi' referenced before assignment
>>>
|
No @kinow , I think I should bite the bullet and do it. So nearly there... |
In that case happy to try to help testing. Let me know if you need anything 👍 |
Had the same issue - have had a go at fixing it. |
* tiny fix for Kinow's Rose Macro issue * remove foolish sed errors
8de2192
to
5430107
Compare
7f5bfea
to
306c27b
Compare
Annoyingly this is now failing because of the issue described in #3216. 🤦♂️ |
@kinow - Think I've fixed this one! |
PR #2360 deactivated tests for rosie and rosa in the packaged version of rose. This ticket is to re-activate them: