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: add wheel command to not generate output #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Konkrad
Copy link

@Konkrad Konkrad commented Jun 6, 2024

Closes #28

Copy link
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Konkrad!

Could you update the PR title to be more descriptive? Also, please update the changelog.

It would be nice if you can some tests, but it is not nessesary.

@Konkrad Konkrad changed the title Update cli.py fix: add wheel command to not generate output Jun 8, 2024
@Konkrad
Copy link
Author

Konkrad commented Jun 8, 2024

Hello,
I tried to add a test but I have trouble making the test suite work locally. Not sure if I miss some dependencies.

@ryanking13
Copy link
Member

To test the CLI entrypoints, you would need to use typer.testing.CliRunner.

There are some examples in Pyodide repository, which might be helpful to you. If you find it difficult to write tests, let us know. I think we can merge this PR and add some tests later.

@Konkrad
Copy link
Author

Konkrad commented Jun 18, 2024

I gave it a try: https://github.com/pyodide/pyodide-lock/actions/runs/9431128434/job/26020165688?pr=29

But it is not clear to me why the test fails at this point. If you have any input would be grateful, otherwise I try to have a look in the following days.

@ryanking13
Copy link
Member

But it is not clear to me why the test fails at this point.

It's becuase that function has a decorator @main.command(), and typer converts the function internally to make it work as a CLI entrypoint. Calling the typer-decorated function directly will not work as expected. Could you take a look at the link that I provided?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pyodide lockfile add-wheels does not append files
2 participants