opensafely-core / opensafely-core/opencodelists
Spike: Create simple coding system for testing purposes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
Why are we doing this?
Currently, almost all tests rely on SNOMED fixtures (from opencodelists/tests/fixtures.py), even those that only require a generic coding system. This obfuscates the requirements and purpose of those tests. The SNOMED fixtures reproduce a small subsection of the real SNOMED hierarchy from a particular version, using real concepts with medical vocabulary terms and full codes, which can be difficult to follow.
The current setup has not caused significant issues in practice.
How will we know when it's done?
We have considered and prototyped approaches to the above issues, and raised one or more issues for future work.
What are we doing?
We could define a simple, invented coding system and related fixtures specifically for testing. This approach would exercise the site's generic functionality without relying on real coding-system-specific fixtures. Tests requiring generic coding system functionality could use this testing-only version, while tests needing specific functionality would use the appropriate fixtures. As new tests are added or existing ones are maintained, they could be gradually updated to use the testing-only coding system where appropriate, making dependencies more explicit and tests easier to understand.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing opencodelists/tests/fixtures.py and the tests that currently rely on its SNOMED fixtures. Compare possible approaches for an invented testing-only coding system, prototype the promising options, and document the conclusions with follow-up issues for future implementation work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100