Skip to content

Commit 208a580

Browse files
authored
docs/improve contributing docs (#1812)
* docs: Update contributions guidelines * docs: add missing links to README.md * docs: apply PR suggestions on contribution files - closes #1810 * fix: remove unnecessary call for click
1 parent 4876379 commit 208a580

2 files changed

Lines changed: 57 additions & 23 deletions

File tree

CONTRIBUTING.md

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@ KernelCI Dashboard is an open-source project and contributions of all kinds are
55
## Before you start
66

77
- Read the README for an overview of the monorepo.
8-
- We recommend following the Onboarding guide to set up your environment and learn the project workflow.
9-
- New to the project? Pick an issue labeled "good first issue".
8+
- We recommend following the [Onboarding guide](./docs/Onboarding.md) to set up your environment and learn the project workflow. **Start here** if this is your first setup.
9+
- New to the project? Pick an issue labeled ["good first issue"](https://github.com/kernelci/dashboard/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
10+
- There are a couple of extensions that may help you with linting and formatting your code. Consider installing [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/) for your preferred code editor.
11+
- There are some of these to help with your Python development: [Black](https://black.readthedocs.io/en/stable/), [Flake8](https://flake8.pycqa.org/en/latest/), and [isort](https://pycqa.github.io/isort/).
1012

1113
## Useful links
1214

1315
- README: [./README.md](./README.md)
1416
- Onboarding guide: [./docs/Onboarding.md](./docs/Onboarding.md)
15-
- Open issues: https://github.com/kernelci/dashboard/issues
16-
- Good first issues: https://github.com/kernelci/dashboard/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
17+
- Open issues on [this page](https://github.com/kernelci/dashboard/issues)
18+
- Good first issues on [this page](https://github.com/kernelci/dashboard/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
1719

1820
## Reporting bugs
1921

2022
#### Did you find a bug?
2123

22-
- Ensure the bug was not already reported by searching on GitHub under Issues: https://github.com/kernelci/dashboard/issues
23-
- If you're unable to find an open issue addressing the problem, open a new one: https://github.com/kernelci/dashboard/issues/new
24+
- **<ins>Ensure the bug was not already reported</ins>** by searching on GitHub under [our Issues](https://github.com/kernelci/dashboard/issues)
25+
- If the issue is reported, give it a thumbs up or comment on it to "upvote" it
26+
- If you're unable to find an open issue addressing the problem, open a new one
27+
- [You can do it in this link](https://github.com/kernelci/dashboard/issues/new)
2428
- Include a clear title and description
2529
- Add steps to reproduce, logs, and screenshots if applicable
2630
- Provide a code sample or an executable test case demonstrating the expected behavior that is not occurring
@@ -41,11 +45,26 @@ KernelCI Dashboard is an open-source project and contributions of all kinds are
4145
5. Update documentation and add tests when applicable
4246
6. Ensure the PR passes automated checks; see the suggested workflow in the "Make your code pass automated code checks" section
4347

48+
### Guidelines for issues to create
49+
50+
We encourage actionable, well-defined issues. A good issue includes:
51+
- A clear title and description of the problem or feature
52+
- Steps to reproduce (for bugs), with logs and screenshots if applicable
53+
- For features: a brief explanation of the desired behavior and why it would benefit the project
54+
55+
Examples of good issues:
56+
- [Display Test Results Hierarchically: Group Test Cases Under Their Parent Test Suites](https://github.com/kernelci/dashboard/issues/1800)
57+
- [Tree Details Page: each grouping of execution items in the tests execution list](https://github.com/kernelci/dashboard/issues/286)
58+
59+
## Staging environment
60+
61+
If you don't have access to the production database, you can point the frontend to the staging API at `https://staging.dashboard.kernelci.org`. To do so, set `VITE_API_BASE_URL=https://staging.dashboard.kernelci.org` in your `dashboard/.env` file (copy from `dashboard/.env.example`). Ask for access in the `#webdashboard` channel on [KernelCI Discord](https://discord.gg/GRv3RhUa6P).
62+
4463
## Conventional Commits
4564

4665
### Suggested commit format
4766

48-
We recommend following the Conventional Commits specification (https://www.conventionalcommits.org/en/v1.0.0/#specification), which has the following format:
67+
We recommend following the [**Conventional Commits specification**](https://www.conventionalcommits.org/en/v1.0.0/#specification), which has the following format:
4968

5069
```shell
5170
<type>[optional scope]: <description>
@@ -55,36 +74,49 @@ We recommend following the Conventional Commits specification (https://www.conve
5574
[optional footer(s)]
5675
```
5776

58-
Types usually are:
77+
Types used in this project:
5978

60-
1. fix: meaning the commit patches a bug in the codebase.
61-
2. feat: the commit introduces a new feature to the codebase.
62-
3. feat! or fix!: the commit introduces a breaking API change.
63-
4. Other types are allowed, for example: build, cli, test, docs.
79+
1. `fix`: the commit patches a bug in the codebase.
80+
2. `feat`: the commit introduces a new feature to the codebase.
81+
3. `feat!` or `fix!`: the commit introduces a breaking API change.
82+
4. `style`: changes that do not affect the meaning of the code (formatting, whitespace).
83+
5. `refactor`: a code change that neither fixes a bug nor adds a feature.
84+
6. `docs`: documentation-only changes.
85+
7. `test`: adding or correcting tests.
86+
8. `build`: changes that affect the build system or external dependencies.
87+
9. `ci`: changes to CI configuration files and scripts (e.g., GitHub Actions).
88+
10. `chore`: other changes that don't modify src or test files.
6489

65-
When a commit introduces a breaking change in the API it is recommended to add a BREAKING CHANGE: footer.
90+
When a commit introduces a breaking change in the API it is recommended to add a `BREAKING CHANGE:` footer.
6691

67-
To provide contextual information, a scope may be provided alongside the type. This needs to be contained within parenthesis, for example, `feat(parser): add ability to parse arrays`.
92+
To provide contextual information, a scope may be provided alongside the type. This needs to be contained within parentheses, for example, `feat(parser): add ability to parse arrays`.
6893

6994
You can find more details on the Conventional Commits specification site.
7095

7196
## Make your code pass automated code checks
7297

7398
- Backend
74-
- See backend/README.md for environment and commands
75-
- Run linters, tests, and type checks locally; apply formatting
99+
- See [backend/README.md](backend/README.md) for environment and commands
100+
- Run linting: `poetry run flake8`
101+
- Run type checks (optional but recommended): `poetry run mypy`
102+
- Run tests: `poetry run pytest`
103+
- Apply formatting with `poetry run black .` before committing; the `backend/pre-commit` and `backend/pre-push` hooks can help automate this — see [backend/README.md](backend/README.md) for installation instructions
76104
- Frontend
77-
- See dashboard/README.md for scripts and commands
78-
- Run linters, tests, and type checks; ensure the app builds
105+
- See [dashboard/README.md](dashboard/README.md) for scripts and commands
106+
- Run linting: `pnpm lint`
107+
- Run unit tests: `pnpm test`
108+
- Run end-to-end tests: `pnpm e2e`
109+
- Ensure the app builds: `pnpm build`
79110
- CI
80111
- Make a Pull Request and wait for someone to approve the execution of GitHub Actions; if any check fail, they must be fixed for your PR to be approved
81112

82113
## Pull requests
83114

115+
- Use a title that follows the Conventional Commits format (e.g., `fix(backend): correct pagination offset`)
84116
- Reference related issues (e.g., Closes #123)
85117
- Describe the motivation, approach, and any trade-offs
86118
- Include screenshots/GIFs for UI changes
87-
- Wait for someone to approve the execution of Github Actions. Ensure CI is green before requesting reviews
119+
- Wait for someone to approve the execution of GitHub Actions. Ensure CI is green before requesting reviews
88120
- Take a look at merged PRs to see examples of good descriptions and commit messages
89121

90122
## Communication and help
@@ -94,4 +126,4 @@ You can find more details on the Conventional Commits specification site.
94126

95127
## Licensing
96128

97-
By contributing, you agree that your contributions will be licensed under the project’s LICENSE file.
129+
By contributing, you agree that your contributions will be licensed under the project's [LICENSE](./LICENSE) file.

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ system from the [KernelCI Foundation](https://kernelci.org/).
1212
What we have as a repository is a monorepo containing the *dashboard* (the web application) and a *backend*.
1313

1414
### Dashboard
15-
A web app built with [React](https://react.dev/) + [Typescript](https://www.typescriptlang.org/), to see more information check the dashboard [README](dashboard/README.md).
15+
A web app built with [React](https://react.dev/) + [TypeScript](https://www.typescriptlang.org/), to see more information check the dashboard [README](dashboard/README.md).
1616

1717
### Backend
18-
A Python http server built with [Django](https://www.djangoproject.com/) + [DRF](https://www.django-rest-framework.org/), to see more information check the backend [README](/backend/README.md).
18+
A Python http server built with [Django](https://www.djangoproject.com/) + [DRF](https://www.django-rest-framework.org/), to see more information check the backend [README](backend/README.md).
1919

2020

2121
## Quick run
@@ -101,7 +101,7 @@ sudo -E docker compose up --build -d
101101
```
102102
Or you can also run the env exports and docker compose within the root user by running `sudo su`.
103103

104-
> Tip: you can create a quick script to set all the necessary envs and start the services. This will also allow docker to see the environment variables correclty. Example:
104+
> Tip: you can create a quick script to set all the necessary envs and start the services. This will also allow docker to see the environment variables correctly. Example:
105105
106106
```sh
107107
export DB_USER=email@email.com
@@ -117,6 +117,8 @@ docker compose up --build
117117

118118
## Deploying to production
119119

120+
See [DEPLOYMENT.md](./DEPLOYMENT.md) for full deployment instructions covering development, staging, and production scenarios.
121+
120122
To deploy to prod you need to push a tag in the `release/YYYYMMDD.N` format
121123
like: `release/20240910.0`
122124

0 commit comments

Comments
 (0)