-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use AntlrAssetSelectionParser in AssetSelection.from_string #25916
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5dd331f
to
49766f5
Compare
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 5dd331f. |
0615b89
to
e857b20
Compare
python_modules/dagster/dagster/_core/definitions/asset_selection.py
Outdated
Show resolved
Hide resolved
Can you add more tests to the test file. I did a quick look at them and I only saw 1 test case for the dagster/python_modules/dagster/dagster_tests/asset_defs_tests/test_asset_selection.py Line 791 in aa141ea
|
054f3ad
to
cd6f320
Compare
assert AssetSelection.from_string("+my_asset+") == AssetSelection.assets("my_asset").downstream( | ||
depth=1, include_self=True | ||
) | AssetSelection.assets("my_asset").upstream(depth=1, include_self=True) | ||
assert AssetSelection.from_string("*my_asset*") == AssetSelection.assets("my_asset").downstream( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also test `"my_asset some_other_asset*"
197977a
to
fe35c76
Compare
cd6f320
to
18239ce
Compare
18239ce
to
41737dc
Compare
Summary & Motivation
We want to use the new
AntlrAssetSelectionParser
in our backend to parse the new asset selection syntax into anAssetSelection
. This should go in a try/catch inside theAssetSelection.from_string
method for backwards compatibility.How I Tested These Changes
Existing tests should pass