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

Standardize OpenClarity repo structure, hygiene, documentation and remove copy pasta #2

Open
ghost opened this issue Dec 13, 2022 · 6 comments
Labels
keep Prevents an issue from being marked as 'stale'

Comments

@ghost
Copy link

ghost commented Dec 13, 2022

To improve the developer experience and long term health of the OpenClarity project we should invest in some standardisation around repo management, and have unified front for users and developers to navigate the project. Some things we think should be improved/added:

  • repo for managing common workflows and other common configurations (too much copy and pasta right now)
  • repo template for creating new repos with all the basics ready to go
  • standard template/design for READMEs etc
  • standard documentation style/format? perhaps a docs.openclarity.io site?
@justaugustus
Copy link
Member

justaugustus commented Dec 14, 2022

Thanks for filing this issue, Sam!

First things first, for Cisco employees, I would suggest reviewing the OSPO's docs on releasing open source projects.

The "Requirements" and "Best Practices" sections include some guidance and examples to get started with.

  • repo for managing common workflows and other common configurations (too much copy and pasta right now)

For organization-level, the .github repo serves as an inheritance point for some GitHub application configurations as well as community health files, like CONTRIBUTING.md, and issue/pull request templates.

The GitHub official docs for this are here: https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file

Here are some examples of org-level configurations:

For development workflows, I would suggest taking a look at kubernetes-sigs/release-utils.
My team (SIG Release) maintains that project and leverages it for most of our other projects.

Of note in that repo is magefile.go, which is built on Mage (a Golang-based build tool, which has some likenesses to make).

There are a few simple targets that will do things like:

  • Run tests
  • Verify boilerplate headers for files
  • Dependency checks
  • Linting (via golangci-lint)
  • go build

The mage/ package in kubernetes-sigs/release-utils gives some more examples of what one could do with mage.

So yes, I'd agree that we could benefit from some instrumentation of common workflows here


repo template for creating new repos with all the basics ready to go

What would you want to see out of a template repo?


standard template/design for READMEs etc

Same question as above.


standard documentation style/format? perhaps a docs.openclarity.io site?

We currently have a website for OpenClarity here: https://openclarity.io / https://github.com/openclarity/openclarity.io

I'll make a few suggestions here:

An example config snippet might look something like this:

module:
  imports:
    - path: github.com/openclarity/apiclarity
      mounts:
      - source: docs
        target: content/docs/apiclarity
    - path: github.com/openclarity/kubeclarity
      mounts:
      - source: docs
        target: content/docs/kubeclarity
    - path: github.com/openclarity/functionclarity
      mounts:
      - source: docs
        target: content/docs/functionclarity

What that config snippet is saying is:

  • import {api,kube,function}clarity repos
  • map those repos' docs/ directory to docs/{api,kube,function}clarity on the website

Then we run some sync job in the background to republish the site if docs/ for any of the projects change.

Let me know what you think about these!

@ghost
Copy link
Author

ghost commented Dec 15, 2022

What would you want to see out of a template repo?
Same question as above. (for the README)

I think a template repo would lay down the basic foundations/layout for a project (we might need multiple templates one for go projects/other project types), including things like:

  • the docs directory with a landing page and an example document
  • a starting magefile/Makefile with some of the basic targets already implemented even if empty (build, lint, test, clean)
  • a README template with a ToC, a couple of placeholders to indicate what to put there (like ), an empty Why/What section, and then standard Contributing and License sections
  • some standard/starter workflows which have lint, test, build, publish steps even if the steps are empty (if we standardise on a mage/Make targets these should be able to be filled out for most projects)
  • for go projects we could include a template go.mod as a starting point, and even a hello world main.go so that the targets have something to build and show working even if you've only just cloned the template

@justaugustus
Copy link
Member

Opened a separate issue for Code of Conduct: #3

@justaugustus
Copy link
Member

(Flagging this as the canonical tracking issue: cisco-open/.github#3)

@stale
Copy link

stale bot commented Apr 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent activity or udpates label Apr 1, 2023
@justaugustus justaugustus removed the stale No recent activity or udpates label Apr 5, 2023
@justaugustus justaugustus assigned ghost Apr 5, 2023
@stale
Copy link

stale bot commented Jul 14, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent activity or udpates label Jul 14, 2023
@lelia lelia removed the stale No recent activity or udpates label Jul 18, 2023
@lelia lelia added the keep Prevents an issue from being marked as 'stale' label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Prevents an issue from being marked as 'stale'
Projects
None yet
Development

No branches or pull requests

2 participants