Contributing to CEEMS 🌱
Thanks for your interest in contributing to CEEMS! This guide will help you get started with contributing to our project.
What Should I Know Before I Get Started? 🤔
CEEMS is a Go-based project focused on sustainable computing. Before contributing, it's helpful to:
- Have basic knowledge of Go programming
- Understand SLURM, Openstack and Kubernetes
- Familiarize yourself with the project structure by exploring the repository
Gen AI policy
This project adheres to the Linux Foundation's Generative AI Policy, which can be viewed at https://www.linuxfoundation.org/legal/generative-ai.
How Do I Start Contributing? 🚀
- Fork the repository on GitHub
- Clone your fork locally
- Set up your development environment (see below)
- Create a new branch for your work
- Make your changes
- Submit a pull request
How Can I Contribute? 💡
Continuous Integration 🔄
This project uses GitHub Actions for CI. Each PR will trigger automated builds
and tests. Check the .github/workflows
directory to understand our CI pipeline.
Ensure your contributions pass all CI checks before requesting a review.
Code Review 👀
All submissions require review. This project use GitHub pull requests for this purpose:
- Submit a pull request from your fork to our main repository
- Ensure all CI checks pass
- Address feedback from maintainers
- Once approved, a maintainer will merge your changes
Reporting Bugs 🐛
Found a bug? Please report it by creating an issue with the bug template. Include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots or logs if applicable
- Your environment details (OS, Go version, etc.)
Suggesting Enhancements ✨
How Do I Submit A (Good) Enhancement Suggestion?
Enhancement suggestions are tracked as GitHub issues. Create an issue with the enhancement template and provide:
- A clear and descriptive title
- A detailed description of the proposed enhancement
- Any potential implementation ideas you have
- Why this enhancement would be useful to most CEEMS users
How Do I Submit A (Good) Improvement Item?
For smaller improvements to existing functionality:
- Focus on a single, specific improvement
- Explain how your improvement makes CEEMS better
- Provide context around why this improvement matters
- Link to any related issues or discussions
Development 💻
Set up your dev environment
Prerequisites
- Go (1.24 or later recommended)
- LLVM (to compile eBPF codes)
Building
The project has a make file which can be used to compile apps. CEEMS ships
different apps of which ceems_api_server
and ceems_lb
are CGO based and
the rest are pure Go apps.
To build pure Go apps,
make build
To build CGO apps,
CGO_APPS=1 make build
Testing
CEEMS apps contains unit and e2e tests which must be passed.
Run unit tests for both Go and CGO apps with:
make test
CGO_APPS=1 make test
Generate coverage reports with:
make coverage
Similarly, run e2e tests for Go and CGO apps with:
make test-e2e
CGO_APPS=1 make test-e2e
e2e tests compare the output of current test with the expected output. If the current changes made in the source code changes the expected output as well, the expected output files can be updated with:
make test-e2e-update
CGO_APPS=1 make test-e2e-update
For ceems_exporter
, unit and e2e tests are run against fake /sys
and /proc
file
systems which will be extracted to pkg/collector/testdata/{sys,proc}
folders, respectively.
If more test resources must be added to these fake file systems, they can be simply copied
into appropriate folders and then archived with:
./scripts/ttar -C pkg/collector/testdata -c -f pkg/collector/testdata/sys.ttar sys
./scripts/ttar -C pkg/collector/testdata -c -f pkg/collector/testdata/proc.ttar proc
Your First Code Contribution 🎉
Looking for a place to start?
- Look for issues labeled
good first issue
orhelp wanted
- Read the code in the area you want to work on to understand patterns
- Ask questions in issues or discussions if you need help
Remember that even small contributions like fixing typos or improving documentation are valuable!
Thanks for contributing to CEEMS! 💚