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

feat(build): use poetry and organise modules #408

Merged
merged 29 commits into from
Feb 13, 2024

Conversation

totallyzen
Copy link
Collaborator

@totallyzen totallyzen commented Jan 2, 2024

Warning

This is a Disruptive PR, but for good reasons. We will engage with people on existing PRs and Issues to help them transition.

Changes

Fixes #204

  • We do not publish testcontainers-* packages any more as it's a maintenance nightmare on PyPI
    • example: in case of loss of access to the PyPI package, it's a messy and long procedure to reclaim it
  • Instead the project root is now a collection of modules, see pyproject.toml
  • All published under testcontainers which will allow the previous testcontainers[extra1, extra2] format to be used (replacing the /meta package mechanism)
  • Removes old config files like .coveragerc and setup.cfg and integrates them into pyproject.toml - more grooming incoming in future PRs (like the move to ruff which is a more performant formatter/linter)

TODO

  • groom Makefile to accomodate the new layout
  • accommodate the new layout in CI
  • edit repository settings to simplify the list of required checks (which matches the new layout and CI) - this is done via a GitHub App used by the testcontainers org

@totallyzen totallyzen marked this pull request as draft January 2, 2024 16:36
@totallyzen totallyzen removed the request for review from tillahoffmann January 2, 2024 16:36
@totallyzen totallyzen changed the title feat(build): organise use poetry and organise modules feat(build): use poetry and organise modules Jan 3, 2024
@alexanderankin alexanderankin mentioned this pull request Jan 18, 2024
4 tasks
@totallyzen
Copy link
Collaborator Author

Heyo! update for keen eyes!

Update for a barrage of things I've done:

  • sphinx (the version we've been using in the repo) doesn't like Python 3.8 (poetry lock fails) - we'll fix this in a future release I think but for now I've pushed the min-python to 3.9
  • I've separated core and community modules - the latter only run IF their respective paths changed (in this PR it's true because I've moved the files)
  • I've moved a bunch of stuff into the pyproject.toml - more to come in future PRs (i.e.: move to ruff from flake8, run mypy, add pre-commit, etc)

Overall, sorry for the slowness, but life happens on the side, so didn't have dedicated time to progress this.
I'm hoping we're really close to finalising this and getting it merged.
After that I'll go through the existing PRs and close/request-rebase them, or collate them in issues.

@alexanderankin alexanderankin marked this pull request as ready for review February 6, 2024 14:16
@totallyzen
Copy link
Collaborator Author

Hey folks! Hopefully the final update on this PR!

All green at this point, however we wanted to simplify the Required Checks which means editing the repository settings.
Good news is that we are getting the support we need, it's a matter of some time spent!

@totallyzen totallyzen merged commit 6c69583 into testcontainers:main Feb 13, 2024
25 checks passed
@totallyzen totallyzen deleted the poetry-refactor branch February 13, 2024 15:59
totallyzen pushed a commit that referenced this pull request Mar 6, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.0.0](testcontainers-v3.7.1...testcontainers-v4.0.0)
(2024-03-06)

### Release Notes

The breaking changes are the ones we were able to easily track. If you
spot any new issues between `3.7.1` and `4.0.0`, please do report it and
we'll do our best to fix everything. The release is now

Some kudos from @totallyzen to folks who helped a great deal in starting
things again:
- kudos to @alexanderankin for his contribution on #426 
- kudos to @jankatins for feedback on various PRs including 
- kudos to @max-pfeiffer and @bearrito for their contributions as well


### ⚠ BREAKING CHANGES

* **compose:** implement compose v2 with improved typing
([#426](#426))
* **core:** add support for `tc.host` and de-prioritise `docker:dind`
([#388](#388))

### Features

* **build:** use poetry and organise modules
([#408](#408))
([6c69583](6c69583))
* **compose:** allow running specific services in compose
([f61dcda](f61dcda))
* **compose:** implement compose v2 with improved typing
([#426](#426))
([5356caf](5356caf))
* **core:** add support for `tc.host` and de-prioritise `docker:dind`
([#388](#388))
([2db8e6d](2db8e6d))
* **redis:** support AsyncRedisContainer
([#442](#442))
([cc4cb37](cc4cb37))
* **release:** automate release via release-please
([#429](#429))
([30f859e](30f859e))


### Bug Fixes

* Added URLError to exceptions to wait for in elasticsearch
([0f9ad24](0f9ad24))
* **build:** add `pre-commit` as a dev dependency to simplify local dev
and CI
([#438](#438))
([1223583](1223583))
* **build:** early exit strategy for modules
([#437](#437))
([7358b49](7358b49))
* changed files breaks on main
([#422](#422))
([3271357](3271357))
* flaky garbage collection resulting in testing errors
([#423](#423))
([b535ea2](b535ea2))
* rabbitmq readiness probe
([#375](#375))
([71cb75b](71cb75b))
* **release:** prove that the release process updates the version
([#444](#444))
([87b5873](87b5873))
* test linting issue
([427c9b8](427c9b8))


### Documentation

* Sphinx - Add title to each doc page
([#443](#443))
([750e12a](750e12a))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch dependency management to poetry
2 participants