Skip to content

Add doctest and tests for clearcode coordinate helpers #861

@drawliin

Description

@drawliin

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:/... URLs
  • urn:... 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.py
  • clearcode/tests/test_sync.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions