Add doctest and tests for clearcode coordinate helpers
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- testing-qa
Research direction
Read clearcode/cdutils.py, especially str2coord() and its TODO, then inspect clearcode/tests/test_sync.py. Add doctest examples for cd URLs, URNs, and plain paths; add URL/URN parsing coverage and coord2str namespace handling tests, and confirm the test suite passes.
Written by the indexing model from the issue text.
Description
While reading clearcode/cdutils.py, I noticed that str2coord() still has a TODO for adding a doctest.
This helper parses ClearlyDefined coordinates from multiple input formats such as:
cd:/...URLsurn:...strings- plain coordinate paths
Proposed changes:
- add doctest examples to
str2coord() - add tests covering URL and URN parsing in the existing
clearcode/tests/test_sync.py - add a small test for
coord2str()to verify namespace handling
Files involved:
clearcode/cdutils.pyclearcode/tests/test_sync.py
- Dominant language
- HTML
- Stars
- 70
- Forks
- 76
- Avg merge
- 23m
- Merged PRs (30d)
- 2
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
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.
More from aboutcode-org/purldb
-
purlcli failsMay be free again @Anurag-S1ngh claimed this 18 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aboutcode-org/purldb#891 · 2 comments ·
-
Incorrect set comparison between package names and PURLs in NPM sync logicPossibly taken @MuhammadBilal64 claimed this 45 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
aboutcode-org/purldb#890 · 1 comment ·
-
PypiVersionAPI.get_latest_date() crashes when a release entry is missing upload_time_iso_8601Possibly taken @drawliin claimed this 228 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aboutcode-org/purldb#863 ·
-
Preserve version ordering in packagedb VersionResponsePossibly taken @drawliin claimed this 237 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
aboutcode-org/purldb#857 ·
-
NameError: 'e' referenced outside except block in visit_uri() when visit_error is setPossibly taken @mohityadav8 claimed this 243 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aboutcode-org/purldb#851 ·
All issues in aboutcode-org/purldb
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
bug drawings help wanted ui
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
userFRM/egui-charts#3479 ·
Maintainers usually reply within 1 day
-
needs-umair step-4
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Umairishuman/BuildScan3D#24 ·
-
vLLM metrics adapter tests start the adapter twice and race on its request countersPossibly taken @bhargavchintam claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
llm-d/llm-d-inference-sim#933 ·
Maintainers usually reply within 2 days
-
bug follow-up
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day