From f821863224018a612abde1d0ad6571284eef8968 Mon Sep 17 00:00:00 2001 From: olivier de Meringo Date: Sat, 26 Oct 2024 13:44:42 +0200 Subject: [PATCH 1/5] feat(validation): validate sample project data to test the workflow. --- .github/workflows/validate-project-list-example.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validate-project-list-example.yml b/.github/workflows/validate-project-list-example.yml index baa259a..5de73a3 100644 --- a/.github/workflows/validate-project-list-example.yml +++ b/.github/workflows/validate-project-list-example.yml @@ -3,15 +3,15 @@ name: frictionless on: push: branches: - - main - pull_request: - branches: - - main + - 47-no-access-to-frictionless-runs-reports + # pull_request: + # branches: + # - main jobs: # Validate the example project-list - validate: + validate-sample-project: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,4 +19,4 @@ jobs: - name: Validate data uses: frictionlessdata/repository@v2 with: - resources: old-examples/project-list/project-list.resources.yaml \ No newline at end of file + resources: old-examples/project-list/data/project-list.resources.yaml \ No newline at end of file From 39fe33afe1ddfefbbda9f2b51063121f1cab8277 Mon Sep 17 00:00:00 2001 From: olivier de Meringo Date: Wed, 13 Nov 2024 22:33:55 +0100 Subject: [PATCH 2/5] feat: validate csv file --- .../validate-project-list-example.yml | 4 +-- README.md | 25 +++++++++++-- ictst/data/tools.resources.yaml | 36 +++++++++++++++++-- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validate-project-list-example.yml b/.github/workflows/validate-project-list-example.yml index 5de73a3..8c33840 100644 --- a/.github/workflows/validate-project-list-example.yml +++ b/.github/workflows/validate-project-list-example.yml @@ -10,7 +10,7 @@ on: jobs: - # Validate the example project-list + # Validate the format of the csv data validate-sample-project: runs-on: ubuntu-latest steps: @@ -19,4 +19,4 @@ jobs: - name: Validate data uses: frictionlessdata/repository@v2 with: - resources: old-examples/project-list/data/project-list.resources.yaml \ No newline at end of file + resources: ictst/data/tools.resources.yaml \ No newline at end of file diff --git a/README.md b/README.md index b316af2..0f98494 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ It defines a data model that can be used to build an inventory of the tools. - [Components](#components) - [Data format](#data-format) - [draft dataset](#draft-dataset) - - [Example Datami widgets](#example-datami-widgets) + - [data validation in CI](#data-validation-in-ci) + - [Other examples of Datami widgets configration](#other-examples-of-datami-widgets-configration) - [Mini server for local development](#mini-server-for-local-development) - [Run local server](#run-local-server) @@ -90,7 +91,27 @@ We use a [Datami](https://datami-docs.multi.coop/?locale=en) widget to display d See [draft dataset](old-examples/ict-sustainability-tools.csv) -### Example Datami widgets +### data validation in CI + +Data _format_ (not content) is automatically validated in CI using frictionless-ci in a github action triggered on PR's. + +See [frictionless-ci | Frictionless Repository](https://repository.frictionlessdata.io/index.html) + +```sh +# Local data validation +# See https://framework.frictionlessdata.io/docs/guides/validating-data.html + +# Install frictionless cli +pip install frictionless +# +cd ictst/data +# validate just csv _global_ structure +frictionless validate tools.csv +# validate that format of fields matches description +frictionless validate tools.resources.yaml +``` + +### Other examples of Datami widgets configration - A CSV file displayed without any customization [old-examples/csv/csv-widget-basic.html](old-examples/csv/csv-widget-basic.html) - A CSV file displayed with some additional constraints on fields [old-examples/csv/csv-widget-with-constraints.html](old-examples/csv/csv-widget-with-constraints.html). diff --git a/ictst/data/tools.resources.yaml b/ictst/data/tools.resources.yaml index 6b892a9..58b0ce6 100644 --- a/ictst/data/tools.resources.yaml +++ b/ictst/data/tools.resources.yaml @@ -13,6 +13,16 @@ schema: # The name of the organization that produces the tools - name: organization type: string + - name: website + type: string + - name: sub_module + type: string + - name: environmental_indicator + type: string + - name: quick_description + type: string + - name: assessment_type + type: string #What is the general scope covered by the tool. Several values are possible but one should be chosen as the primary one for visual classification purpose. - name: main_perimeter type: string @@ -35,5 +45,27 @@ schema: - Software | Web Content - Global | Digital Workspace - To Be Qualified - - # TODO: Add other fields + - name: other_perimeters + - name: assessed_functional_unit + - name: data_entry_points + - name: life_cycle_steps + - name: focus + - name: licence + - name: self_hostable + - name: originating_country + - name: logo + - name: inside_models + - name: methodology_transparency + - name: ref_sources + - name: status + - name: Creator + - name: Creation date + - name: Creator_comment + - name: reviewer_1 + - name: review_1_date + - name: review_1_explanation + - name: reviewer_2 + - name: review_2_date + - name: review_2_explanation + - name: Linked Publications +# Todo detail constraints on the fields. \ No newline at end of file From 4500690ea9b5e86bcfa13033b8eb67b657e90d32 Mon Sep 17 00:00:00 2001 From: olivier de Meringo Date: Wed, 13 Nov 2024 22:52:20 +0100 Subject: [PATCH 3/5] fix: update data to pas validation --- ictst/data/tools.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ictst/data/tools.csv b/ictst/data/tools.csv index 52d1a3a..89674d6 100644 --- a/ictst/data/tools.csv +++ b/ictst/data/tools.csv @@ -12,8 +12,8 @@ Carbon Aware SDK,Green Software Foundation,https://github.com/Green-Software-Fou Carbon Facts,Qarnot,https://qarnot.com/en/low-carbon,,GWP (CO2eq),Carbon Facts are an energy consumption management tool developed by Qarnot to issue detailed reports on the energy expenses and savings of computations on the cloud platform.,Evaluation,,Infra - Datacenter,Machine+Room,,Usage,Calculation+Reporting,Closed Source / Commercial,No,France,,,Undisclosed,,Draft,Gaël Duez,2024-02-12,,,,,,,,0 Carbon Impact,Dynatrace,https://www.dynatrace.com/hub/detail/carbon-impact/,,GWP (CO2eq),,Evaluation,,Infra - Cloud,Machine,,Usage,,Closed Source / Commercial,No,USA,,,,,Sandbox,Gaël Duez,,,,,,,,,0 Carbonalyzer,The Shift Project,https://theshiftproject.org/en/carbonalyser-browser-extension/,,GWP (CO2eq),"Outdated, say it's creators. Don't rely on the results produced.",Evaluation,,Software - Web Content,"Request (HTTP),User,Website",,Manufacturing+Usage,Awareness+Calculation,Open-Source (MIT),Not Applicable,France,IconePlugin%20(1).png(https://db.boavizta.org/dltemp/4q9Mj2RjwLFT-qE1/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/F4hHQx5Ut1HSxI6iVe.png),,Fully Disclosed,,Draft,Benoit Petit,2024-02-14,,,,,,,,0 -Carbonifer,Carbonifer,https://carbonifer.io/,,GWP (CO2eq),,Evaluation,,Infra - Cloud,Machine,,,,,Yes,France,chrome_uDA0oqZNNj.png(https://db.boavizta.org/dltemp/C9osNJZ_ZJy-PG8P/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/Jj-qIW-7IYbc8rLiy8.png),,,,Sandbox,Gaël Duez,,,,,,,,,0 -Climatiq,Climatiq Technologies,https://www.climatiq.io/,,GWP (CO2eq),Climatiq API enables user to assess emissions based on a variety of cloud computing factors.,Evaluation,Infra - Cloud,,Machine+Application+Feature,RAM capacity+CPU capacity+Storage,Usage,Calculation,Closed Source / Commercial,No,Germany,,TBQ,Undisclosed,https://www.climatiq.io/docs/guides/tutorials/cloud,Draft,Gael Duez,2024-05-13,"AFAIK, impossible to get how the metrics are calculated in their doc",,,,,,,0 +Carbonifer,Carbonifer,https://carbonifer.io/,,GWP (CO2eq),,Evaluation,,Infra | Cloud,Machine,,,,,Yes,France,chrome_uDA0oqZNNj.png(https://db.boavizta.org/dltemp/C9osNJZ_ZJy-PG8P/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/Jj-qIW-7IYbc8rLiy8.png),,,,Sandbox,Gaël Duez,,,,,,,,,0 +Climatiq,Climatiq Technologies,https://www.climatiq.io/,,GWP (CO2eq),Climatiq API enables user to assess emissions based on a variety of cloud computing factors.,Evaluation,Infra | Cloud,,Machine+Application+Feature,RAM capacity+CPU capacity+Storage,Usage,Calculation,Closed Source / Commercial,No,Germany,,TBQ,Undisclosed,https://www.climatiq.io/docs/guides/tutorials/cloud,Draft,Gael Duez,2024-05-13,"AFAIK, impossible to get how the metrics are calculated in their doc",,,,,,,0 Cloud Carbon Footprint,Thoughtworks,https://www.cloudcarbonfootprint.org/,,GWP (CO2eq),"Cloud Carbon Footprint is an open source tool that provides visibility and tooling to measure, monitor and reduce your cloud carbon emissions. We use best practice methodologies to convert cloud utilization into estimated energy usage and carbon emissions, producing metrics and carbon savings estimates that can be shared with employees, investors, and other stakeholders.",Evaluation,,Infra - Cloud,Project+Application+Team+Machine,,Extraction+Manufacturing+Usage,Collection+Calculation+Reporting,Open-Source (Apache 2.0),Yes,USA,,,Fully Disclosed,,Draft,Gaël Duez,2023-12-18,,,,,,,,0 Cloud-Scanner,Boavizta test,https://boavizta.github.io/cloud-scanner/,,ADPf (MJ)+ADPe (Sbeq)+Primary Energy (J)+Water Depletion+GWP (CO2eq),,Evaluation,,Infra - Cloud,Machine+Project+Team,,Extraction+Manufacturing+Usage+End of Life,Collection+Calculation+Reporting,Open-Source (AGPLv3),Yes,France,cloudscanner_color.png(https://db.boavizta.org/dltemp/YeO77gm1zayWaRzd/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/caHDXSfRwHE4wVX45D.png),,Fully Disclosed,,Draft,Gaël Duez,2023-12-18,,,,,,,,0 Cloud-assess,Resilio / Kleis Technology,https://www.cloudassess.org/,,Water Depletion+GWP (CO2eq)+ADPf (MJ)+ADPe (Sbeq)+Primary Energy (J)+Final Energy (J/Wh),,Evaluation,,Software - Backend,Machine+Room+Project+Application,,Extraction+Manufacturing+Transport+Usage+End of Life,Reporting+Calculation+Awareness,Open-Source (Apache 2.0),Yes,Switzerland,Cloud-Assess-Main-Logo.webp(https://db.boavizta.org/dltemp/uFntx8ooAMWC1eKR/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/IGhSimH_8WRLAbP7Ac.webp),,Disclosed - Internal / Clients,,Draft,Benoit Petit,2024-02-14,,,,,,,,0 @@ -72,4 +72,4 @@ Tanaguru Engine,Tanaguru,https://www.tanaguru.com/en/open-source-tools-tanaguru/ Verdikt,Verdikt,https://verdikt.io/,,,,,,,,,,,Closed Source / Commercial,,,Logo-Verdikt.svg(https://db.boavizta.org/dltemp/PHa-2p4JninnoFoq/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/pjca9P3IGyXVrxaDG9.svg),,,,Sandbox,Gaël Duez,,,,,,,,,0 WeNR,ISIT,https://wenr.isit-europe.org/,,,"WeNR is a tool for measuring the footprint of organisations’ IT systems. This tool enables any type of organisation to analyse where the environmental impacts are and to measure their level of Sustainable IT maturity, based on the triptych People-Planet-Prosperity. For this purpose, ISIT proposes a tool based on open and public data.",Evaluation,,Global - Information System,,,,,Open-Source - Unkown,No,France,INR-logo-s.jpg(https://db.boavizta.org/dltemp/bkCKvisODu2pAToM/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/TOZLlMiqzYrcPiDn-r.jpg),,,,Sandbox,Gaël Duez,2024-02-02,,,,,,,,0 WebVert Auto-Diagnostic,Webvert,https://www.lewebvert.fr/offre/auto-diag/,,GWP (CO2eq),Evaluation focus on useless bandwidth.,Evaluation,,Software - Web Content,Website,Bandwidth,Usage,Calculation+Eco-design,Closed Source / Commercial,No,France,Webvert%20-%20Logotype%20-%20Couleur.svg(https://db.boavizta.org/dltemp/MXMBx0iYZY1Ki_If/1716391800000/noco/p_nck134abueisqs/md_kvka0tcnh8dyrw/c7dg4sg7uv2ica7/lCZGORBuNU0HuR69yW.svg),OneByte+Lighthouse,Fully Disclosed,https://www.lewebvert.fr/entreprise/faq/ https://www.lewebvert.fr/blog/2023-09-06-etat-de-lart-site-web-contenu-v2/,Draft,Youen Chéné,2024-04-19,Disclaimer - I am the founder of webvert. I created the entry. Don't put me in the evaluation.,,,,,,,0 -OxygenIT,ScaleDynamics,,,,,,Infra - Cloud,,,,,,Business Source (non permissive licence),No,,,,Undisclosed,,Sandbox,null,null,null,null,null,null,,,null,0 +OxygenIT,ScaleDynamics,,,,,,Infra | Cloud,,,,,,Business Source (non permissive licence),No,,,,Undisclosed,,Sandbox,null,null,null,null,null,null,,,null,0 From 9609317cc920c872d4349c352083c92c37d1e64d Mon Sep 17 00:00:00 2001 From: olivier de Meringo Date: Wed, 13 Nov 2024 22:53:09 +0100 Subject: [PATCH 4/5] fix: rename workflow --- ...validate-project-list-example.yml => validate-tools-csv.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{validate-project-list-example.yml => validate-tools-csv.yml} (94%) diff --git a/.github/workflows/validate-project-list-example.yml b/.github/workflows/validate-tools-csv.yml similarity index 94% rename from .github/workflows/validate-project-list-example.yml rename to .github/workflows/validate-tools-csv.yml index 8c33840..c6ce425 100644 --- a/.github/workflows/validate-project-list-example.yml +++ b/.github/workflows/validate-tools-csv.yml @@ -11,7 +11,7 @@ on: jobs: # Validate the format of the csv data - validate-sample-project: + validate-tools-csv: runs-on: ubuntu-latest steps: - name: Checkout repository From 7b1ff8f8da36f78f42906079a81bb107bfcf5423 Mon Sep 17 00:00:00 2001 From: olivier de Meringo Date: Wed, 13 Nov 2024 23:24:15 +0100 Subject: [PATCH 5/5] fix: make workflow run on PR's --- .github/workflows/validate-tools-csv.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate-tools-csv.yml b/.github/workflows/validate-tools-csv.yml index c6ce425..8dc55ef 100644 --- a/.github/workflows/validate-tools-csv.yml +++ b/.github/workflows/validate-tools-csv.yml @@ -1,12 +1,12 @@ name: frictionless on: - push: - branches: - - 47-no-access-to-frictionless-runs-reports - # pull_request: + # push: # branches: - # - main + # - 47-no-access-to-frictionless-runs-reports + pull_request: + branches: + - main jobs: