Contributing to OpenQP¶
Most feature work crosses several layers. A small keyword or workflow normally needs code, validation, examples, and manual updates.
Common Change Path¶
| Layer | Typical files |
|---|---|
| Input schema | pyoqp/oqp/molecule/oqpdata.py |
| Input parsing and validation | pyoqp/oqp/utils/input_parser.py, pyoqp/oqp/utils/input_checker.py |
| Python workflow orchestration | pyoqp/oqp/library/, pyoqp/oqp/openqp.py |
| Native kernels | source/modules/, source/integrals/, source/dftlib/ |
| Native bridge | include/oqp.h, CMake source lists, CFFI loading |
| Cross-language data | source/tagarray_driver.F90, pyoqp/oqp/molecule/oqpdata.py |
| Examples | examples/ in the OpenQP source repository |
| Manual | openqp-docs/docs/ |
| Tests | tests/ |
Adding A User-Facing Keyword¶
- Add the keyword to the schema with a safe default.
- Map it into the native handle if native kernels need it.
- Add input-checker rules for unsupported combinations.
- Add or update a runnable example when the workflow is user-facing.
- Document the keyword in the Keywords chapter.
- Add focused tests for parsing, validation, and dispatch behavior.
Adding A Workflow¶
- Decide whether it is a real workflow or a theory/settings detail.
- Add the Python workflow routing in the library layer.
- Add a high-level helper only when it simplifies a common user path.
- Validate theory compatibility before expensive work starts.
- Store reusable outputs in tagarray records when Python/native layers share the data.
- Add a workflow manual page with both input-file and Python examples.
Validation Commands¶
Useful focused checks:
python3 -m unittest tests.test_openqp_api
python3 -m unittest discover -s tests
python3 -m mkdocs build --strict
Use the narrowest test that covers the change while developing, then broaden coverage when the change touches shared dispatch, native bindings, or public workflow behavior.