-
Notifications
You must be signed in to change notification settings - Fork 0
Update method used to run line-profiler #85
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
base: main
Are you sure you want to change the base?
Update method used to run line-profiler #85
Conversation
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/RSE-Sheffield/pando-python/compare/md-outputs..md-outputs-PR-85 The following changes were observed in the rendered markdown documents:
What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2025-05-10 19:36:59 +0000 |
|
||
If you are unable to install `line_profiler` via `pip` on MacOS. Instead it can be installed via `conda`. | ||
If you come across the error message `zsh: no matches found: line_profiler[all]`, try wrapping the package name in quotation marks: |
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 find! 😮
I'm very much not a mac user, and work on Windows 90% of the time (the 10% being where I use Linux purely to test/resolve Linux build issues).
Fairly sure it should work on Linux, I've used similar in the past. Windows cmd and powershell however are not so happy (does work under git bash and other nix style terminals)
Windows equivalent seems to be cmd /c "set LINE_PROFILE=1 && python lp.py" E.g. setting the env var within a temporary child instance of cmd. That's kind of grim, probably cleaner to suggest Windows users just toggle it on with a separate Probably a good place to use Grouped tabs to differentiate Windows vs everything else |
Should we just follow the example of core carpentries lessons and recommend Windows users use Git bash or WSL, where compatibility is better? CMD and Powershell are different enough that it’ll be a non-trivial amount of work to check and adjust all instructions; plus, learners using completely different shells makes it harder for instructors to help if any problems pop up during the course. |
I'd err on the side of having a Windows exception in a tab/group just for simplicity sake. I don't think any of the other commands should really be affected as they're just running scripts which is common across everything. Atleast in Sheffield, the vast majority of attendees are Windows users, so making things more difficult for them seems like a bad idea (high chance some are not |
I haven't tested it, but maybe setting |
Will resolve #82.
I've switched the initial introduction of the
line-profiler
package over to the new method recommended to run it. I've tested out on MacOS and all is fine so far; next week I'll have access to Ubuntu and Windows machines so I'll check that section on each of those operating systems before going any further with the set of changes.