@@ -5,6 +5,66 @@ Thanks for your interest in contributing to "fhir-tx-encoder".
55You can find out a bit more about the project by reading the [ README] ( README.md )
66file within this repository.
77
8+ ## Repository layout
9+
10+ The repository houses two implementations of the same encoder:
11+
12+ | Directory | Package | Language |
13+ | --------- | ------- | -------- |
14+ | [ ` python/ ` ] ( python ) | ` fhir-tx-encoder ` (PyPI) | Python |
15+ | [ ` r/ ` ] ( r ) | ` fhirtxencoder ` (GitHub) | R |
16+
17+ The community documents (this file, ` README.md ` , ` LICENSE ` ,
18+ ` CODE_OF_CONDUCT.md ` ) live at the root and cover both.
19+
20+ ### Why ` python/LICENSE ` is a symlink
21+
22+ ` python/LICENSE ` is a symbolic link to the repository's root ` LICENSE ` . It is
23+ not a stray duplicate, and it should not be replaced with a copy or deleted.
24+
25+ ` python/setup.py ` uses setuptools' default licence-file discovery, which only
26+ looks inside the package directory. Before the Python package moved from the
27+ repository root into ` python/ ` , ` LICENSE ` sat next to ` setup.py ` and setuptools
28+ packaged it as ` fhir_tx_encoder-<version>.dist-info/licenses/LICENSE ` . The
29+ symlink keeps that true after the move, so the published wheel and sdist remain
30+ byte-identical to earlier releases. Removing it would silently drop the licence
31+ from the distributed artefact.
32+
33+ Verify with:
34+
35+ ``` bash
36+ cd python
37+ uv venv --python 3.11 && uv pip install build && uv run python -m build
38+ unzip -p dist/* .whl ' fhir_tx_encoder-*.dist-info/RECORD' | grep LICENSE
39+ ```
40+
41+ ## Running the checks
42+
43+ Python:
44+
45+ ``` bash
46+ cd python
47+ uv venv --python 3.11
48+ uv run python -m build
49+ ```
50+
51+ Python 3.11 is pinned here because ` setup.py ` requires ` scipy~=1.11.3 ` , which
52+ publishes no wheels for later Python versions.
53+
54+ R (see [ ` r/README.md ` ] ( r/README.md ) for detail):
55+
56+ ``` bash
57+ Rscript -e ' devtools::test("r")'
58+ R CMD build r && R CMD check --as-cran fhirtxencoder_1.0.0.tar.gz
59+ Rscript -e ' print(covr::package_coverage("r"))'
60+ ```
61+
62+ The R unit suite answers every terminology server request from canned fixtures,
63+ so it needs no network. ` r/tests/testthat/test-integration.R ` is the exception:
64+ it runs the README example against the live CSIRO public Ontoserver, and is
65+ skipped when ` NOT_CRAN ` is unset, when the machine is offline, or when ` CI ` is
66+ set.
67+
868## Reporting issues
969
1070Issues can be used to:
@@ -23,8 +83,14 @@ Your branch should be named `issue/[GitHub issue #]`.
2383
2484### Coding conventions
2585
26- This repository uses [ Black] ( https://github.com/psf/black ) , please use it to
27- reformat your code before pushing.
86+ Python code in ` python/ ` uses [ Black] ( https://github.com/psf/black ) , please use
87+ it to reformat your code before pushing.
88+
89+ R code in ` r/ ` follows the [ tidyverse style guide] ( https://style.tidyverse.org/ )
90+ with an 80 character line limit. Every exported and internal function carries a
91+ roxygen2 block; regenerate ` NAMESPACE ` and ` man/ ` with
92+ ` Rscript -e 'roxygen2::roxygenise("r")' ` after changing documentation. New
93+ behaviour needs a test - the R package is held at full line coverage.
2894
2995## Code of conduct
3096
0 commit comments