microsoft / yardl

Tooling for streaming instrument data
https://microsoft.github.io/yardl/
MIT License
29 stars 5 forks source link

Python support #63

Closed johnstairs closed 10 months ago

johnstairs commented 10 months ago

This introduces Python codegen for the binary and NDJSON formats. HDF5 is not yet supported.

The implementation is currently pure Python, and the binary serialization performance is therefore often quite a bit slower than the C++ implementation.

Documentation is not included in this PR. That will be coming next.

To add Python to an existing model, add the following lines to the _package.yml file:

python:
  outputDir: path/to/generated/directory
hansenms commented 10 months ago

In general, I suggest we use the upload artifact action to make a version of the tool available from each PR (https://github.com/marketplace/actions/upload-a-build-artifact)

hansenms commented 10 months ago

Should we have license and copyright statements on all generated files?

hansenms commented 10 months ago

We will need CodeQL coverage for Python, I think.

johnstairs commented 10 months ago

Should we have license and copyright statements on all generated files?

We follow the same model as with C++. Generated files have # This file was generated by the "yardl" tool. DO NOT EDIT. and the other files have the copyright. Not sure that generated code should be copyrighted.

github-advanced-security[bot] commented 10 months ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

johnstairs commented 10 months ago

In general, I suggest we use the upload artifact action to make a version of the tool available from each PR (https://github.com/marketplace/actions/upload-a-build-artifact)

We are actually already doing this, e.g.: https://github.com/microsoft/yardl/actions/runs/5970335728?pr=63#artifacts. It's a zip file of the entire "dist" directory. A little messy, but I think it gets the job done.