-
Notifications
You must be signed in to change notification settings - Fork 108
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
Rhino8 scripts #1384
Rhino8 scripts #1384
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1384 +/- ##
==========================================
- Coverage 60.25% 60.24% -0.02%
==========================================
Files 207 207
Lines 22244 22244
==========================================
- Hits 13404 13401 -3
- Misses 8840 8843 +3 ☔ View full report in Codecov by Sentry. |
|
||
return path | ||
|
||
|
||
def _get_default_rhino_ironpython_sitepackages_path_mac(version): | ||
def _get_default_rhino_ironpython_sitepackages_path_mac(version, legacy): | ||
# TODO: is there a distinction between legacy and new IronPython components on Mac? |
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 don't know
CHANGELOG.md
Outdated
* `compas_rhino.install` with no version specified installs to all available versions of Rhino. | ||
* `compas_rhino.install` installs to IronPython, IronPython (Old) and CPython environments. |
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.
could you make an overview of what is done by the install command for different versions and scenarios?
- the phrasing seems to suggest that all these installations are attempted simultaneously.
- i have not had much success with symlinking and the CPython environment (i think we should promote using
pip
in that case)
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.
- having packages installed both in the scripts folder and in the site packages folder breaks the new code editor
- in the new script editor, users should use only one technique consistently (
# r: compas, ...
v.[rhinopython] -m pip install compas ...
) because the installed packages end up in different locations and will again clash
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.
No version specified
(compas-dev) C:\Users\ckasirer\repos\compas>python -m compas_rhino.install
Install folder for Rhino version 5.0 not found: The scripts folder does not exist in this location: C:\Users\ckasirer\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts
Install folder for Rhino version 6.0 not found: The scripts folder does not exist in this location: C:\Users\ckasirer\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts
Installing COMPAS packages to Rhino 7.0 scripts folder:
C:\Users\ckasirer\AppData\Roaming\McNeel\Rhinoceros\7.0\scripts
compas OK
compas_ghpython OK
compas_model OK
compas_rhino OK
compas_timber OK
compas_bootstrapper OK
Running post-installation steps...
compas_ghpython OK: Installed 5 GH User Objects
compas_timber OK: Installed 31 GH User Objects
Install completed.
Installing COMPAS packages to Rhino 8.0 scripts folder:
C:\Users\ckasirer/.rhinocode/py27-rh8/Lib/site-packages
compas OK
compas_ghpython OK
compas_model OK
compas_rhino OK
compas_timber OK
compas_bootstrapper OK
Running post-installation steps...
compas_ghpython OK: Installed 5 GH User Objects
compas_timber OK: Installed 31 GH User Objects
Install completed.
Installing COMPAS packages to Rhino 8.0 scripts folder:
C:\Users\ckasirer/AppData/Roaming/McNeel/Rhinoceros/8.0/scripts
compas OK
compas_ghpython OK
compas_model OK
compas_rhino OK
compas_timber OK
compas_bootstrapper OK
Running post-installation steps...
compas_ghpython OK: Installed 5 GH User Objects
compas_timber OK: Installed 31 GH User Objects
Install completed.
Only Rhino 7
(compas-dev) C:\Users\ckasirer\repos\compas>python -m compas_rhino.install -v7.0
Installing COMPAS packages to Rhino 7.0 scripts folder:
C:\Users\ckasirer\AppData\Roaming\McNeel\Rhinoceros\7.0\scripts
compas OK
compas_ghpython OK
compas_model OK
compas_rhino OK
compas_timber OK
compas_bootstrapper OK
Running post-installation steps...
compas_ghpython OK: Installed 5 GH User Objects
compas_timber OK: Installed 31 GH User Objects
Install completed.
Only Rhino8
(compas-dev) C:\Users\ckasirer\repos\compas>python -m compas_rhino.install -v8.0
Installing COMPAS packages to Rhino 8.0 scripts folder:
C:\Users\ckasirer/.rhinocode/py27-rh8/Lib/site-packages
compas OK
compas_ghpython OK
compas_model OK
compas_rhino OK
compas_timber OK
compas_bootstrapper OK
Running post-installation steps...
compas_ghpython OK: Installed 5 GH User Objects
compas_timber OK: Installed 31 GH User Objects
Install completed.
Installing COMPAS packages to Rhino 8.0 scripts folder:
C:\Users\ckasirer/AppData/Roaming/McNeel/Rhinoceros/8.0/scripts
compas OK
compas_ghpython OK
compas_model OK
compas_rhino OK
compas_timber OK
compas_bootstrapper OK
Running post-installation steps...
compas_ghpython OK: Installed 5 GH User Objects
compas_timber OK: Installed 31 GH User Objects
Install completed.
I am checking this pull request too for different windows and mac versions. I am wondering if there is any problems with Rhino8 Grasshopper componentizer. But I do not know if this is valid for Python non compiled components. |
let's for now just focus on solving the legacy install problem... |
Thanks for checking it out so thoroughly. Regarding the conflict between the user objects themselves: good point. Lines 29 to 32 in 2d32ec0
We could, for example, set separate target dirs for Rhino7 and Rhino8. That way, the built user object shouldn't overwrite each other. On the installation side of things: difficult.. it's kind of unfortunate Rhino use the same directory for all kinds of components. I guess they did that so that you could sort of seamlessly transition to Rhino8, without all of your plugins disappearing. One possible solution that pops to mind is adding a pre/suffix to the user object file names. that way they can coexist. How this would look like in Grasshopper, I'm not sure. According to my calculations ;) in the Rhino 8 there are three types of components which are allowed to coexist:
The best way to deal with this may depend on what Mcneel are planning to do with GH and these different types.. maybe ironpython is going away soon? Anyways, our componentizers only produce 2 of these 3 types. To create "modern", Rhino8 components we'd need an additional componentizer (or some flag in the current ironpython one). |
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.
LGTM (let's just try and see what happens)
@tomvanmele I notice now something you've been saying all along.. I will close this PR for now until we have a better solution. Probably compile "modern" components and installing using symlinks only to the original path ( |
tasks.py
(and the requiredpythonnet
torequirements-dev.txt
).What type of change is this?
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.md
file in theUnreleased
section under the most fitting heading (e.g.Added
,Changed
,Removed
).invoke test
).invoke lint
).compas.datastructures.Mesh
.