Skip to content
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

edit snippet to make more runnable #2066

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

kning
Copy link
Contributor

@kning kning commented Nov 14, 2024

Description

Tried running the example as is and ran into a few issues:

  • dlt[parquet] missing dependency
  • missing secret (removed since it's not used in this example)
  • removed serialized flag (this is kind of an advanced feature and not really needed here)
  • added minimal reflection level, otherwise if you run this script twice in a row you get a "column constraint not supported" kind of error

Another thing I noticed is that the way the snippets are used in the example excludes information that prevents the code from being truly runnable e.g. import modal statement
image

At a high level, if this is my first time coming to this page, I'd expect to be able to copy / paste the code as is here and run it right away and given how the snippets are set up, that's not the case and I'm not sure how to make it so. Open to ideas!

Related Issues

  • Fixes #...
  • Closes #...
  • Resolves #...

Additional Context

Tried running the example as is and ran into a few issues:
* dlt[parquet] missing dependency
* missing secret (removed since it's not used in this example)
* removed serialized flag (this is kind of an advanced feature and not really needed here)
* added minimal reflection level, otherwise if you run this script twice in a row you get a "column constraint not supported" kind of error
Copy link

netlify bot commented Nov 14, 2024

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit ae5d0d7
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/673cddc4064b860008531be6
😎 Deploy Preview https://deploy-preview-2066--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AstrakhantsevaAA
Copy link
Contributor

AstrakhantsevaAA commented Nov 19, 2024

@kning absolutely fair comments!

removed serialized flag (this is kind of an advanced feature and not really needed here)

I had to add it to run tests in the snippet, otherwise modal doesn't allow to set @app.function not in the global namespace.

import modal statement

You can modify snippet code in there and move import modal under the tag # @@@DLT_SNIPPET_START modal_image

@kning
Copy link
Contributor Author

kning commented Nov 19, 2024

added changes, is there a good way to see the preview? also what exactly happens in ci, does it run this code at all?

@AstrakhantsevaAA
Copy link
Contributor

what exactly happens in ci

@kning also trying figure this out, let's create a separate branch and merge your changes there and run CI/CD

@AstrakhantsevaAA AstrakhantsevaAA changed the base branch from devel to temp/modal_changes November 20, 2024 12:49
@AstrakhantsevaAA AstrakhantsevaAA merged commit 1e96dc2 into dlt-hub:temp/modal_changes Nov 20, 2024
49 checks passed
@AstrakhantsevaAA
Copy link
Contributor

AstrakhantsevaAA commented Nov 20, 2024

@kning #2079

preview you can see by this link: https://deploy-preview-2066--dlt-hub-docs.netlify.app/
but you should switch to devel version
Screenshot 2024-11-20 at 13 51 56

AstrakhantsevaAA added a commit that referenced this pull request Nov 20, 2024
* edit snippet to make more runnable

Tried running the example as is and ran into a few issues:
* dlt[parquet] missing dependency
* missing secret (removed since it's not used in this example)
* removed serialized flag (this is kind of an advanced feature and not really needed here)
* added minimal reflection level, otherwise if you run this script twice in a row you get a "column constraint not supported" kind of error

* move imports into snippet

Co-authored-by: Kenny Ning <[email protected]>
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.

2 participants