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

test: Added CI for pyodide #1801

Merged
merged 18 commits into from
Jun 11, 2024
Merged

test: Added CI for pyodide #1801

merged 18 commits into from
Jun 11, 2024

Conversation

andeplane
Copy link
Contributor

@andeplane andeplane commented Jun 10, 2024

Description

Closes https://github.com/cognitedata/cog-ai/issues/2336

The Python SDK is heavily used in our Jupyter notebook and Streamlit environment which is Pyodide based. To ensure compatibility, I have added a CI step that verifies that the SDK can be installed and imported in Pyodide.

The test is implemented as a nodejs script triggered by GitHub workflows, one for Jupyter and one for Streamlit.

Checklist:

  • Tests added/updated.
  • Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
    If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
  • Changelog updated in CHANGELOG.md.
  • Version bumped. If triggering a new release is desired, bump the version number in _version.py and pyproject.toml per semantic versioning.

@andeplane andeplane requested review from a team as code owners June 10, 2024 08:48
@andeplane andeplane requested review from mattmurph9 and removed request for a team June 10, 2024 08:48
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.91%. Comparing base (774e0d9) to head (51cd268).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1801      +/-   ##
==========================================
+ Coverage   92.90%   92.91%   +0.01%     
==========================================
  Files         121      121              
  Lines       17700    17700              
==========================================
+ Hits        16444    16446       +2     
+ Misses       1256     1254       -2     

see 2 files with indirect coverage changes

@haakonvt
Copy link
Contributor

What are the differences now between test jupyter and test streamlit?

@andeplane
Copy link
Contributor Author

What are the differences now between test jupyter and test streamlit?

Now it's only a minor version difference on Pyodide. But we will add the different set of packages they use in addition.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed? It just sets up python and poetry (+ deps) (with some additional caching)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need that for building the SDK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also see that I don't run poetry install, not sure why this works :D

Copy link
Contributor

@haakonvt haakonvt Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need that for building the SDK?

Oh, right, yeah for sure needed with poetry at least

Copy link
Contributor

@haakonvt haakonvt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@haakonvt haakonvt force-pushed the anders/pyodide-ci branch from 3c1e92d to 51cd268 Compare June 11, 2024 13:57
@andeplane andeplane merged commit bacc3b5 into master Jun 11, 2024
14 checks passed
@andeplane andeplane deleted the anders/pyodide-ci branch June 11, 2024 15:24
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