-
Notifications
You must be signed in to change notification settings - Fork 42
python: update & fix examples #278
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
Conversation
Failures here are because of the breaking module change from #276. We could release a 0.3.1 with that change, and update here; I don't foresee other breaking changes until we gather more feedback in the next couple of weeks. Long term, I don't have a better plan for breaking changes other than constraining versions until releases are available. We could keep referencing the local SDK for now. The big downside in my mind is that people wanting to run these examples then need to also set up the rust toolchain. Open to thoughts here. edit: I kept the examples referencing the local SDK for now, and updated the PR description. |
|
||
async function newTempFile() { | ||
const prefix = `${tmpdir()}${path.sep}`; | ||
const dir = await mkdtemp(prefix); |
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.
Should we clean this up on exit?
I bumped the minor version of pyo3 because of this build error; will need to look into our versioning constraints at some point. Also bumped pyo3-log a minor version. |
Changelog
None
Docs
None
Description
This updates and, in places, fixes the python examples.
This also updates node in other CI jobs for consistency; v18 will be EOL soon.
Once the API has stabilized, I would like to reference published SDK versions with flexible constraints. This will make them easier to run, since the current setup requires a rust toolchain. Having a CI step in place will make sure examples continue to run correctly as we publish new versions.
The new CI job is intended to catch basic errors in the python examples. Because many of the examples run a live server indefinitely, these run for 5s and then exit. I put the script at the top-level since we have scripts there already, and because I don't want to clutter the examples directory with auxiliary stuff. These also run sequentially as noted, because I don't want to update examples to serve this CI step; I don't think it'll be the bottleneck yet. There's room for improvement down the line.