Skip to content

WIP: NXCALS-6470 Generate type hint stubs for NXCALS API

Merge request template

COMPATIBILITY NOTE

Please make sure that this change is BACKWARDS COMPATIBLE and a new server will work correctly with clients using old APIs versions.

It may be that data sent in the new format will break the old clients.

In case of any potential incompatibility we have to inform our clients and schedule release & deployment with them.


@acc-logging-team - please have a look for approval.

This MR is essentially the translation of the shell script generate_stubs.sh into a build.gradle script. Things to review (amongst others):

  • build.gradle script - structure, code style, ...
  • possibility of using the installer for the acc-py distribution downloaded with http (no need for NFS access)
  • Where to get all the Jars that are needed to generate stubs? Currently I do copyLibs in nxcals-extraction-api
  • where to put the resulting sdist wheel file (is ./dist/ OK)?
  • whether to silence the tasks (if possible) or keep sometimes verbose output in the logs

TODO:

  • add some kind of tests, possibly with MyPy?

Closes NXCALS-6470

Edited by Vito Baggiolini

Merge request reports