Skip to content
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

Change simple.ork load location in examples #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SiboVG
Copy link

@SiboVG SiboVG commented Feb 11, 2022

As a complete noob to orhelper, I had some trouble getting just a basic example script to work, I kept getting a 'FileNotFoundError' for the design file. The problem was that the example files take 'examples/simple.ork' as the default location for the .ork file, but if I run the script, that is already inside the examples-directory, the script looked for simple.ork inside 'examples/examples.ork' which just threw the exception.

So I just removed the extra examples-directory reference so that the example files look for simple.ork inside their relative directory, which is already the examples-directory.

Note: again, I have close to zero experience with orhelper, so I'm sorry if this is a bogus PR.

@SiboVG
Copy link
Author

SiboVG commented Apr 3, 2022

@SilentSys does this PR make any sense?

@SilentSys
Copy link
Owner

Sorry for the delay.

I'm assuming you were running the examples with OrHelper installed through pip?

If I remember correctly, the reasoning for this was to allow people to clone the repo, make changes, and run the examples using the cloned OrHelper. In this case, you are not able to run from within the examples directory because python can't recognize modules from parent directories.

I agree that this can be unintuitive to people who have OrHelper installed and are just trying to run the examples. So maybe the ideal solution involves using something like os.path.dirname(__file__) to always get the correct path in all use cases.

examples/lazy.py Outdated Show resolved Hide resolved
Co-authored-by: Andrei Popescu <andy.pope.13@gmail.com>
@SiboVG SiboVG requested a review from SilentSys April 10, 2022 06:11
Copy link
Owner

@SilentSys SilentSys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to make those changes to the other two files as well.

Fix file location of example simple rocket
@SiboVG SiboVG requested a review from SilentSys January 26, 2023 09:43
@SiboVG
Copy link
Author

SiboVG commented Jan 26, 2023

Sorry @SilentSys I really lost track of this. The file locations in the other two files should be fixed now.

@SiboVG
Copy link
Author

SiboVG commented Feb 5, 2024

@SilentSys care to merge this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants