diff --git a/.gitignore b/.gitignore index 8c78259..c8880ec 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ coverage.xml /.eggs/ .vscode /.venv/ + +# Ignore old venv location +/env/ \ No newline at end of file diff --git a/Agents.md b/Agents.md new file mode 100644 index 0000000..5fa4eb7 --- /dev/null +++ b/Agents.md @@ -0,0 +1,67 @@ + +# HL7 library for Python + +## Project Overview + +This is a standalone library for parsing HL7 v2.x messages, supporting the maintained versions of Python. + +## Tech Stack + +- **Testing**: Python unittest +- **Package Manager**: uv + + +## Project Structure + +``` +hl7/ +tests/ +docs/ +``` + +## Development Guidelines + +### Key Principles + +## Environment Setup + +### Installation Steps + +```bash +# Run uv sync +make init +``` + +## Security Considerations + +- Avoid introducing security issues. + +## Testing Strategy + +We aim for a high level of test coverage, primarily through unit tests. + +- Occasionally we will use unittest.mock for things that may be otherwise hard to. When patching, prefer to use `autospec=True` +- Whenever you fix a bug, try to add a test case that documents the broken behavior is no longer happening. +- Additionally, we run our sphinx documentation through doctest, not to increase coverage, but to ensure the documentation accurately matches. + +To run the test suite (will run tox for all supported Python versions as well as the doctests): + +```bash +make tests +``` + +## Programmatic Checks for OpenAI Codex + +To run ruff linting: + +```bash +make lint +``` + +## Reference Resources + +- [HL7 Definitions](https://hl7-definition.caristix.com/v2/) + +## Changelog + + diff --git a/Makefile b/Makefile index fb977c8..875de92 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,8 @@ clean: clean-docs rm -rf *.egg-info .mypy_cache coverage.xml .venv find . -name "*.pyc" -type f -delete find . -type d -empty -delete + # Legacy venv (remove eventually) + rm -rf env .PHONY: clean-python