Replies: 10 comments 3 replies
-
environment.yml is a file in the cadquery repository. At this point, since you have already created a conda env named "cq-dev" (with working cadquery, cq-editor), you can skip You should however install black and mypy (part of the environment.yml dependencies list and useful later):
You can activate your "cq-dev" env, then install cadquery in editable mode with pip.
Now try running cq-editor again in this conda env. It will pick up your local cadquery changes. |
Beta Was this translation helpful? Give feedback.
-
Thanks for providing additional information. I have removed my old "cq-dev" and tried to start again from scratch, just to create a step-by-step-procedure and see whether everything works. I made some progress, but I missed the final target. Something is still missing or I did it wrongly or in the wrong sequence. In the "mamba list" I got an entry for cadquery with revision 0.0.0, but I do not see any entry for Below is the step-by-step-procedure I have tried:
|
Beta Was this translation helpful? Give feedback.
-
I feel myself like Odysseus. The path to a working developer environment is very stony ... Issue #1286 should not have much impact of what we are doing here. I ignore this for the moment. I have removed my "cq-dev" by executing: Then I restarted my procedure with step 2.
Step 3e failed. See output below:
Some things need further clarification:
|
Beta Was this translation helpful? Give feedback.
-
cq-editor does not currently support python 3.11 - conda packages are not built for 3.11. I'd suggest to create a new conda env with python 3.10. Then proceed with the install.
miniforge/mambaforge set conda-forge as the default channel. You can omit
The instructions suggest to install from the environment.yml file. Yes, it's possible to skip that and install cq-editor which brings cadquery. Again, you then need to manually install the other dev dependencies.
Yes, you can use an external text editor of your choice and use cq-editor as the model viewer.
Say your cadquery script is myscript.py.
Yes, To run your script standalone, outside cq-editor (say for the purpose of exporting to STEP) you must comment out or remove the show_object call. If you would like to run your script in cq-editor or standalone, without changes to the script, you can conditionally call show_object: if "show_object" in locals():
show_object(result) |
Beta Was this translation helpful? Give feedback.
-
The puzzle is almost complete ... Here is my improved step-by-step procedure:
I have restarted from scratch again by calling first mamba env remove --name cq-dev and then I have executed the procedure beginning with step 2. Now the steps from 2 to 6 are successful. All I have added step 7, just to see which cadquery-code is executed. For this purpose I have created a simple "myscript.py"
This will create an output-file named "output.svg". With step 7g I make a small modification inside svg.py in my
After this modification I have run "myscript.py" again with the hope that the added xml-comment appears in |
Beta Was this translation helpful? Give feedback.
-
What is the output of |
Beta Was this translation helpful? Give feedback.
-
Same procedure as every day ... It seems yesterday I did not perform exactly what my step-by-step procedure has told me! My fault, today the re-execution of the command-list was successful! @lorenzncode great thanks to you for your help and your patience. "cq-editor" has really run the code from my local "cadquery". Below is the expected result:
Outlook for the next days. I will create some real models with cadquery. And after that I will come back to issue #1282. Again, big thanks to the entire cadquery-team, this is great work. |
Beta Was this translation helpful? Give feedback.
-
Good to hear @Paul8043.
Thanks @adam-urbanczyk - confirmed working for me on Linux, and Windows. |
Beta Was this translation helpful? Give feedback.
-
May I come back to the proposal with the "environment.yml" mentioned in Readme.md, section "contributing code".
With the learnings from the last days I know the "environment.yml" is part of the "cadquery"-package. So, fetching of "cadquery" might be the first step. But then, it is still unclear which context is needed for this command. I have tried the following:
But step 3c fails. I have pinned python=3.10, knowing that this is no longer necessary, because you have
What is missing, it seems that the context is still incomplete? |
Beta Was this translation helpful? Give feedback.
-
Oh, I see there is a small difference! I got fooled by the subtle command-line interface of mamba. Below is the complete sequence, if the environment should be created based on an environment.yml.
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions