Skip to content

This repository aims at providing to the global IT Sustainability community a vendor-neutral, fact-based, non-judgmental and exhaustive repository of the tools and services available to assess the environmental footprint of IT components.

Notifications You must be signed in to change notification settings

Boavizta/ict-sustainability-tools

Repository files navigation

🗺️ Mapping of the ICT Sustainability Tools Landscape

This repository aims at providing to the global IT Sustainability community a vendor-neutral, fact-based, non-judgmental and exhaustive repository of the tools and services available to assess the environmental footprint of IT components.

It defines a data model that can be used to build an inventory of the tools.

Caution

Today, any data contained in this repository is not validated nor reviewed. It is likely that the data contains completely false assumptions. It is here as sample data for the sole purpose of development and testing of the model. It should NOT be used for anything else.

Warning

The data model is still very drafty and is expected to evolve.

Access the data

Visualize or edit the data set at https://boavizta.github.io/ict-sustainability-tools/

Repository content

How to configure the widget

How to configure the widget

Implementation

Architecture decisions records / ADRs

General design

We use a Datami widget to display data and allow edition of a file stored in Github. Even if end user is not familiar with Git.

  1. data is stored in GIT to benefit from historisation, review and approval workflows (and potential automatic validation of format)
  2. data update can be proposed by end users in 2 ways:
    1. A web frontend that allow to view the data and propose edition => This is the preferred solution using Datami widget
    2. Pull requests directly against the data file (git) => Less preferred (mainly for maintainers of people familiar with Git)

Usage flow

usage flow

Components

Components of datami widget

Warning

The data validation and the data edition (widget) are configured using different set of files or data models. These data model use different syntax but have to be kept in sync manually !

Data format

  • We store data as a csv file.
  • add specific descriptors as table-format to describe and validate constraints on the fields.
  • implement frictionless-ci or other automatic validation regarding format as a github action frictionless-ci | Frictionless Repository

Note

Our preferred format would have been to have a structured (json) file, described by a json schema. However json edition is not well supported by Datami yet. (JSON data is displayed as json tree which is not very user friendly for non technical users). So for the time being we fall back to using a less structured CSV dataset.

draft dataset

See draft dataset

Example Datami widgets


Local development

To ease development and configuration of the widget, we can work with a local data set and local configuration files.

  1. Run a local server to expose the data and configuration files locally (see below).
  2. Modify index.html to use the local files (configure the localdev properties to true).

1. Install the mini server for local development

A mini server is written in the server.py to serve this folder's files.

To install the mini-server :

pip install --upgrade pip
python3 -m pip install --user virtualenv
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

or

sh setup.sh
source venv/bin/activate

Run local server

To run the server on http://localhost:8800:

python server.py

or

sh run_server.sh

Files will be locally served on :

  • http://localhost:8800/content/<path:folder_path>/<string:filename>
  • http://localhost:8800/statics/<path:folder_path>/<string:filename>

2. Configure the widget to use the local files

Modify index.html to use the local files (configure the localdev properties to true)

{
        "title": "Tools Landscape",
        "activate": true,
        "localdev": true,
        "gitfilelocal": "http://localhost:8800/statics/ictst/data/tools.csv",
        "gitfile": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/data/tools.csv",

[....]

 "schema": {
            "localdev": true,
            "filelocal": "http://localhost:8800/statics/ictst/model/tools.frictionless-table-schema.json",
            "file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/model/tools.frictionless-table-schema.json"
          },
          "fields-custom-properties": {
            "localdev": true,
            "filelocal": "http://localhost:8800/statics/ictst/widget/tools.fields-custom-properties.json",
            "file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/widget/tools.fields-custom-properties.json"
          },

💡 You can now open the local index.html in a web browser and update data or configurations. Reload the page and changes are immediately visible.

About

This repository aims at providing to the global IT Sustainability community a vendor-neutral, fact-based, non-judgmental and exhaustive repository of the tools and services available to assess the environmental footprint of IT components.

Resources

Stars

Watchers

Forks

Packages

No packages published