-
Notifications
You must be signed in to change notification settings - Fork 41
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
Point to the right Lightning root folder independently from the invocation folder #874
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #874 +/- ##
===========================================
- Coverage 98.35% 78.05% -20.31%
===========================================
Files 117 17 -100
Lines 19405 1991 -17414
===========================================
- Hits 19086 1554 -17532
- Misses 319 437 +118 ☔ View full report in Codecov by Sentry. |
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.
Nice!
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.
Hi @rauletorresc, thank you for your prompt answer to this problem.
I'm actually still having problems executing this script outside of the root directory.
How are you testing that? Which toml package are you using locally?
Traceback:
File "configure_pyproject_toml.py", line 56, in <module>
pyproject = toml.load(pyproject_path)
File "/venv/lightning_310/lib/python3.10/site-packages/toml/decoder.py", line 133, in load
with io.open(_getpath(f), encoding='utf-8') as ffile:
FileNotFoundError: [Errno 2] No such file or directory: 'pyproject.toml'
I forgot to update one variable that was still assuming it was in the root folder of Lightning. Tested locally on my machine. Could you please try again? |
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.
It works now! This is great! Thanks!
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.
Please don't forget to update the changelog. @vincentmr, do we want to merge this directly with the release candidate?
I think so, this looks like a bug fix of sort. |
Done |
Can I merge it to master and you cheery-pick it from RC? I don't want to mess with your release :) |
NP, let's do that. |
…ation folder (#874) **Context:** `configure_pyproject_toml.py` assumes it is being invoked from the root directory of Lightning. But the reality is that it can be invoked from anywhere else. **Description of the Change:** Calculate safely the root folder by traversing back the folder structure starting from the current file location. **Benefits:** The file can be invoked from any place. --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai>
…ation folder (#874) **Context:** `configure_pyproject_toml.py` assumes it is being invoked from the root directory of Lightning. But the reality is that it can be invoked from anywhere else. **Description of the Change:** Calculate safely the root folder by traversing back the folder structure starting from the current file location. **Benefits:** The file can be invoked from any place. --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai>
Context:
configure_pyproject_toml.py
assumes it is being invoked from the root directory of Lightning. But the reality is that it can be invoked from anywhere else.Description of the Change: Calculate safely the root folder by traversing back the folder structure starting from the current file location.
Benefits: The file can be invoked from any place.