From e316f6c7d3c46df8865cfaccef571cb7bf0b6631 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Wed, 5 Jun 2024 17:05:30 +0200 Subject: [PATCH] #16 added markdown snippets about license --- checks/checktags.py | 5 ++- preflight_report.md | 76 ++++++++++++++++++++++++++++++++++++--------- 2 files changed, 66 insertions(+), 15 deletions(-) diff --git a/checks/checktags.py b/checks/checktags.py index 7a7ad99..6f067c3 100644 --- a/checks/checktags.py +++ b/checks/checktags.py @@ -60,7 +60,10 @@ def checktags(contents, preview_url): if "copyright" in missing_tags: result_as_md +=f">[!CAUTION]\n> **copyright** tag is missing. Make sure to fill this template document [license_to_publish_JDH.dotx](https://github.com/C2DH/journal-of-digital-history-ipynb-preflight-action/blob/master/license_to_publish_JDH.dotx) and send it to jdh.admin@uni.lu\n" - + result_as_md+=f"\n\n**Add ONE of the following codeblocks depending on which licence you want to use:**\n\n" + result_as_md+="### CC-BY license:\n\n```\n[![cc-by](https://licensebuttons.net/l/by/4.0/88x31.png)](https://creativecommons.org/licenses/by/4.0/)\n©. Published by De Gruyter in cooperation with the University of Luxembourg Centre for Contemporary and Digital History. This is an Open Access article distributed under the terms of the [Creative Commons Attribution License CC-BY](https://creativecommons.org/licenses/by/4.0/)\n```\n\n" + result_as_md+="### CC-BY-NC-ND license:\n\n```\n[![cc-by-nc-nd](https://licensebuttons.net/l/by-nc-nd/4.0/88x31.png)](https://creativecommons.org/licenses/by-nc-nd/4.0/)\n©. Published by De Gruyter in cooperation with the University of Luxembourg Centre for Contemporary and Digital History. This is an Open Access article distributed under the terms of the [Creative Commons Attribution License CC-BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/4.0/)\n```\n\n" + if invalid_tags: result_as_md += "\n#### Invalid Tags:\n" for tag in invalid_tags: diff --git a/preflight_report.md b/preflight_report.md index 31f8a96..da9352f 100644 --- a/preflight_report.md +++ b/preflight_report.md @@ -1,25 +1,73 @@ -# Report for example/plotly.ipynb ❤ +# Report for example/article-R.ipynb ❤ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ## Cell Counts -**all cells: 2** -code_empty: 1 -code: 2 +**all cells: 116** +code_empty: 2 +markdown: 94 +code: 22 ## Action Outputs ### Size -**total cells: 2** +**total cells: 116** -### Check JavaScript -**WARNING: 1 output cells contain JavaScript code.** +### Check Tags +- Cell 1: Tags: ['title'] +- Cell 2: Tags: ['contributor'] +- Cell 3: Tags: ['contributor'] +- Cell 4: Tags: ['copyright'] +- Cell 5: Tags: ['keywords'] +- Cell 6: Tags: ['cover'] +- Cell 8: Tags: ['keywords'] +- Cell 9: Tags: ['abstract'] +- Cell 24: Tags: ['figure-1'] +- Cell 31: Tags: ['hermeneutics'] +- Cell 32: Tags: ['hermeneutics'] +- Cell 33: Tags: ['hermeneutics'] +- Cell 34: Tags: ['hermeneutics'] +- Cell 35: Tags: ['hermeneutics'] +- Cell 36: Tags: ['hermeneutics'] +- Cell 37: Tags: ['hermeneutics'] +- Cell 38: Tags: ['hermeneutics', 'figure-2'] +- Cell 39: Tags: ['hermeneutics'] +- Cell 40: Tags: ['hermeneutics'] +- Cell 41: Tags: ['hermeneutics'] +- Cell 42: Tags: ['hermeneutics'] +- Cell 43: Tags: ['hermeneutics'] +- Cell 44: Tags: ['hermeneutics'] +- Cell 45: Tags: ['hermeneutics'] +- Cell 46: Tags: ['hermeneutics'] +- Cell 47: Tags: ['hermeneutics'] +- Cell 48: Tags: ['hermeneutics'] +- Cell 49: Tags: ['hermeneutics'] +- Cell 50: Tags: ['hermeneutics'] +- Cell 51: Tags: ['hermeneutics'] +- Cell 52: Tags: ['hermeneutics', 'figure-3'] +- Cell 53: Tags: ['hermeneutics', 'figure-4'] +- Cell 54: Tags: ['hermeneutics'] +- Cell 55: Tags: ['hermeneutics'] +- Cell 56: Tags: ['hermeneutics'] +- Cell 57: Tags: ['hermeneutics'] +- Cell 58: Tags: ['hermeneutics'] +- Cell 59: Tags: ['hermeneutics', 'table-1', 'data-table'] + - Invalid tag: data-table +- Cell 60: Tags: ['hermeneutics'] +- Cell 61: Tags: ['hermeneutics'] +- Cell 62: Tags: ['hermeneutics'] +- Cell 63: Tags: ['hermeneutics'] +- Cell 64: Tags: ['hermeneutics', 'table-2', 'data-table'] + - Invalid tag: data-table +- Cell 65: Tags: ['hermeneutics', 'figure-4'] +- Cell 68: Tags: ['figure-5'] +- Cell 112: Tags: ['hidden'] +- Cell 113: Tags: ['hidden'] +> [!WARNING] +> The following tags are missing or invalid -- Cell 1 -### Check JavaScript (plotly) -**require.undef("plotly")** is present - -**\* plotly.js** is present -> [!CAUTION] -> **plotly** is NOT present in **requirements.txt**, but it is used in the article +#### Invalid Tags: +- data-table +- data-table +> Make sure to fill this template document [license_to_publish_JDH.dotx](https://github.com/C2DH/journal-of-digital-history-ipynb-preflight-action/blob/master/license_to_publish_JDH.dotx) and send it to jdh.admin@uni.lu