Thank you for your interest in contributing to Celery Insights! This document will help guide you through the process.
⚠️ WARNINGIf you have discovered a security vulnerability, please DO NOT file a public issue. Instead, please report them directly to [email protected].
If you have found a bug, we would like to know, so we can fix it! Before you file a bug report, please make sure that the bug can be reproduced consistently.
To report a bug, create a new GitHub Issue with the "bug" label. Make sure to include a minimal reproduction of the bug and any steps needed to reproduce it.
Please feel free to discuss it in GitHub Discussions first. Other users may have experienced a similar issue and can provide insights or guidance on how to overcome it.
If you have any questions, ideas, or want to request a feature, feel free to discuss them in GitHub Discussions.
For feature requests, create a new GitHub Issue with the "enhancement" label after discussing it in GitHub Discussions.
To contribute to the project, follow these steps:
- Fork the repository.
- Create a branch with a descriptive name, using prefixes like
feature/
orbug/
for the branch names. - Make your changes in the branch.
For server API changes, make sure to run
npm run generate-client
in the frontend folder to update the Server Client SDK.You can use the provided PyCharm run configuration
generate-client
- Make sure to run linters and formatters:
- Open a pull request to the main branch.
- Check the CI workflow statuses and for comments on your pull request.
- Python
- Node.js
- An IDE (we suggest PyCharm, but you can use your preferred IDE)
- Clone your fork of the Celery Insights repository.
git clone https://github.com/<your_username>/celery_insights.git
- Navigate to the root folder of the repository.
cd celery_insights/
- Install the Python dependencies using Poetry.
poetry install
- Install pre-commit hooks
pre-commit install
- Install the Node.js dependencies using npm.
cd frontend/ npm install
- Create
.env
filecd ../server/ cp .env.example .env
- Start the server (provided PyCharm run configuration
run server
)cd server/ python run.py
- Start the frontend server (provided PyCharm run configuration
dev
)cd frontend/ npm run dev
- Open browser to http://localhost:5173
- Write short, concise functions and classes.
- Provide detailed types and variables, including generics when needed.
- Do not abbreviate variable and function names.
- Use type annotations, including generics when required. Code should be 100% type covered.
- Avoid creating undocumented dictionaries. Use dataclasses, Pydantic models, classes, named tuples, etc.
- Avoid blocking the main thread. Use asyncio interfaces whenever possible, or use asyncio.to_thread for blocking code.
- Always log exceptions and errors. New package loggers should be added to
logging_config.py
. - Test files should end with
_test.py
, and not start withtest_?.py
.
- Use TypeScript only, avoid using vanilla JavaScript.
- Provide detailed types and variables, including generics when needed.
- Prefer arrow functions and one-liner expressions.
- Avoid storing React state multiple times. Use
useMemo
for derived states. Example:const MyComponent: React.FC<{items: string[]}> = ({items}) => { // Dont const [lengthBad, setLength] = useState(items.length) useEffect(() => setLength(items.length), [items]) // Do const lengthGood = useMemo(() => items.length, [items]) }
- Avoid unnecessary React re-renders. Performance is important.
- Follow the existing folder structure.
- Users are likely to be technical, so provide full information and messages.
- Always show task avatars instead of IDs, and type colors near task types.
- Add tooltips with description and help icons where needed.
- Reactions should be near interactions; avoid toasters, popups, etc.
- Add placeholders for loading or empty containers.
- Display error inside components and provide detailed information.
Code should be test-covered as much as possible.
Unit tests should be written close to the module they are testing, with the same module name.
For example, tests for models.py
should be at models_test.py
in the same folder.
Integration and end-to-end tests should be written in the tests project folder.
Celery Insights is licensed under the BSD 3-Clause License. By contributing to this project, you agree to license your contribution under the same license as the project.
Please note that the Celery Insights project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms. See CODE_OF_CONDUCT.md for more information.
If you have any questions or concerns, feel free to contact @danyi1212.