Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Report Generation from CKAN Contents #1

Closed
3 tasks done
p-a-s-c-a-l opened this issue Mar 26, 2020 · 14 comments
Closed
3 tasks done

Automatic Report Generation from CKAN Contents #1

p-a-s-c-a-l opened this issue Mar 26, 2020 · 14 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@p-a-s-c-a-l
Copy link
Member

p-a-s-c-a-l commented Mar 26, 2020

Export datasets from CKAN on the command line with ckanapi and use carbone.io to generate documents out of Data Package JSON.

Example: Dump Resource Summer days (SD) as Data Package:

ckanapi dump datasets "summer-days-sd" -r https://ckan.myclimateservice.eu/ \
--datapackages=./dump_directory/

See also clarity-h2020/ckan#16

Related Tasks:

@p-a-s-c-a-l
Copy link
Member Author

Hello “{d.firstname} {d.lastname}”!

grafik

@p-a-s-c-a-l
Copy link
Member Author

Hello {d.firstname} {d.lastname} !

grafik

p-a-s-c-a-l added a commit that referenced this issue Mar 26, 2020
@p-a-s-c-a-l
Copy link
Member Author

Hm, #1 (comment) probably caused by bookmark xml tags. 🙄

grafik

grafik

@p-a-s-c-a-l
Copy link
Member Author

p-a-s-c-a-l commented Mar 26, 2020

{d.firstname}

<w:r w:rsidRPr="002E7781">
	<w:rPr>
		<w:rFonts w:asciiTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi"/>
		<w:sz w:val="22"/>
	</w:rPr>
	<w:t>d.firstname</w:t>
</w:r>

-> carbone

grafik

:hurtrealbad:

p-a-s-c-a-l added a commit that referenced this issue Mar 26, 2020
@p-a-s-c-a-l

This comment has been minimized.

@p-a-s-c-a-l

This comment has been minimized.

@p-a-s-c-a-l
Copy link
Member Author

p-a-s-c-a-l commented Mar 26, 2020

Array Manipulation does not work:

{d.tags:arrayMap("; ",|,name)}

CLARITY";"Climate Indicators";"EURO-CORDEX";"WP3";"open-data";"output-data

@p-a-s-c-a-l
Copy link
Member Author

{d.tags:arrayMap(; ,|,name)}

CLARITY;Climate Indicators;EURO-CORDEX;WP3;open-data;output-data

It seems that no quotes nor commas are supported in (ODT) templates. 😞

@p-a-s-c-a-l
Copy link
Member Author

p-a-s-c-a-l commented Mar 26, 2020

"tags": [{
            "display_name": "CLARITY",
            "id": "fdb805ad-2f49-4cf5-b498-01a7d7afdd14",
            "name": "CLARITY",
            "state": "active",
            "vocabulary_id": null
        }, { ...

None of these works:

{d.tags:arrayMap(“, “ ,| ,display_name)}
{d.tags:arrayMap(`, ` ,| ,display_name)}
{d.tags:arrayMap(", " ,| ,display_name)}

“CLARITY““Climate Indicators““EURO-CORDEX““WP3““open-data““output-data
`CLARITYClimate IndicatorsEURO-CORDEX``WP3``open-data``output-data
"CLARITY""Climate Indicators""EURO-CORDEX""WP3""open-data""output-data

@p-a-s-c-a-l
Copy link
Member Author

As workaround use {d.tags:arrayMap(;,|,display_name)}:

CLARITY;Climate Indicators;EURO-CORDEX;WP3;open-data;output-data

@p-a-s-c-a-l
Copy link
Member Author

It seems that there are more general problems with quotes and spaces: carboneio/carbone#59 (comment)

    • {d.test:ifEmpty(“some other sentence”)}
    • {d.test:ifEmpty(very strange)}
    • {d.test:ifEmpty(very, strange )}
    • {d.test:ifEmpty( very, strange )}
    • {d.test:ifEmpty(very; strange)}
    • {d.test:ifEmpty(\n  1    2   3)}
    • {d.test:ifEmpty(;       123 4)}
    • {d.test:ifEmpty(;   \n    123 4 X)}

grafik

p-a-s-c-a-l added a commit that referenced this issue Apr 3, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 3, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 3, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 6, 2020
@p-a-s-c-a-l
Copy link
Member Author

ENV VAR substitution does not work:

CLARTIY H2020 Data Management Plan v${GITHUB_REF} generated by ${GITHUB_ACTOR} from CLARITY CKAN Build #${GITHUB_RUN_NUMBER} triggered by ${GITHUB_SHA}

That's the the typical variables mess in YAML: ${{ github.ref }} vs ${GITHUB_REF} : github-context vs env-context. WTF?

Now, how to get the output on an ENV var?

  • ${{ ENV_VAR }}
  • ${ENV_VAR}
  • $ENV_VAR
  • ${{ env.VAR }}
  • ???

@p-a-s-c-a-l
Copy link
Member Author

According to using environment variables we can use e.g. $GITHUB_REF . But in reality this leads to:

Your workflow file was invalid: The workflow is not valid. .github/workflows/release.yml (Line: 71, Col: 15): Unrecognized named-value: 'GITHUB_REF'. Located at position 1 within expression: GITHUB_REF

p-a-s-c-a-l added a commit that referenced this issue Apr 29, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 29, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 29, 2020
@p-a-s-c-a-l
Copy link
Member Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant