-
Notifications
You must be signed in to change notification settings - Fork 5
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
Added a more advanced method to locate the maindir from the Python scripts #212
Conversation
Added a more advanced method to locate maindir and filename for usage with the python scripts.
It may or may not be useful–I don't know the full context here–but the main git(1) command line utility has git rev-parse --git-dir which solves this exact problem. |
@bska Thanks for the info. I think I'll keep the current solution for now though. As it will not require calling an external program (git) from the Python script. However, it is very useful to know that git has this location-of-root-dir stuff builtin 😄 |
It is indeed. That command also knows about the |
I'm getting this error here - did I do something wrong or is this really a bug introduced by this PR?
|
@lisajulia Thanks for the report. Can you show the exact command line you used to produce the backtrace? |
Sorry, yes, here it is:
I chose the command |
Improved the algorithm for location of maindir when filename is not given. Fixed remove-span-tags script to not assume that filename is relative to maindir
@lisajulia Seems like the script assumed that filename would be relative to the maindir. I have improved the algorithm in the latest commit also added some more test cases. |
For background see #209.
Added a more advanced method to locate the
maindir
andfilename
arguments for usage with the Python scripts. This is useful because the Python scripts can be installed globally and then run from any directory. The original logic assumed that the Python scripts were run fromscripts/python
. Also added some unit tests.