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
docs: update developer guide for new testing, CI workflows, and Ruff tooling:
- Add instructions for unit vs regression test suites
- Document slow test markers and how to run them
- Explain automatic regression dataset downloads via filestore
- Add guidance for updating regression baselines
- Update coding standards to use Ruff instead of Black/Flake8/isort
- Document multi-OS and multi-Python CI workflows
- Clarify developer setup and testing commands
- Remove outdated tooling references
Copy file name to clipboardExpand all lines: docs/developer_guide.rst
+86-33Lines changed: 86 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,10 @@
1
1
Developer Guide
2
2
===============
3
3
4
-
CodeEntropy is open-source, and we welcome contributions from the wider community to help improve and extend its functionality. This guide walks you through setting up a development environment, running tests, submitting contributions, and maintaining coding standards.
4
+
CodeEntropy is open-source, and we welcome contributions from the wider community
5
+
to help improve and extend its functionality. This guide walks you through setting
6
+
up a development environment, running tests, contributing code, and understanding
7
+
the continuous integration workflows.
5
8
6
9
Getting Started for Developers
7
10
------------------------------
@@ -24,44 +27,77 @@ Install development dependencies::
24
27
Running Tests
25
28
-------------
26
29
27
-
Run the full test suite::
30
+
CodeEntropy uses **pytest** with separate unit and regression suites.
Regression datasets are automatically downloaded from the CCPBioSim filestore
68
+
and cached locally in ``.testdata/`` when tests are run.
69
+
70
+
No manual setup is required.
71
+
72
+
The test configuration files reference datasets using the ``${TESTDATA}``
73
+
placeholder, which is expanded automatically during test execution.
42
74
43
75
Coding Standards
44
76
----------------
45
77
46
-
We use **pre-commit hooks** to maintain code quality and consistent style. To enable these hooks::
78
+
We use **pre-commit hooks** to maintain code quality and consistent style.
79
+
80
+
Enable hooks::
47
81
48
82
pre-commit install
49
83
50
-
This ensures:
84
+
Our tooling stack:
85
+
86
+
- **Linting and formatting** via ``ruff``
87
+
- **Basic repository checks** via ``pre-commit-hooks``
88
+
89
+
Ruff performs:
90
+
91
+
- Code formatting
92
+
- Import sorting
93
+
- Static analysis
94
+
- Style enforcement
51
95
52
-
- **Formatting** via ``black`` (`psf/black`)
53
-
- **Import sorting** via ``isort`` with the ``black`` profile
54
-
- **Linting** via ``flake8`` with ``flake8-pyproject``
55
-
- **Basic checks** via ``pre-commit-hooks``, including:
96
+
Run checks manually::
56
97
57
-
- Detection of large added files
58
-
- AST validity checks
59
-
- Case conflict detection
60
-
- Executable shebang verification
61
-
- Merge conflict detection
62
-
- TOML and YAML syntax validation
98
+
pre-commit run --all-files
63
99
64
-
To skip pre-commit checks for a commit::
100
+
Skip checks for a commit (not recommended)::
65
101
66
102
git commit -n
67
103
@@ -72,33 +108,50 @@ To skip pre-commit checks for a commit::
72
108
Continuous Integration (CI)
73
109
---------------------------
74
110
75
-
CodeEntropy uses **GitHub Actions** to automatically:
111
+
CodeEntropy uses **GitHub Actions** with multiple workflows to ensure stability
112
+
across platforms and Python versions.
113
+
114
+
Pull Request checks include:
115
+
116
+
- Unit tests on Linux, macOS, and Windows
117
+
- Python versions 3.12-3.14
118
+
- Quick regression tests
119
+
- Documentation build
120
+
- Pre-commit validation
121
+
122
+
Daily workflow:
76
123
77
-
- Run all tests
78
-
- Check coding style
79
-
- Build documentation
80
-
- Validate versioning
124
+
- Runs automated test validation
81
125
82
-
Every pull request will trigger these checks to ensure quality and stability.
126
+
Weekly workflows:
127
+
128
+
- Full regression suite including slow tests
129
+
- Documentation build across all Python versions
130
+
131
+
CI also caches regression datasets to improve performance.
83
132
84
133
Building Documentation
85
134
----------------------
86
135
87
-
Build locally::
136
+
Build documentation locally::
88
137
89
138
cd docs
90
139
make html
91
140
92
-
The generated HTML files will be in ``docs/build/html/``. Open ``index.html`` in your browser to view the documentation.
141
+
The generated HTML files will be in ``docs/build/html/``.
142
+
143
+
Open ``index.html`` in your browser to preview.
93
144
94
-
Edit docs in the following directories:
145
+
Documentation sources are located in:
95
146
96
147
- ``docs/user_guide/``
97
148
- ``docs/developer_guide/``
98
149
99
150
Contributing Code
100
151
-----------------
101
-
If you would to contribution to **CodeEntropy** please refer to our `Contributing Guidelines <https://github.com/CCPBioSim/CodeEntropy?tab=contributing-ov-file>`_
152
+
153
+
If you would like to contribute to **CodeEntropy**, please refer to the
0 commit comments