Contributing
Webperf Core is open source under the MIT licence and has been built by a community since 2019. Contributions are welcome, and they are treated the same whoever sends them in.
Before you start
Check the issues in case someone is already working on the same thing, and say so in Slack if you're planning something larger. It saves everyone time.
Workflow
- Fork the repository
- Clone your fork and create a branch for the change
- Follow the local install
- Make the change
- Run linting and the relevant tests
- Open a pull request against
main
Code quality
The Python code is checked with PyLint and the JavaScript with ESLint. Both run automatically on every pull request. Linting runs against Python 3.10 and 3.13, while the regression tests run only on 3.13.
pylint *.py
npm run lint
Regression tests
Each test has its own workflow under .github/workflows/, for example regression-test-http.yml. They run the test against a known website and compare the outcome with an expected result.
If you change something in tests/utils.py or helpers/, you affect more tests than the one you're looking at. Run more regression tests than the obvious one.
Things to keep in mind
The test numbers are permanent. A retired test is replaced with TEST_DEPRECATED in its position in the tuple. It is never removed. See architecture.
Scoring changes have consequences. If you change how a score is calculated, you change the history for every website on Webperf.se. Such changes should be discussed before they're made.
New strings need translating. If you add text shown to the user, it must exist in the language files. See translations.
Contributing in other ways
You don't need to write code to help:
- Report bugs and describe how to reproduce them
- Improve the documentation, both here and in the repository
- Translate into more languages
- Answer questions in Slack