-
Notifications
You must be signed in to change notification settings - Fork 346
fix(modules): Mailpit Container #625
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(modules): Mailpit Container #625
Conversation
975d556 to
cfce31d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #625 +/- ##
=======================================
Coverage ? 76.26%
=======================================
Files ? 11
Lines ? 573
Branches ? 83
=======================================
Hits ? 437
Misses ? 110
Partials ? 26 ☔ View full report in Codecov by Sentry. |
cfce31d to
f4b2278
Compare
5d08557 to
41b6771
Compare
41b6771 to
2dfd1c0
Compare
| class MailpitUser(NamedTuple): | ||
| """Mailpit user for authentication | ||
|
|
||
| Helper class to define a user for Mailpit authentication. | ||
|
|
||
| This is just a named tuple for username and password. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this could be a controversial addition, since it's the first class being exported from community modules that isn't a container.
The reason I've done this is because it's a more descriptive and intuitive datatype (to me):
- users: list[tuple[str, str]] | None
+ users: list[MailpitUser] | NoneThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also added a py.typed as this module is fully type-hinted (see #504). Running mypy on it reveals the type hint issues in core, but raises no issues within this module
Fixes testcontainers#626 - [x] Your PR title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) syntax as we make use of this for detecting Semantic Versioning changes. - [x] Your PR allows maintainers to edit your branch, this will speed up resolving minor issues! - [x] The new container is implemented under `modules/*` - Your module follows [PEP 420](https://peps.python.org/pep-0420/) with implicit namespace packages (if unsure, look at other existing community modules) - Your package namespacing follows `testcontainers.<modulename>.*` and you DO NOT have an `__init__.py` above your module's level. - Your module has it's own tests under `modules/*/tests` - Your module has a `README.rst` and hooks in the `.. auto-class` and `.. title` of your container - Implement the new feature (typically in `__init__.py`) and corresponding tests. - [x] Your module is added in `pyproject.toml` - it is declared under `tool.poetry.packages` - see other community modules - it is declared under `tool.poetry.extras` with the same name as your module name, we still prefer adding _NO EXTRA DEPENDENCIES_, meaning `mymodule = []` is the preferred addition (see the notes at the bottom) - [x] (seems to not be needed anymore) The `INDEX.rst` at the project root includes your module under the `.. toctree` directive - [x] Your branch is up to date (or we'll use GH's "update branch" function through the UI) --------- Co-authored-by: Dave Ankin <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [4.7.1](testcontainers-v4.7.0...testcontainers-v4.7.1) (2024-07-02) ### Bug Fixes * **core:** bad rebase from [#579](#579) ([#635](#635)) ([4766e48](4766e48)) * **modules:** Mailpit Container ([#625](#625)) ([0b866ff](0b866ff)) * **modules:** SFTP Server Container ([#629](#629)) ([2e7dbf1](2e7dbf1)) * **network:** Now able to use Network without context, and has labels to be automatically cleaned up ([#627](#627)) ([#630](#630)) ([e93bc29](e93bc29)) * **postgres:** get_connection_url(driver=None) should return postgres://... ([#588](#588)) ([01d6c18](01d6c18)), closes [#587](#587) * update test module import ([#623](#623)) ([16f6ca4](16f6ca4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
New Container
Fixes #626
PR Checklist
as we make use of this for detecting Semantic Versioning changes.
modules/*(if unsure, look at other existing community modules)
testcontainers.<modulename>.*and you DO NOT have an
__init__.pyabove your module's level.modules/*/testsREADME.rstand hooks in the.. auto-classand.. titleof your container__init__.py) and corresponding tests.pyproject.tomltool.poetry.packages- see other community modulestool.poetry.extraswith the same name as your module name,we still prefer adding NO EXTRA DEPENDENCIES, meaning
mymodule = []is the preferred addition(see the notes at the bottom)
INDEX.rstat the project root includes your module under the.. toctreedirectivePreferred implementation
for the given tools you are triyng to implement.
testcontainers.