opengeospatial / bblocks-postprocess

0 stars 0 forks source link

Consider targetted process in IDE #11

Closed rob-metalinkage closed 9 months ago

rob-metalinkage commented 10 months ago

When a number of moving parts are present it would be good to run sanity checks by running the postprocess on a particular component. This could assume that any dependencies have been built - and fail if not found.

Provide documentation or examples how to invoke from an IDE (e.g. pyCharm) on a current file (i.e. look for building block in current directory path)

avillar commented 9 months ago

I did something for this in the past, but funnily enough, I disabled it when we started having a lot of dependencies. The problem is that some of the files (such as register.json) are generated after postprocessing and updating the source files. I think I could try and disable some of the heaviest stuff (annotation & validation), though.

I'm working on a way of invoking it from PyCharm.

avillar commented 9 months ago

I've added a --filter argument to the postprocessing scripts that can take either a bblock identifier, or a file name; if a file name is given, it will try to find the bblock that it belongs to (it looks inside _sources, build-local/tests and build-local/annotated).

Re:PyCharm, now that this is in place, you can go to File -> Settings -> Tools -> External tools and add a new "Process BBlocks" entry with this configuration:

imagen

From them on, you'll have an entry inside the Tools -> External tools menu that you can click on, and it will process the BBlock for the currently open file.

You can also add a new "Process all BBlocks" entry, just by removing --filter $FilePathRelativeToProjectRoot$ from the arguments and adding --clean true.