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

Doctest of example in README.rst #156

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Doctest of example in README.rst #156

merged 1 commit into from
Jan 24, 2025

Conversation

PicoCentauri
Copy link
Contributor

@PicoCentauri PicoCentauri commented Jan 24, 2025

In #130 we changed the API of the tuning code and forgot to update the quickstart snippet in the README.rst. We already fixed the syntax in #155 but to avoid this in the future, I added a doctest for this file.

The only small bummer is that we have to add >>> in every line to make the code recognized by pytest. Not super nice because if you copy the text you have to remove these characters by hand...

Contributor (creator of pull-request) checklist

  • Tests updated (for new features and bugfixes)?
  • Documentation updated (for new features)?
  • Issue referenced (for PRs that solve an issue)?

Reviewer checklist

  • CHANGELOG updated with public API or any other important changes?

📚 Documentation preview 📚: https://torch-pme--156.org.readthedocs.build/en/156/

@PicoCentauri PicoCentauri force-pushed the test-readme branch 4 times, most recently from a6bcc69 to 0cadb48 Compare January 24, 2025 08:15
@PicoCentauri PicoCentauri changed the title Doctest Readme Doctest README.rst Jan 24, 2025
@PicoCentauri PicoCentauri changed the title Doctest README.rst Doctest of example in README.rst Jan 24, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this be better? A suggestion from gpt
Screenshot_20250124-112514~2.png

But the current state is still okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh I can try. Not sure if github/PyPI knows about the :hide: keyword. we will see.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update: Github just ignores this keyword. But nice try. Lets keep it like this for now and we can try to make it nicer later.

@PicoCentauri PicoCentauri merged commit 6c982c8 into main Jan 24, 2025
13 checks passed
@PicoCentauri PicoCentauri deleted the test-readme branch January 24, 2025 10:58
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.

2 participants