Closed brockfanning closed 1 year ago
Patch coverage: 100.00
% and project coverage change: +0.94
:tada:
Comparison is base (
c78e8bd
) 73.76% compared to head (810d461
) 74.70%.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@brockfanning since we don't use yml for our metadata/indicator config is there a way we are able to test this?
@otis-bath You could try removing the translations
section from your config_data.yml file, and then adding this:
inputs:
- class: InputCsvData
path_pattern: data/*.csv
- class: InputYamlMeta
path_pattern: indicator-config/*.yml
git: false
- class: InputYamlMdMeta
path_pattern: meta/*.md
git: true
git_data_dir: data
translations:
- class: TranslationInputSdgTranslations
source: https://github.com/open-sdg/sdg-translations.git
tag: 2.1.0
- class: TranslationInputYaml
source: translations
Then you could create two new files: indicator-config/1-1-1.yml
and translations/en/foo.yml
. The contents of both could the same snippet as above:
foo: 'hello 'open' sdg'
@brockfanning - thank you for this and am now receiving the error message
expected <block end>, but found '<scalar>'
Is this what it should be, I am not receiving the comprehensive error message shown in the files changed, you can see this message here https://github.com/ONSdigital/sdg-data/actions/runs/4345293662/jobs/7589796280
@otis-bath It's there, but you have to scroll up a bit. There are a few annoying warnings in there (warn(f"Print area cannot be set to Defined name: {defn.value}.")
) that I would like to get rid of. Let me see if I can get rid of those.
@otis-bath Could you trigger it again? I've made a slight tweak to hopefully avoid those warnings.
@brockfanning refreshed - you can see the readout here https://github.com/ONSdigital/sdg-data/actions/runs/4345850379/jobs/7591124715
@otis-bath Thanks - I believe I've got it now so that the error message should show up at the very bottom. Could you trigger it again?
Fixes https://github.com/open-sdg/open-sdg/issues/1766
Testing instructions:
This PR includes the following changes:
I bolded part of the second item above because it is kind of a "breaking change" in that it may prevent builds from completing where previously the completed. However it could be argued that this breaking change is OK, because previously it was failing silently to import the translation files, which probably is causing confusion. So now it will fail, but will remove confusion.
Here is an example of the syntax problem this PR should now catch:
To test this, you can try adding the line above in any/all of: