-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[components] Components setup integration test #27375
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
0b7d96e
to
9b7bbd9
Compare
9b7bbd9
to
60ead8d
Compare
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.
This is cool.
Is the only way to refresh the generate snippets is to run the tests?
Right now yes, main reason being that tox gives us a nice self-contained Python environment, but no reason you couldn't invoke the Python fn directly outside of a pytest context as long as your env was set up prooperly. |
a855a0c
to
417fe1a
Compare
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.
It would be very helpful to have a makefile somewhere that has an entry like regenerate_snippets
even if it just invokes the test. Pretty unintuitive as is and you have to just magically know. Makefile is a good way to document this tribal knowledge
417fe1a
to
0838785
Compare
Agreed, added a couple |
69ea005
to
abb9f78
Compare
fb2c492
to
9c38ec4
Compare
1b390a5
to
090ec80
Compare
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-c9cm9j2l8-elementl.vercel.app Direct link to changed pages: |
Summary
Builds a little docs integration testing framework which allows us to define a series of steps that either:
Each step corresponds to a docs snippet file. By default, (
tox -e docs_snapshot_test
, run as part of BK CI) these tests ensure that output of each of these steps is identical to the snippet file. The tests will fail if the docs guide breaks or the output of any of the commands changes.The test suite can also be run in a snippet update mode (
tox -e docs_snapshot_update
), which will update each of the snippets to match the actual output of each step, which we can use whenever we update the docs steps or the code it's using.Also has some utilities for masking or removing parts of files/output we don't care about, or which might vary (e.g. timestamps, filepaths etc)
See https://github.com/dagster-io/dagster/pull/27375/files#diff-22c4df2c53a911cdff63776be42c290bca0a8f3d2c6134c27f48a40b0aba4692 for the example
Test Plan
New test suite.