Skip to content
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

Fix arguments in entry.py #132

Open
josephjclark opened this issue Dec 9, 2024 · 2 comments · May be fixed by #135
Open

Fix arguments in entry.py #132

josephjclark opened this issue Dec 9, 2024 · 2 comments · May be fixed by #135
Assignees

Comments

@josephjclark
Copy link
Collaborator

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

@josephjclark
Copy link
Collaborator Author

Hey @elias-ba do you think you can look at this for me this week? Happy to take a call with you to set it up

@elias-ba
Copy link
Collaborator

elias-ba commented Dec 9, 2024

Hey @josephjclark thanks, I have it in my todo list. Probably gonna work on it tomorrow.

@elias-ba elias-ba self-assigned this Dec 12, 2024
@elias-ba elias-ba added this to v2 Dec 12, 2024
@github-project-automation github-project-automation bot moved this to New Issues in v2 Dec 12, 2024
@elias-ba elias-ba moved this from New Issues to In progress in v2 Dec 12, 2024
@elias-ba elias-ba linked a pull request Dec 12, 2024 that will close this issue
7 tasks
@elias-ba elias-ba moved this from In progress to In review in v2 Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

2 participants