softwarepub / hermes

Implementation of the HERMES workflow
https://docs.software-metadata.pub
Other
21 stars 6 forks source link

merge request `Review hermes post-processing results` #205

Open daniel-mohr opened 1 year ago

daniel-mohr commented 1 year ago

Following the gitlab workflow described in Set up automatic software publishing leads to the merge request Review hermes post-processing results.

As mentioned in #202 and handled in hermes-hmc/ci-templates#7 a full virtual python environment is in the source branch hermes/post-... of the mentioned merge request. Therefore such a merge request cannot be handled! The important change in hermes.toml is hided in the 1662 new files. ;-)

Further I'm not sure if the change in hermes.toml is correct:

< from = [ "git", "cff" ]
---
> from = [ "git", "cff",]
7a8,10
> [postprocess]
> execute = [ "config_record_id",]
> 
11,13c14
< 
< [postprocess]
< execute = [ "config_record_id" ]
---
> record_id = ...

And I did not expect that the uploaded zip archive is in the repo to merge.

led02 commented 1 year ago

Well, config_record_id triggers the Post-Processor that adds the record_id key. In theorie, if this is successful we could in fact remove the according post-processor from the config.

However, I'm a bit hesitant here because:

Regarding the format issues (i.e., trailing commas), this is due to the TOML library we use. We read in, modify, and write out again. If you know a better TOML library that does not introduce these additinal gutter, let us know.

daniel-mohr commented 1 year ago

In my opinion the config_record_id and record_id are mutually exclusive. If the record_id is ones found and set, it is not necessary anymore to configure it. But I understand your point.

Regarding the format I can suggest TOML Kit: TOML Kit - Style-preserving TOML library for Python

But if you only add one key to a section, this could also be done without any library. But have to be implemented of cause. In this way it could be possible to use in future the python standard library tomllib -- available in python 3.11 and I expected newer versions -- which can only read toml.