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

modulegen: create internal/mkdocs #1504

Merged
merged 2 commits into from
Aug 24, 2023
Merged

modulegen: create internal/mkdocs #1504

merged 2 commits into from
Aug 24, 2023

Conversation

mmorel-35
Copy link
Contributor

Refactor mkdocs code in modulegen

@mmorel-35 mmorel-35 requested a review from a team as a code owner August 15, 2023 08:20
@netlify
Copy link

netlify bot commented Aug 15, 2023

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit ac34ba2
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/64e65077c2a4dd00089ee324
😎 Deploy Preview https://deploy-preview-1504--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mmorel-35 mmorel-35 marked this pull request as draft August 18, 2023 05:22
@mmorel-35 mmorel-35 changed the title modulegen: create pkg/mkdocs modulegen: create internal/mkdocs Aug 21, 2023
@mmorel-35 mmorel-35 marked this pull request as ready for review August 21, 2023 17:25
mdelapenya
mdelapenya previously approved these changes Aug 22, 2023
Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM!, just a comment, not a blocker, regarding one function. Other than that, great job extracting code! 💪

modulegen/main.go Show resolved Hide resolved
@mmorel-35
Copy link
Contributor Author

By the way, I noticed that there is no docs/modules/compose.md is it on purpose ?

@mdelapenya
Copy link
Collaborator

By the way, I noticed that there is no docs/modules/compose.md is it on purpose ?

Indeed, it's on purpose as we do have a separate page in https://golang.testcontainers.org/features/docker_compose/.

But I think it would be a good idea to add it to the modules and reduce the number of corner cases across code generation. I'll do it in a separate PR. Thanks for pointing this out!

mdelapenya
mdelapenya previously approved these changes Aug 23, 2023
Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM! Only a final change in a method name: there was a typo and making the name a bit more consistent.

Other than that, once this is addressed, we are ready to merge

modulegen/context.go Outdated Show resolved Hide resolved
modulegen/context.go Outdated Show resolved Hide resolved
modulegen/context.go Outdated Show resolved Hide resolved
@mmorel-35
Copy link
Contributor Author

@mdelapenya ,
I just changed the method name.
The tests are running.

mmorel-35 and others added 2 commits August 23, 2023 20:31
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Manuel de la Peña <social.mdelapenya@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
6.2% 6.2% Duplication

@mmorel-35
Copy link
Contributor Author

Hi @mdelapenya ,

The tests were passing before the rebase, something happened with the two last commits on the main branch ?

@mdelapenya
Copy link
Collaborator

The tests were passing before the rebase, something happened with the two last commits on the main branch ?

Not necessarily with the two commit :) I always take a look at the workflow:

Screenshot 2023-08-24 at 08 50 28

Because we run against the last two active versions of Go, I check both on Ubuntu: if one passes and the other not, then it seems certain flakiness to me. Same for the modules.

@mmorel-35
Copy link
Contributor Author

Good news :) !!

@@ -170,14 +171,13 @@ func main() {
fmt.Println("Thanks!")
}

func generate(example Example, rootDir string) error {
func generate(example Example, ctx *Context) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I did not notice this: for consistency, let's pass the context as first arg.

But let's do this in a separate PR in order to merge this one as is :)

Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your hard work adding maintainability to the code generation tool 👏

@mdelapenya mdelapenya merged commit 98ceaee into testcontainers:main Aug 24, 2023
121 checks passed
@mmorel-35 mmorel-35 deleted the modulegen/mkdocs branch August 24, 2023 07:12
@mdelapenya mdelapenya self-assigned this Aug 25, 2023
@mdelapenya mdelapenya added the chore Changes that do not impact the existing functionality label Aug 25, 2023
mdelapenya added a commit to igribkov/testcontainers-go that referenced this pull request Aug 28, 2023
* main: (26 commits)
  modulegen: create internal/make (testcontainers#1537)
  chore: fix workflow (testcontainers#1538)
  chore(deps): bump the all group in /examples/cockroachdb with 1 update (testcontainers#1522)
  chore(deps): bump the all group in /examples/bigtable with 1 update (testcontainers#1534)
  chore(deps): bump the all group in /modules/localstack with 4 updates (testcontainers#1535)
  chore(deps): bump the all group in /modules/k3s with 2 updates (testcontainers#1526)
  chore(deps): bump the all group in /examples/spanner with 2 updates (testcontainers#1532)
  chore(deps): bump the all group in /examples/firestore with 1 update (testcontainers#1523)
  chore(deps): bump the all group in /modules/redis with 1 update (testcontainers#1524)
  chore(deps): bump the all group in /modules/clickhouse with 1 update (testcontainers#1525)
  chore(deps): bump the all group in /examples/toxiproxy with 2 updates (testcontainers#1528)
  chore(deps): bump the all group in /examples/pubsub with 1 update (testcontainers#1531)
  chore(deps): bump the all group in /examples/datastore with 2 updates (testcontainers#1530)
  chore(deps): bump the all group in /modules/redpanda with 1 update (testcontainers#1527)
  chore: properly render mkdocs.yml (testcontainers#1521)
  modulegen: create internal/workflow (testcontainers#1520)
  modulegen: create internal/module (testcontainers#1505)
  modulegen: create internal/mkdocs (testcontainers#1504)
  fix: do not remove the file schema in docker.host property (testcontainers#1517)
  fix: reset config in tests (testcontainers#1516)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that do not impact the existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants