opensafely / opensafely/documentation

Use `import codelists` in our code samples

Open
#1,931 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
48
Forks
10
Avg merge
2d 19h
Merged PRs (30d)
17

Description

Motivating conversation: https://bennettoxford.slack.com/archives/C01D7H9LYKB/p1737480286600389

Using import codelists in our docs shows researchers a nice, code-completion-friendly way to use codelists without having to either do from codelists import xyz for multiple xyz or to add an __all__ line.

This task will be complete when all instances of from codelists import... are amended to import codelists with the corresponding changes elsewhere in the sample code. The tricky bit will be ensuring that the new import syntax is used elsewhere in the relevant sample code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the documentation repository for every from codelists import occurrence and read each surrounding sample to identify dependent references. Replace the imports with import codelists, update the corresponding sample code, and verify that no instances of the old import form remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.