Skip to content

Commit

Permalink
feat: add a set of files for the tool repository.
Browse files Browse the repository at this point in the history
Move the project-list sample into old-example dir.
  • Loading branch information
DE MERINGO Olivier committed May 22, 2024
1 parent 11b6e36 commit 8d3fe1a
Show file tree
Hide file tree
Showing 12 changed files with 208 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ on:

jobs:

# Validate

# Validate the example project-list
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Validate data
uses: frictionlessdata/repository@v2
with:
resources: examples/csv/light-list.resource.yaml
resources: old-examples/project-list/project-list.resources.yaml
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,23 @@ It defines a data model that can be used to build an inventory of the tools.
## Repository content

- doc/ : documentation
- doc/adr/: architecture decision records if any
- ictst/: csv data, models and widgets configuration to permit edition of the csv data
- ictst/data: the main CSV file + configuration file for data validation in (Command line or through github actions)
- ictst/model: the data model used to configure the widget
- ictst/widget: the widget code and additional fields / vues configuration
- .github/workflows : automatic data validation workflow and other publishing workflow
- old-examples/ : all examples that were initialy part of this repository but are now abandoned
- architecture decision records: [doc/adr/](doc/adr/)
- ictst
- ictst/data
- Main data file (CSV): [ictst/data/tools.csv](ictst/data/tools.csv)
- Data validation model: [ictst/data/tools.resources.yaml](ictst/data/tools.resources.yaml): Used in command line or via github actions.
- ictst/model
- data model used to configure the widget: [ictst/model/tools.frictionless-table-schema.json](ictst/model/tools.frictionless-table-schema.json)
- ictst/widget:
- widget html: [ictst/widget/tools-widget.html](ictst/widget/tools-widget.html)
- additional fields configuration for the widget [ictst/widget/tools.fields-custom-properties.json](ictst/widget/tools.fields-custom-properties.json)
- .github/workflows : github action to automate the data validation
- old-examples/: other examples of using Datami

## Implementation

### Architecture decisions records / ADRs

- [ADR list](doc/adr/flowChart.md)
- [All ADRs](doc/adr/)

### General design
Expand Down
111 changes: 111 additions & 0 deletions ictst/data/tools.csv

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions ictst/data/tools.resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: tools
type: table
path: tools.csv
scheme: file
format: csv
mediatype : text/csv
encoding: utf-8
schema:
fields:
# The tool name
- name: tool_name
type: string
# The name of the organization that produces the tools
- name: organization
type: string
# TODO: Add other fields
14 changes: 14 additions & 0 deletions ictst/model/tools.frictionless-table-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"fields": [
{
"name": "tool_name",
"title": "the name of the tool",
"type": "string"
},
{
"name": "organization",
"title": "the organization behind the tool",
"type": "string"
}
]
}
35 changes: 35 additions & 0 deletions ictst/widget/tools-widget.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@


<!DOCTYPE html>
<html>
<body>


<h1>The content of the tool repository</h1>
<!-- DATAMI - contribute with GIT ...but without minding it -->
<!-- An open source widget coded with 🤍 by the tech cooperative multi : https://multi.coop -->

<!-- DATAMI WIDGET'S HTML BLOCK -->
<datami-file
title="Tools"
gitfile="https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/data/tools.csv"
options='{
"schema": {
"file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/model/tools.frictionless-table-schema.json"
},
"fields-custom-properties": {
"file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/widget/tools.fields-custom-properties.json"
}
}'
usertoken='<A_GITHUB_PAT>'
locale="en"
>
</datami-file>

<!-- DATAMI WIDGET'S APP.JS SCRIPT -->
<script src="https://datami-widget.multi.coop/js/app.js" type="text/javascript" defer></script>


</body>
</html>
14 changes: 14 additions & 0 deletions ictst/widget/tools.fields-custom-properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"fields": [
{
"name": "name",
"sticky": true,
"primaryKey": true,
"maxLength": 50
},
{
"name": "organization"
}
]
}

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ <h1>A CSV file with some constraints and checks on data</h1>
<!-- DATAMI WIDGET'S HTML BLOCK -->
<datami-file
title="Tools"
gitfile="https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/data/project-list.csv"
gitfile="https://github.com/Boavizta/ict-sustainability-tools/blob/main/old-examples/project-list/data/project-list.csv"
options='{
"schema": {
"file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/model/project-list.frictionless-table-schema.json"
"file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/old-examples/project-list/model/project-list.frictionless-table-schema.json"
},
"fields-custom-properties": {
"file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/ictst/widget/project-list.fields-custom-properties.json"
"file": "https://github.com/Boavizta/ict-sustainability-tools/blob/main/old-examples/project-list/widget/project-list.fields-custom-properties.json"
}
}'
usertoken='<A_GITHUB_PAT>'
Expand Down

0 comments on commit 8d3fe1a

Please sign in to comment.