Closed set-soft closed 2 years ago
Does it really make sense to have ui.py
executable? Couldn't the user just invoke python ui.py
or python -m pcbdraw
? What do we gain by making it executable?
Does it really make sense to have
ui.py
executable? Couldn't the user just invokepython ui.py
orpython -m pcbdraw
? What do we gain by making it executable?
Nothing special, as populate.py
is executable, ui.py
could be also executable. They can be executed so:why not marking them as executables? On the other hand plot.py
can't be executed.
Marking them executable help people to know they can be invoked, and cost nothing, is just an attribute.
A couple of detail that may be could help:
plot.py
and populate.py
are executable. But only populate.py
has an if __name__ == '__main__':
. This patch removes the plot.py
permissions and adds them to ui.py
, which also has if __name__ == '__main__':
populate.py
and ui.py
in-place, without needing to install. Quite handy when you want to run a quick test, you just check out a point and run the script, no need to install. Note: I know about pip install -e
, but it has its own drawbacks.The argument with having the main routine is sufficient for me. I agree that the plot.py
definitely shouldn't be executable. Personally, I don't have a use case for executing them as scripts (as they have entry points in setup.py
), but I guess it doesn't hurt.
but I guess it doesn't hurt.
Exactly, small things that doesn't need big effort can help people for free. When I checked out 1.0.0 I got confused by the file permissions. Thanks
On the other hand, pulling stuff that the maintainers aren't used to can also cause damage. I missed the permission on plot.py
as this is something I don't do for python packages and there are no tests for testing files being executable.