Skip to content

docs: merge HACKING.md into CONTRIBUTING.md, fewer files in root - #2734

Merged
benhoyt merged 8 commits into
canonical:mainfrom
benhoyt:reduce-files-in-root
Sep 14, 2026
Merged

docs: merge HACKING.md into CONTRIBUTING.md, fewer files in root#2734
benhoyt merged 8 commits into
canonical:mainfrom
benhoyt:reduce-files-in-root

Conversation

@benhoyt

@benhoyt benhoyt commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

This PR makes several changes to reduce the number of files in the root directory of the repo.

Most significantly, it moves the content of HACKING.md into CONTRIBUTING.md without changing any of it (except minor adjustments to the headings):

  • Setting up a dev environment: moved straight across
  • Testing: merged with "Tests"
  • Maintaining the documentation: merged with "Documentation"
  • Dependencies: moved to under "Pull requests"
  • Dev tools: merged with "Setting up a dev environment"
  • Releases: moved straight across
  • Updating the Charmcraft profiles: moved to a top-level section

Within CONTRIBUTING.md:

  • Moves "Coding style" up to a sub-section under "Pull requests"
  • Removes the "Reviews" section; I actually did this by accident, but I don't think it pays for itself and should be removed (it's obvious)

In addition, the PR:

  • Moves CODE_OF_CONDUCT.md into the .github dir (GitHub still shows a tab)
  • Moves sbomber config files into .github
  • Moves release.py into .github (I know we're going to replace it soon, but no harm in the meantime -- we run it with tox.ini anyway)
  • Removes STYLE.md, as its content is now at https://github.com/canonical/charm-tech/tree/main/style

The only change I'm not sure about is how I'm referencing the new style guides in AGENTS.md. Will agents pick those up?

I think we should do a follow-up PR to clean up CONTRIBUTING.md a bit, as I think there's a bit of duplicate content there now, and probably some things that can be removed or shortened. Tracked in #2744

Fixes #2487

This commit moves content without changing any of it (except
appropriate adjustments of headings).

- Setting up a dev environment: moved straight across
- Testing: merged with "Tests"
- Maintaining the documentation: merged with "Documentation"
- Dependencies: moved to under "Pull requests"
- Dev tools: merged with "Setting up a dev environment"
- Releases: moved straight across
- Updating the Charmcraft profiles: moved to a top-level section

In addition, within the document:

- Moved "Coding style" up to a sub-section under "Pull requests"

I also added an extra blank line between top-level sections.

@tromai tromai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR.

I read through the changes, and cross-check with the details in the PR description. Everything looks great.

I have a small comment on which URL we should reference the style docs in AGENTS.md. I think raw.githubcontent.com works better, but happy to go with github.com from the charm-tech repo guide to be consistent.

EDIT: there is one thing I spot from CONTRIBUTING.md. I saw a mix of multi-line paragraph and one-line paragraph. I recall we made a decision to switch to one-line paragraph only (if I remember correctly). This could be part of the follow up PR too.

Comment thread AGENTS.md
@benhoyt

benhoyt commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

@tonyandrewmeyer Mind reviewing this one in the next couple of days?

@tonyandrewmeyer tonyandrewmeyer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems odd to have the code of conduct in .github, given that it's not really GitHub specific in any way. I suppose that since it's now a pointer to a CoC somewhere else, I should think of this not as "the CoC" but "the GitHub pointer to the CoC" and justify it that way. I don't think it gains much to move it, but I'm not strongly opposed.

I'm not a fan of release.py in .github - in other PR discussions recently we talked about a scripts folder or similar, where this could live. However, James and I are meant to rework this system in the next couple of weeks, and based on our chat today I think almost everything will end up in charm-tech-code and workflow YAML files, so moving it now is fine.

+1 on moving the sbomber files. It's tempting to try to get rid of them instead (passing arguments to the tool rather than having a manifest file at all) but I'm happy to leave that for a different PR.

It does seem like there is a difference in the intended content in HACKING.md and CONTRIBUTING.md, but on the other hand I think the team agreed that they could merge, and almost all the other repos only have CONTRIBUTING.md, so I like the consistency. I've lightly reviewed this but mostly assumed that it's roughly the same content. Now that it's one file, a good follow up would be to see if it can be trimmed a bit, I think -- perhaps this would be good for Matt, since it's probably easiest to know what's really useful when you're coming with fresh eyes?

My only significant concern here is whether agents will still make use of the style guide. If we've validated that they (typically) will, then everything's good with me.

Comment thread AGENTS.md
Comment thread AGENTS.md
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
@james-garner-canonical

james-garner-canonical commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

FWIW I'd go with CoC in the root over .github/.

Another cleanup opportunity would be migrating to a modern build backend, which would let us drop MANIFEST.in, but probably best as a separate PR.

@tonyandrewmeyer

Copy link
Copy Markdown
Collaborator

Another cleanup opportunity would be migrating to a modern build backend, which would let us drop MANIFEST.in, but probably best as a separate PR.

Oh, that was bad review on my part, I forgot to look at what was still there.

  • I agree getting rid of MANIFEST.in is worthwhile, and that doing it in a follow-up is fine.
  • I feel we should move test into ops with a src layout (this also solves other issues), but definitely in a different PR.
  • Possibly CHANGES.md could be in docs/, although I do like docs/ being specifically what lands in the docs site.
  • We should remove the old .claude/settings.json file.

@benhoyt

benhoyt commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

FWIW I'd go with CoC in the root over .github/.

Tony was on the fence. I'd like to keep it under .github, especially given that it's not really a CoC, but just a pointer to the Ubuntu one, so it really only exists for the sake of the GitHub tab UI showing it. We also mention it in README.md if someone is using Ctrl-F or grep/rg to search for it.

Another cleanup opportunity would be migrating to a modern build backend, which would let us drop MANIFEST.in, but probably best as a separate PR.

Yeah, that would be great, but leaving it for a separate PR.

I feel we should move test into ops with a src layout (this also solves other issues), but definitely in a different PR.

Agreed.

Possibly CHANGES.md could be in docs/, although I do like docs/ being specifically what lands in the docs site.

I was on the fence about this one, but on balance I think CHANGES.md is useful enough to be in the root.

We should remove the old .claude/settings.json file.

Ah, good catch -- done.

@benhoyt

benhoyt commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

Opened #2743 to track moving to a modern backend (and removing MANIFEST.in).

@benhoyt
benhoyt merged commit a22d2ab into canonical:main Sep 14, 2026
61 checks passed
@benhoyt
benhoyt deleted the reduce-files-in-root branch September 14, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce number of files at repo root

4 participants