Skip to content

Commit 5d6a7e7

Browse files
committed
docs: update CONTRIBUTING.md based on review feedback
- Remove formal language and emphasis on respect - Remove Code of Conduct section - Remove redundant How Can I Contribute stub section - Update Python version requirement to 3.11 - Simplify commit message guidelines to free-form style - Update PR guidelines to be less prescriptive - Relax code style guidelines to focus on matching existing code - Update code quality section to note JOSS submission requirements - Add information about test file organization - Update line length guidelines to reflect actual practice
1 parent b03bdaf commit 5d6a7e7

1 file changed

Lines changed: 20 additions & 81 deletions

File tree

CONTRIBUTING.md

Lines changed: 20 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
# Contributing to PyNumDiff
22

3-
Thank you for your interest in contributing to PyNumDiff! This document provides guidelines and instructions for contributing to the project. Following these guidelines helps communicate that you respect the time of the developers managing and developing this open-source project.
3+
Thank you for your interest in contributing to PyNumDiff! This document provides guidelines and instructions for contributing to the project.
44

55
## Table of Contents
66

7-
- [Code of Conduct](#code-of-conduct)
87
- [How Can I Contribute?](#how-can-i-contribute)
98
- [Development Setup](#development-setup)
109
- [Code Style Guidelines](#code-style-guidelines)
1110
- [Testing Guidelines](#testing-guidelines)
1211
- [Pull Request Process](#pull-request-process)
1312
- [Reporting Bugs](#reporting-bugs)
1413
- [Proposing Features](#proposing-features)
15-
- [Commit Message Conventions](#commit-message-conventions)
16-
- [Questions?](#questions)
17-
18-
## Code of Conduct
19-
20-
This project adheres to a code of conduct that all contributors are expected to follow. Please be respectful and constructive in all interactions.
2114

2215
## How Can I Contribute?
2316

24-
### Reporting Bugs
25-
26-
If you find a bug, please report it by [opening an issue](https://github.com/florisvb/PyNumDiff/issues/new). See the [Reporting Bugs](#reporting-bugs) section for details.
27-
28-
### Suggesting Enhancements
29-
30-
Have an idea for a new feature or improvement? Please [open an issue](https://github.com/florisvb/PyNumDiff/issues/new) to discuss it. See the [Proposing Features](#proposing-features) section for details.
31-
3217
### Contributing Code
3318

3419
1. Look for issues labeled `good first issue` if you're new to the project
@@ -41,7 +26,7 @@ Have an idea for a new feature or improvement? Please [open an issue](https://gi
4126

4227
### Prerequisites
4328

44-
- Python 3.7 or higher
29+
- Python 3.11 or higher
4530
- Git
4631
- (Optional) A virtual environment manager (venv, conda, etc.)
4732

@@ -99,19 +84,17 @@ Have an idea for a new feature or improvement? Please [open an issue](https://gi
9984

10085
### Python Style Guide
10186

102-
PyNumDiff follows [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guidelines. Here are the key points:
87+
There's no strict coding style enforced. The main guideline is to match the existing code style in the project. When contributing:
10388

89+
- Match existing method signatures and docstring formats
90+
- Follow the naming conventions used in the existing codebase
10491
- Use 4 spaces for indentation (no tabs)
105-
- Maximum line length: 79 characters (soft limit) or 99 characters (hard limit)
106-
- Use meaningful variable and function names
107-
- Follow naming conventions:
108-
- Functions and variables: `snake_case`
109-
- Classes: `PascalCase`
110-
- Constants: `UPPER_SNAKE_CASE`
11192

11293
### Code Quality
11394

114-
The project uses `pylint` for code quality checks. Before submitting a PR:
95+
The project uses `pylint` for code quality checks. While linting hasn't been strictly enforced recently, it will be important for the planned JOSS (Journal of Open Source Software) submission, which has stricter requirements.
96+
97+
To run linting checks:
11598

11699
1. **Run pylint** on your changes:
117100
```bash
@@ -123,8 +106,6 @@ The project uses `pylint` for code quality checks. Before submitting a PR:
123106
python linting.py
124107
```
125108

126-
3. **Fix any issues** reported by pylint before submitting your PR
127-
128109
### Editor Configuration
129110

130111
The project includes an `.editorconfig` file that ensures consistent formatting. Most modern editors support EditorConfig automatically.
@@ -153,6 +134,11 @@ pytest -s --bounds
153134
- Ensure all tests pass before submitting a PR
154135
- Tests should be deterministic and not depend on external resources
155136

137+
The test suite is organized into several test files:
138+
- `test_diff_methods`: Broadly tests for correctness and ability to actually differentiate
139+
- `test_utils`: Contains tests of miscellaneous functionality like simulations and evaluation metrics
140+
- `test_optimize`: Tests the hyperparameter optimization code
141+
156142
### Continuous Integration
157143

158144
The project uses GitHub Actions for continuous integration. All pull requests are automatically tested. Make sure your changes pass all CI checks before requesting a review.
@@ -189,7 +175,7 @@ The project uses GitHub Actions for continuous integration. All pull requests ar
189175
python linting.py
190176
```
191177

192-
7. **Commit your changes** with clear, descriptive commit messages (see [Commit Message Conventions](#commit-message-conventions))
178+
7. **Commit your changes** with clear, descriptive commit messages (see [Commit Messages](#commit-messages))
193179

194180
### Submitting a Pull Request
195181

@@ -221,8 +207,7 @@ The project uses GitHub Actions for continuous integration. All pull requests ar
221207

222208
### PR Guidelines
223209

224-
- Keep PRs focused on a single issue or feature
225-
- Keep PRs reasonably sized (if large, consider breaking into smaller PRs)
210+
- Smaller, focused PRs are generally easier to review
226211
- Ensure all CI checks pass
227212
- Request review from maintainers when ready
228213
- Be responsive to feedback
@@ -314,19 +299,11 @@ A clear and concise description of any alternative solutions or features you've
314299
Add any other context or examples about the feature request here.
315300
```
316301

317-
## Commit Message Conventions
302+
## Commit Messages
318303

319-
### Commit Message Format
320-
321-
We follow a conventional commit message format:
322-
323-
```
324-
<type>(<scope>): <subject>
325-
326-
<body>
327-
328-
<footer>
329-
```
304+
We encourage descriptive commit messages that explain what changed and why.
305+
Long, detailed commit messages are appreciated as they help others understand
306+
the project's history.
330307

331308
### Types
332309

@@ -335,43 +312,6 @@ We follow a conventional commit message format:
335312
- `docs`: Documentation only changes
336313
- `style`: Code style changes (formatting, missing semicolons, etc.)
337314
- `refactor`: Code refactoring without changing functionality
338-
- `test`: Adding or updating tests
339-
- `chore`: Maintenance tasks (dependencies, build config, etc.)
340-
341-
### Examples
342-
343-
```
344-
feat(optimize): add support for custom search spaces
345-
346-
Allow users to specify custom parameter search spaces in the
347-
optimize function for better control over hyperparameter tuning.
348-
349-
Fixes #123
350-
```
351-
352-
```
353-
fix(differentiation): correct boundary condition handling
354-
355-
Fixed an issue where boundary conditions were not properly
356-
handled for signals with variable step sizes.
357-
358-
Closes #456
359-
```
360-
361-
```
362-
docs(readme): update installation instructions
363-
364-
Updated README with clearer installation steps for Windows users.
365-
```
366-
367-
### Guidelines
368-
369-
- Use the imperative mood ("add feature" not "added feature")
370-
- Keep the subject line under 50 characters
371-
- Capitalize the subject line
372-
- Do not end the subject line with a period
373-
- Use the body to explain what and why vs. how
374-
- Reference issues and PRs in the footer
375315

376316
## Questions?
377317

@@ -389,5 +329,4 @@ If you have questions about contributing:
389329
- [PEP 8 Style Guide](https://www.python.org/dev/peps/pep-0008/)
390330
- [pytest Documentation](https://docs.pytest.org/)
391331

392-
Thank you for contributing to PyNumDiff! 🎉
393-
332+
Thank you for contributing to PyNumDiff! 🎉

0 commit comments

Comments
 (0)