Skip to content

Commit 993535a

Browse files
committed
refined CONTRIBUTING.md avoiding duplication with the docs
1 parent 949d9e2 commit 993535a

File tree

1 file changed

+36
-128
lines changed

1 file changed

+36
-128
lines changed

.github/CONTRIBUTING.md

Lines changed: 36 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,65 @@
1-
21
# Contributing to CodeEntropy
32

4-
We welcome contributions from the community to improve and extend CodeEntropy. This guide outlines how to get started, make changes, and submit them for review.
5-
6-
---
3+
Thank you for your interest in contributing to **CodeEntropy**!
74

8-
## Getting Started
5+
We’re excited to collaborate with developers, researchers, and community members to make CodeEntropy better for everyone.
96

10-
1. **Create a GitHub account**: [Sign up here](https://github.com/signup/free).
11-
2. **Fork the repository**: [How to fork](https://help.github.com/articles/fork-a-repo/).
12-
3. **Clone your fork locally**:
13-
```bash
14-
git clone https://github.com/YOUR_USERNAME/CodeEntropy.git
15-
cd CodeEntropy
16-
```
17-
18-
4. **Create a virtual environment**:
19-
```bash
20-
python -m venv codeentropy-dev
21-
source codeentropy-dev/bin/activate # Linux/macOS
22-
codeentropy-dev\Scripts\activate # Windows
23-
```
24-
25-
5. **Install development dependencies**:
26-
```bash
27-
pip install -e ".[testing,docs,pre-commit]"
28-
pre-commit install
29-
```
7+
This guide explains how to set up your environment, make changes, and submit them for review. Whether you’re fixing a bug, improving documentation, or adding new features, every contribution makes a difference.
308

319
---
3210

33-
## Making Changes
34-
35-
- **Use a feature branch**:
36-
```bash
37-
git checkout -b 123-fix-levels
38-
```
39-
You cannot commit directly to `main` as this is a protected branch.
40-
41-
- **Add your code**, documentation, and tests. All new features must include:
42-
- Unit tests
43-
- Documentation updates
44-
- Compliance with coding standards
11+
## Getting Started
4512

46-
- **Run tests**:
47-
```bash
48-
pytest -v
49-
pytest --cov CodeEntropy --cov-report=term-missing
50-
```
13+
Before contributing, please review the [Developer Guide](https://codeentropy.readthedocs.io/en/latest/developer_guide.html).
14+
It covers CodeEntropy’s architecture, setup instructions, and contribution workflow.
5115

52-
- **Run pre-commit checks**:
53-
These ensure formatting, linting, and basic validations.
54-
```bash
55-
pre-commit run --all-files
56-
```
16+
If you’re new to the project, we also recommend:
17+
- Reading the [README](../README.md) for an overview and installation details.
18+
- Checking open [issues](https://github.com/CCPBioSim/CodeEntropy/issues) labeled **good first issue** to find beginner-friendly tasks.
5719

5820
---
5921

6022
## Submitting a Pull Request (PR)
6123

62-
1. Push your branch to GitHub.
63-
2. Open a [pull request](https://help.github.com/articles/using-pull-requests/).
64-
3. Use the templated Pull Request template to fill out:
65-
- A summary of what the PR is doing
66-
- List all the changes that the PR is proposing
67-
- Add how these changes will impact the repository
68-
4. Ensure:
69-
- All tests pass
70-
- Pre-commit checks pass
71-
- Documentation is updated
72-
73-
5. Your PR will be reviewed by core developers. At least one approval is required before merging.
74-
75-
---
76-
77-
## Running Tests
78-
79-
- Full suite:
80-
```bash
81-
pytest -v
82-
```
83-
- With coverage:
84-
```bash
85-
pytest --cov CodeEntropy --cov-report=term-missing
86-
```
87-
- Specific module:
88-
```bash
89-
pytest CodeEntropy/tests/test_CodeEntropy/test_levels.py
90-
```
91-
- Specific test:
92-
```bash
93-
pytest CodeEntropy/tests/test_CodeEntropy/test_levels.py::test_select_levels
94-
```
95-
96-
---
97-
98-
## Coding Standards
24+
When you’re ready to submit your work:
9925

100-
We use **pre-commit hooks** to enforce style and quality:
26+
1. **Push your branch** to GitHub.
27+
2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch.
28+
3. **Fill out the PR template**, including:
29+
- A concise summary of what your PR does
30+
- A list of all changes introduced
31+
- Details on how these changes affect the repository (features, tests, documentation, etc.)
32+
4. **Verify before submission**:
33+
- All tests pass
34+
- Pre-commit checks succeed
35+
- Documentation is updated where applicable
36+
5. **Review process**:
37+
- Your PR will be reviewed by the core development team.
38+
- At least **one approval** is required before merging.
10139

102-
- **Black** for formatting
103-
- **Isort** for import sorting
104-
- **Flake8** for linting
105-
- **Pre-commit-hooks** for:
106-
- Large file detection
107-
- AST validity
108-
- Merge conflict detection
109-
- YAML/TOML syntax checks
40+
We aim to provide constructive feedback quickly and appreciate your patience during the review process.
11041

11142
---
11243

113-
## Continuous Integration (CI)
114-
115-
All PRs trigger GitHub Actions to:
116-
117-
- Run tests
118-
- Check style
119-
- Build documentation
120-
- Validate versioning
121-
122-
---
123-
124-
## Building Documentation
44+
## Reporting Issues
12545

126-
Build locally:
127-
```bash
128-
cd docs
129-
make html
130-
```
46+
Found a bug or have a feature request?
13147

132-
View in browser:
133-
```
134-
docs/build/html/index.html
135-
```
48+
1. **Open a new issue** on GitHub.
49+
2. Provide a **clear and descriptive title**.
50+
3. Include:
51+
- Steps to reproduce the issue (if applicable)
52+
- Expected vs. actual behavior
53+
- Relevant logs, screenshots, or input files
13654

137-
Edit docs in:
138-
- `docs/science.rst`
139-
- `docs/developer_guide.rst`
55+
Well-documented issues help us address problems faster and keep CodeEntropy stable and robust.
14056

14157
---
14258

143-
## Reporting Issues
144-
145-
Found a bug or want a feature?
59+
## Additional Resources
14660

147-
1. Open an issue on GitHub.
148-
2. Include a clear description and input files if relevant.
61+
- [GitHub Docs](https://help.github.com/)
14962

15063
---
15164

152-
## Additional Resources
153-
154-
- [GitHub Docs](https://help.github.com/)
155-
- [PR Best Practices](http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/)
156-
- [Contribution Guide](http://www.contribution-guide.org)
157-
- [Thinkful PR Tutorial](http://www.thinkful.com/learn/github-pull-request-tutorial/#Time-to-Submit-Your-First-PR)
65+
Thank you for helping improve **CodeEntropy**, your contributions make open source stronger!

0 commit comments

Comments
 (0)