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

[Docs] Fix ModuleNotFoundError in Pydantic Extra Types #9433

Conversation

kinuax
Copy link
Contributor

@kinuax kinuax commented May 14, 2024

Change Summary

The Pydantic Extra Types docs have several examples to run in the browser but ModuleNotFoundError: No module named 'pydantic_extra_types' error is raised because pydantic-extra-types is not installed. An example with Latitude: https://docs.pydantic.dev/latest/api/pydantic_extra_types_coordinate/#pydantic_extra_types.coordinate.Latitude.

I have updated add_mkdocs_run_deps to include this dependency with its version. Documentation is built and served correctly. I have verified the Latitude example (and others) and its docstring runs as expected.

For the sake of consistency on the output, the corresponding script is updated as well at samuelcolvin/mkdocs-run-code#6.

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Copy link

codspeed-hq bot commented May 14, 2024

CodSpeed Performance Report

Merging #9433 will not alter performance

Comparing kinuax:fix-module-not-found-error-in-pydantic-extra-types-docs (786cdb7) with main (86025fc)

Summary

✅ 13 untouched benchmarks

@kinuax
Copy link
Contributor Author

kinuax commented May 14, 2024

typing-extensions tests raise NotImplementedError due to a reason unknown to me.

@antoni-jamiolkowski
Copy link
Contributor

typing-extensions tests raise NotImplementedError due to a reason unknown to me.

These tests fail on the main as well. It should be fixed in the #9426

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! We are working on a fix for the tests, and will merge this after that gets fixed.

@sydney-runkle
Copy link
Member

@kinuax,

If you pull in the changes from main, tests should pass now :).

@sydney-runkle sydney-runkle enabled auto-merge (squash) May 14, 2024 18:47
@sydney-runkle sydney-runkle merged commit 1ea2116 into pydantic:main May 14, 2024
51 checks passed
@kinuax kinuax deleted the fix-module-not-found-error-in-pydantic-extra-types-docs branch May 14, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants