Skip to content

Commit

Permalink
Update validator to dcat-ap-cz version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
skodapetr committed Aug 16, 2024
1 parent 9a10ee9 commit d47a174
Show file tree
Hide file tree
Showing 119 changed files with 9,127 additions and 7,986 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,20 @@ on:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.4.0
node-version: 20.16.0
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Build
Expand Down
25 changes: 2 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
#
# All starting with dot.
.*

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Directories.
node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@ Tento repozitář obsahuje validátor lokálních katalogů otevřených dat na
Pro správnou funkci LKOD je třeba, aby jeho přístupový bod LKOD implementoval [techniku CORS](https://opendata.gov.cz/špatná-praxe:chybějící-cors).

Validátor běží plně ve vašem prohlížeči.
[Přejít na validátor](https://datagov-cz.github.io/lkod-validator/)
[Přejít na validátor](https://datagov-cz.github.io/lkod-validator/).
Alternativně je možné validátor [spustit lokálně mimo prohlížeč](#lokalni-instalace-a-spustrni).

Na validátor se dá odkázat i s URL přístupového bodu v parametru `catalog`, např. [`https://datagov-cz.github.io/lkod-validator/#catalog=https://data.dia.gov.cz/sparql`](https://datagov-cz.github.io/lkod-validator/?catalog=https://data.dia.gov.cz/sparql), což přímo spustí validaci.

## Lokální instalace a spuštění
Narozdíl od běhu v prohlížeči lokální běh nemá problém přečístá katalogy, které nemají správně nastavenou techniku CORS.
Výsledek validate lokálního běhu a běhu v prohlížeči se tak může lišit!

## Požadavky
Pro instalaci je třeba mít k dispozici:
- [Node.js](https://nodejs.org/en) verze 20 nebo novější

## Instalace
Nejprve je třeba provést stažení tohoto repositáře a instalaci závislostí.
```bash
git clone https://github.com/datagov-cz/lkod-validator.git
cd lkod-validator
npm ci
```
Následně je možné validaci pustit pomocí následujícího příkazu.
```bash
npm run --silent validate https://raw.githubusercontent.com/jakubklimek/lkod-test/main/katalog.jsonld
```
Program následně vypíše výsledek validace ve formátu JSON na standartní výstup.

3 changes: 0 additions & 3 deletions client/README.md

This file was deleted.

13 changes: 7 additions & 6 deletions client/application/application.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { useMemo } from "react";
import { initReactI18next } from "react-i18next";
import i18n, { InitOptions } from "i18next";
import Backend from "i18next-http-backend";
import LanguageDetector from "i18next-browser-languagedetector";

import Container from "@mui/material/Container";
import CssBaseline from "@mui/material/CssBaseline";
import useMediaQuery from "@mui/material/useMediaQuery";
import { createTheme, ThemeProvider } from "@mui/material/styles";
import i18n, { InitOptions } from "i18next";
import { initReactI18next } from "react-i18next";
import Backend from "i18next-http-backend";
import LanguageDetector from "i18next-browser-languagedetector";

import { HomeView } from "../home-view";
import { LocalCatalogValidatorView } from "../local-catalog-validator/local-catalog-validator-view";

// https://react.i18next.com/latest/using-with-hooks
i18n
Expand Down Expand Up @@ -45,7 +46,7 @@ export function Application() {
<ThemeProvider theme={theme}>
<CssBaseline />
<Container fixed>
<HomeView />
<LocalCatalogValidatorView />
</Container>
</ThemeProvider>
);
Expand Down
1 change: 1 addition & 0 deletions client/application/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from "react";
/**
* Monitor method rendering and updates.
* Use as a hook in a method you want to monitor.
* Use only for debugging!
*/
const useRerender = () => {
const owner = (React as any)
Expand Down
10 changes: 0 additions & 10 deletions client/application/router.tsx

This file was deleted.

101 changes: 0 additions & 101 deletions client/home-view/home-view.tsx

This file was deleted.

1 change: 0 additions & 1 deletion client/home-view/index.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions client/home-view/input-area-controller.ts

This file was deleted.

42 changes: 0 additions & 42 deletions client/home-view/input-area.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions client/home-view/language-selector.tsx

This file was deleted.

Loading

0 comments on commit d47a174

Please sign in to comment.