Skip to content

Conversation

@csbrown-noaa
Copy link

@csbrown-noaa csbrown-noaa commented Dec 1, 2025

Closes #30.

Used doctests to test the Examples:

    >>> import doctest
    >>> from fathomnet.scripts.fathomnet_generate import generate_fathomnet_dataset_from_coco_object_detection
    >>> doctest.run_docstring_examples(generate_fathomnet_dataset_from_coco_object_detection, globals())

I didn't see any existing tests for the .scripts module in the test directory, so I didn't create anything there. However, the Example would be a good one.

Had several failing tests, but these tests fail on a fresh clone as well.

    ============================================================================== short test summary info ==============================================================================
    FAILED test/test_boundingboxes.py::TestBoundingBoxesAPI::test_audit_by_verifier - ValueError: Client error (404), please check your usage (docs: https://fathomnet-py.rtfd.io/) or open an issue at https://github.com/fathomnet/fathomnet-py/issues/new with the ...
    FAILED test/test_boundingboxes.py::TestBoundingBoxesAPI::test_find_by_verifier_uuid - ValueError: Client error (404), please check your usage (docs: https://fathomnet-py.rtfd.io/) or open an issue at https://github.com/fathomnet/fathomnet-py/issues/new with the ...
    FAILED test/test_images.py::TestImagesAPI::test_find - ValueError: Server error (504), please contact the FathomNet administrators with the details below.
    FAILED test/test_imagesetuploads.py::TestImageSetUploadsAPI::test_find_rejection_reasons - AssertionError: 0 not greater than 0
    FAILED test/test_taxa.py::TestTaxaAPI::test_index - ValueError: Client error (404), please check your usage (docs: https://fathomnet-py.rtfd.io/) or open an issue at https://github.com/fathomnet/fathomnet-py/issues/new with the ...
    FAILED test/test_users.py::TestUsersAPI::test_find_by_display_name - TypeError: fathomnet.dto.FathomnetIdentity() argument after ** must be a mapping, not str
    ================================================================ 6 failed, 73 passed, 40 skipped in 73.71s (0:01:13) ================================================================

The FAILED test_find method succeeds sometimes and sometimes not, but it doesn't seem to be affected by my changes.

Also, the call to ObjectDetectionDataset.from_json is pretty brittle, as it requires almost all fields that are in the COCO spec. While the spec doesn't explicitly declare certain fields as optional, one may reasonably find examples where, say, a flickr_url is missing (which COCO-format data providers may find preferable to including a "garbage" flickr_url when one isn't avaialable.). However, this is something that maybe had ought to be brought up in the coco-lib repo.

@kevinsbarnard kevinsbarnard self-assigned this Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tools to translate COCO-style datasets into Fathomnet format

3 participants