Skip to content

feat: accept version facet#123

Open
svenrdz wants to merge 1 commit intomainfrom
dev-add-facet-version
Open

feat: accept version facet#123
svenrdz wants to merge 1 commit intomainfrom
dev-add-facet-version

Conversation

@svenrdz
Copy link
Copy Markdown
Collaborator

@svenrdz svenrdz commented Dec 8, 2025

Closes #121

Add version the list of valid facets


TODO

  • handle version facet in Query._from_detailed_dict

@svenrdz svenrdz marked this pull request as ready for review December 8, 2025 16:59
@svenrdz
Copy link
Copy Markdown
Collaborator Author

svenrdz commented Dec 9, 2025

This change breaks esgpull search --detail N:

Traceback (most recent call last):
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/tui.py", line 180, in logging
    yield
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/cli/search.py", line 177, in search
    queries = esg.context.search_as_queries(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/context.py", line 749, in search_as_queries
    return self._sync(coro)
           ^^^^^^^^^^^^^^^^
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/context.py", line 609, in _sync
    return sync(self._with_client(coro))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/utils.py", line 17, in sync
    result = asyncio.run(coro)
             ^^^^^^^^^^^^^^^^^
  File "/home/srodriguez/.local/share/uv/python/cpython-3.12.7-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/srodriguez/.local/share/uv/python/cpython-3.12.7-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/srodriguez/.local/share/uv/python/cpython-3.12.7-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/context.py", line 598, in _with_client
    return await coro
           ^^^^^^^^^^
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/context.py", line 585, in _search_as_queries
    queries_result.process()
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/context.py", line 250, in process
    query = Query._from_detailed_dict(doc)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/models/query.py", line 437, in _from_detailed_dict
    result.selection[name] = values
    ~~~~~~~~~~~~~~~~^^^^^^
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/models/selection.py", line 119, in __setitem__
    setattr(self, name, value)
  File "/home/srodriguez/ws/test-pip-git/.venv/lib/python3.12/site-packages/esgpull/models/selection.py", line 58, in setter
    iter_values = enumerate(values)
                  ^^^^^^^^^^^^^^^^^
TypeError: 'int' object is not iterable

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.

search on CMIP5 with version facet throws exceptions

1 participant