-
Notifications
You must be signed in to change notification settings - Fork 313
feat(main): New Testcontainers Python Docs Site #822
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
Draft
terry-docker
wants to merge
18
commits into
testcontainers:main
Choose a base branch
from
terry-docker:create-new-docs-site
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat(main): New Testcontainers Python Docs Site #822
terry-docker
wants to merge
18
commits into
testcontainers:main
from
terry-docker:create-new-docs-site
+10,776
−54
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…which seems to work with ibm specifically
…he standard docs pages for python
…es section pages, fix some formatting issues
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #822 +/- ##
=======================================
Coverage ? 85.46%
=======================================
Files ? 12
Lines ? 688
Branches ? 110
=======================================
Hits ? 588
Misses ? 75
Partials ? 25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Converting to draft to address community module test issues and the diff has some changes branched off of #814 so I could verify everything was running locally. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello all!
I've been working on getting a new and improved docs site for Testcontainers Python. This docs site aligns it with Testcontainers Java/Go/.NET/Node which will hopefully help users onboard and adopt Testcontainers more easily.
Testing fork deploys can be seen here, I'm also lining up the official builds to live on the python.testcontainers.org name space! 👀
https://exquisite-dusk-036c28.netlify.app/
Why?
We (Docker) want to support the Python community! A big improvement opportunity I saw was the current docs site compared to some of the other languages. Adopting the same template and builds will help keep use inline with the other and hopefully make Testcontainers Python easier to adopt by providing a starting point with more guide style content.
Usage and Details
The old Sphinx site has been left untouched for now (TBD by the community if it's provided value imo). This is a large change for writing documentation on the lib. There is now a
/docs
folder filler with markdown files rather then being powered only by code comments. The left hand navigation is controlled by a new yml file on the root of the project calledmkdocs.yml
.Rather then using Sphinx to parse code comments, with mkdocs you can include example python files to go with the documentation. I've created community module usage examples beside their implementation called
example_basic.py
but people can make other example files in the source as well. The linter is ignoring files withexample_
in them to ease builds for the docs purposes (and missing dependencies that may not matter).In the documentation site you can them import your examples via
Content was largely generated by reading the source code with an editing pass from one of Docker's technical writers.
Running / Editing the Docs Site Locally
A new Testcontainer python docs Dockerfile lives in the root of the project which handles the docssite specific dependencies. The container will build and serve the site for you.
make serve-docs
How Documentation Will Deploy
It's Netlify powered. We can configure it to do preview deploys per PR and deploy a new site on merge to main. Unfortunately Netlify doesn't support Poetry so to keep the builds simple there is a requirements.txt for explicitly the docs site dependency.
The Contents of the New Documentation
As mentioned briefly in the opening we used AI to help generate the content of the site by reading the source code, myself and Arthur also did some human passes to ensure things read well, but clearly more help from people ensuring the accuracy will come over time. Once the new docs site is merged into main and hosting is fully working I think we should post in the community slack and ask for feedback, the two docs sites will run concurrently before officially launching (replacing) the current docs site.