Open iaindillingham opened 3 years ago
~What makes an action an action? Current thinking is here: https://github.com/opensafely-core/action-packager/issues/1#issuecomment-874200067. ⚠️ Don't pick up this issue until current thinking has settled down.~
~This is what makes an action an action: opensafely-core/actions-registry#7~
To be a reusable action,
matching
must:main
branchpython-docker
,r-docker
, orstata-docker
opensafely-actions
organizationactions-registry
)For more information, see https://docs.opensafely.org/actions-reusable/.
*For Python reusable actions, the package isn't installed into the virtualenv, meaning that it should either use relative imports or have an entrypoint module rather than an entrypoint script. For example, replace this entrypoint script:
With this entrypoint module:
Entrypoint script/module
Essentially, the entrypoint will pass arguments to
osmatching.match
through project.yaml. However, we could rename several arguments to improve understanding. We could also decouple thematching
reusable action's API from the current implementation ofosmatching.match
by, for example, not mentioning that the files containing the cases and the potential controls should be CSVs; this would allow us to more easily accept other file types in the future.An entry in project.yaml that calls the
matching
reusable action would look something like this:For a discussion of how the
matching
reusable action can be used in a case-control study, see: https://github.com/opensafely-core/cohort-extractor/issues/585#issuecomment-941103805.