You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
entry.py is the entrypoint to python modules from Javascript land. It's used by the REST API at runtime, as well as by commands like bun py in local dev. One of its important jobs is to ensure that relative module paths work.
There's a problem with arguments in the main function though. We use 4 or 5 positional arguments - depending on the calling context - to work out what the different flags are.
I think at the moment, we call 5 arguments from the web server. But if you call entry.py directly from python it only takes 4 arguments.
Whatever - the interface is absolutely awful, and this is a key part of the server infrastructure.
So I'd like to re-write the arguments to entry.py to use named arguments (ie --output-path) rather than relying on positions. That should make life easier for everyone.
The server's unit tests WILL fail if the arguments are wrong. We should probably ensure a python facing test too
The text was updated successfully, but these errors were encountered:
entry.py
is the entrypoint to python modules from Javascript land. It's used by the REST API at runtime, as well as by commands likebun py
in local dev. One of its important jobs is to ensure that relative module paths work.There's a problem with arguments in the main function though. We use 4 or 5 positional arguments - depending on the calling context - to work out what the different flags are.
I think at the moment, we call 5 arguments from the web server. But if you call entry.py directly from python it only takes 4 arguments.
Whatever - the interface is absolutely awful, and this is a key part of the server infrastructure.
So I'd like to re-write the arguments to entry.py to use named arguments (ie
--output-path
) rather than relying on positions. That should make life easier for everyone.The server's unit tests WILL fail if the arguments are wrong. We should probably ensure a python facing test too
The text was updated successfully, but these errors were encountered: