-
Notifications
You must be signed in to change notification settings - Fork 2.7k
docs: add description about our code structure #26394
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Perhaps add a link to CONTRIBUTING.md?
|
||
#### pkg/machine/ | ||
|
||
- core code for podman machine commands |
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.
maybe #####pkg/machine/tests
?
- core code for podman machine commands | ||
|
||
### test/ | ||
|
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 think @ninja-quokka had some initial trouble understanding these subdirectories. I would be fine with merging this PR without them but maybe that's something we can do soon thereafter? @ninja-quokka im kind of thinking you would be a good candidate for that?
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.
Yeah I can post a follow up PR with a small addition about the test directory structure. I should really add more content to podman/test/apiv2/README.md
before my ideas get oom_reaper'd
|
||
Description about important directories in our repository. | ||
|
||
### cmd/ |
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.
### contrib
?
i like this pr |
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 like this idea.
|
||
- various packages to do all sorts of different things | ||
|
||
#### pkg/api/ |
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.
Maybe ##### pkg/api/handlers/compat
and ##### pkg/api/handlers/libpod
.
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 guess I’ll just raise the topic:
Should we change some of the paths instead of documenting them?
pkg/domain/infra/abi
→pkg/engine/local
pkg/domain/infra/tunnel
→pkg/engine/remote
pkg/bindings
→pkg/remote/client
pkg/api/handlers
→pkg/remote/server
or something vaguely like that?
There’s never a good time to make these changes (and, ugh, we would need to have a naming discussion), but just about every time I’m working on Podman, I wish they had already happened, and after a few years of this wish, it gets old.
(Do we have a stable API commitment / external consumers that mean that we can’t, or shouldn’t, rename the packages?)
… these are not exclusive, a renaming discussion, if any, is not really a reason to block the PR. |
Document most important directories when trying to understand our project. Signed-off-by: Paul Holzinger <[email protected]>
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.
The contents of the PR LGTM; there are some discussions about adding more content, let’s give that a few days to play out.
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
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.
As a new contributor, a document like this would have saved @baude a few hours so +1 and thank you!
Added some thoughts.
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 agree the content serves the purpose of the PR of a "getting started guide for new folks"
Before merging a few small grammatical issues should be resolved:
- Capitalise proper nouns like Podman, Sphinx, SQLite, BoltDB.
- Capitalise the first letter in each of the dot points.
- Add periods to the end of each dot point.
- directory created with "go mod vendor" | ||
- this includes all go deps in our repo, DO NOT edit this directory directly, changes in dependencies must be made in their respective upstream repositories and then updated in go.mod | ||
|
||
#### bin/ |
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.
nit: Should this be added to the top to keep the order?
|
||
#### cmd/podman/ | ||
|
||
- podman cli code, cli commands and flags are defined here, we are using github.com/spf13/cobra as library for command line parsing |
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.
- podman cli code, cli commands and flags are defined here, we are using github.com/spf13/cobra as library for command line parsing | |
- Podman CLI code, CLI commands and flags are defined here, we are using the [Cobra CLI library](https://github.com/spf13/cobra) for command line parsing. |
|
||
### docs/ | ||
|
||
- sphinx based documentation for podman that is build on readthedocs (docs.podman.io) |
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.
- sphinx based documentation for podman that is build on readthedocs (docs.podman.io) | |
- Sphinx based documentation for Podman that is build on [Read the Docs](https://readthedocs.com/) and hosted at [docs.podman.io](https://docs.podman.io/en/latest/) |
- underlying core for most podman operations, defines container, pod, volume management opartions | ||
- contains the database to store these information on disk, either sqlite or botldb (our old db format) | ||
- integrates with our other libraries such as: | ||
- containers/storage create and mount container storage |
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.
nit: Do we want to use 4 indents here? If so please ignore.
|
||
- CI scripts, packaging files some container image build files | ||
|
||
### docs/ |
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.
Maybe also link to docs/REAME.md
in this section? It goes into more depth on the directory structure for docs/
- core code for podman machine commands | ||
|
||
### test/ | ||
|
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.
Yeah I can post a follow up PR with a small addition about the test directory structure. I should really add more content to podman/test/apiv2/README.md
before my ideas get oom_reaper'd
Document most important directories when trying to understand our project.
Comments welcome, this is mostly meant as quick getting started guide for new folks trying to understand the codebase.
Does this PR introduce a user-facing change?