@@ -39,18 +39,21 @@ This project adheres to a code of conduct that we expect all contributors to fol
3939### Setting Up Your Development Environment
4040
41411 . ** Fork and clone the repository:**
42+
4243 ``` bash
4344 git clone https://github.com/YOUR_USERNAME/hed-python.git
4445 cd hed-python
4546 ```
4647
47482 . ** Create a virtual environment (recommended):**
49+
4850 ``` bash
4951 python -m venv venv
5052 source venv/bin/activate # On Windows: venv\Scripts\activate
5153 ```
5254
53553 . ** Install in development mode:**
56+
5457 ``` bash
5558 pip install -e .
5659 pip install -r requirements.txt
@@ -59,6 +62,7 @@ This project adheres to a code of conduct that we expect all contributors to fol
5962 ```
6063
61644 . ** Run tests to verify setup:**
65+
6266 ``` bash
6367 python -m unittest discover tests
6468 ```
@@ -77,31 +81,35 @@ This project adheres to a code of conduct that we expect all contributors to fol
7781We use several tools to maintain code quality:
7882
7983- ** black:** For automatic code formatting
84+
8085 ``` bash
8186 # Check if code is formatted correctly
8287 black --check .
83-
88+
8489 # Automatically format all code
8590 black .
86-
91+
8792 # Format specific files or directories
8893 black hed/ tests/
89-
94+
9095 # Windows: Use --workers 1 if you encounter file I/O errors
9196 black --workers 1 .
9297 ```
9398
9499- ** ruff:** For linting, style checking, and import sorting
100+
95101 ``` bash
96102 ruff check hed/ tests/
97103 ```
98-
104+
99105 To automatically fix issues:
106+
100107 ``` bash
101108 ruff check --fix hed/ tests/
102109 ```
103110
104111- ** codespell:** For spell checking
112+
105113 ``` bash
106114 codespell
107115 ```
@@ -113,6 +121,7 @@ We use several tools to maintain code quality:
113121- Provide examples for complex functionality
114122
115123Example docstring:
124+
116125``` python
117126def validate_hed_string (hed_string , schema )->list[dict ]:
118127 """ Validate a HED string against a schema.
@@ -149,6 +158,7 @@ def validate_hed_string(hed_string, schema)->list[dict]:
149158- Include edge cases
150159
151160Example test:
161+
152162``` python
153163import unittest
154164from hed import HedString, load_schema
@@ -175,16 +185,19 @@ if __name__ == '__main__':
175185### Running Tests
176186
177187Run all tests:
188+
178189``` bash
179190python -m unittest discover tests
180191```
181192
182193Run specific test file:
194+
183195``` bash
184196python -m unittest tests/models/test_hed_string.py
185197```
186198
187199Run specific test case:
200+
188201``` bash
189202python -m unittest tests.models.test_hed_string.TestHedString.test_constructor
190203```
@@ -194,17 +207,20 @@ python -m unittest tests.models.test_hed_string.TestHedString.test_constructor
194207### Before Submitting
195208
1962091 . ** Update your branch:**
210+
197211 ``` bash
198212 git fetch origin
199213 git rebase origin/main
200214 ```
201215
2022162 . ** Run all tests:**
217+
203218 ``` bash
204219 python -m unittest discover tests
205220 ```
206221
2072223 . ** Check code style:**
223+
208224 ``` bash
209225 ruff check hed/ tests/
210226 ```
@@ -214,27 +230,31 @@ python -m unittest tests.models.test_hed_string.TestHedString.test_constructor
214230### Submitting a Pull Request
215231
2162321 . ** Create a feature branch:**
233+
217234 ``` bash
218235 git checkout -b feature/your-feature-name
219236 ```
220237
2212382 . ** Make your changes** with clear, focused commits
222239
2232403 . ** Write descriptive commit messages:**
241+
224242 ```
225243 Add validation for temporal extent
226-
244+
227245 - Implement temporal extent validation logic
228246 - Add unit tests for temporal validation
229247 - Update documentation with temporal examples
230248 ```
231249
2322504 . ** Push to your fork:**
251+
233252 ``` bash
234253 git push origin feature/your-feature-name
235254 ```
236255
2372565 . ** Open a Pull Request** on GitHub:
257+
238258 - Target the ` main ` branch
239259 - Fill out the PR template completely
240260 - Link related issues
@@ -267,7 +287,8 @@ Create an issue with:
2672877 . ** Error messages** or stack traces
268288
269289Example:
270- ``` markdown
290+
291+ ```` markdown
271292## Bug: Schema validation fails with custom schema
272293
273294** Environment:**
@@ -296,7 +317,7 @@ issues = hed.validate(schema) # KeyError here
296317KeyError: 'Event'
297318 at line 123 in validator.py
298319\` ``
299- ```
320+ ````
300321
301322## Suggesting Enhancements
302323
0 commit comments