You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+26-16Lines changed: 26 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@ Thank you for considering contributing to the `python-bitcoin-utils` project! Yo
7
7
### 1. Reporting Issues
8
8
9
9
If you encounter any bugs, unexpected behavior, or have feature requests, please open an issue on the [GitHub Issues](https://github.com/karask/python-bitcoin-utils/issues) page. When reporting a bug, provide the following information:
10
-
11
10
- A clear description of the issue.
12
11
- Steps to reproduce the issue.
13
12
- Expected behavior.
@@ -26,19 +25,18 @@ We welcome pull requests! To contribute code:
- Ensure your code is well-documented and includes meaningful commit messages.
48
+
- Install the package in development mode before running tests:
49
+
```sh
50
+
pip install -e .
51
+
```
52
+
This creates an editable installation linking to your local code, which is necessary for the tests to properly discover and import modules.
50
53
- Run tests before submitting a pull request:
51
54
```sh
52
55
pytest tests/
@@ -56,9 +59,9 @@ git checkout -b feature-name
56
59
#### Step 4: Submit a Pull Request
57
60
58
61
1. Push your changes to your fork's branch:
59
-
```sh
60
-
git push origin feature-name
61
-
```
62
+
```sh
63
+
git push origin feature-name
64
+
```
62
65
2. Open a pull request from your fork's branch to the `master` branch of the original repository.
63
66
3. Provide a detailed description of your changes.
64
67
4. Address any requested changes from maintainers.
@@ -78,11 +81,9 @@ git checkout -b feature-name
78
81
### 5. Writing Tests
79
82
80
83
Ensure new features and bug fixes include test cases. The project uses `pytest` for testing. Run all tests with:
81
-
82
84
```sh
83
85
pytest
84
86
```
85
-
86
87
If you add new features, create corresponding test cases under the `tests/` directory. Ensure your tests cover:
87
88
- Normal expected operation
88
89
- Edge cases
@@ -92,10 +93,19 @@ If you add new features, create corresponding test cases under the `tests/` dire
92
93
93
94
Help improve the documentation by submitting corrections, clarifications, or examples. Update the README or other documentation files as needed.
94
95
96
+
### 7. Troubleshooting Test Failures
97
+
98
+
If you encounter test failures when running the test suite, check for these common issues:
99
+
100
+
-**Module import errors**: Make sure you've installed the package in development mode with `pip install -e .`
101
+
-**API mismatch errors**: If tests are failing with TypeError or similar errors about function signatures, check if there have been recent API changes in the corresponding modules.
102
+
-**Transaction hex mismatches**: Assertion errors in transaction tests with hex string differences often indicate changes in transaction serialization or signature generation logic.
103
+
104
+
For specific test failures, please refer to the test file and the corresponding implementation to understand the expected behavior.
105
+
95
106
## Code of Conduct
96
107
97
108
Be respectful and follow the open-source community guidelines. Maintain a collaborative and inclusive environment.
0 commit comments