Skip to content

Add datasource datapoint lookup by path - #717

Open
sirajhoshan wants to merge 1 commit into
DagsHub:mainfrom
sirajhoshan:feature/get-datapoint-by-path
Open

sirajhoshan wants to merge 1 commit into
DagsHub:mainfrom
sirajhoshan:feature/get-datapoint-by-path

Conversation

@sirajhoshan

Copy link
Copy Markdown

Summary

  • add Datasource.get_datapoint(path) for direct datapoint lookup
  • reuse the existing path filtering mechanism
  • fetch at most one matching datapoint
  • preserve KeyError when the requested path does not exist
  • add tests for both found and missing paths

Tests

  • PYTHONPATH="$PWD" python -m pytest tests/data_engine/test_datasource.py -q
  • PYTHONPATH="$PWD" python -m pytest tests/data_engine/test_querying.py tests/data_engine/test_queryresult.py tests/data_engine/test_datapoint.py -q
  • python -m black --check dagshub/data_engine/model/datasource.py tests/data_engine/test_datasource.py
  • git diff --check

Fixes #365

Loading
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.

Data Engine: Get datapoint via its path

2 participants