Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep improving CI #292

Merged
merged 3 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: MegaLinter
run: ./scripts/lint
run: ./scripts/lint -c
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 5 additions & 4 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# Configuration file for MegaLinter
# See all available variables at https://megalinter.io/configuration/ and in linters documentation

APPLY_FIXES: none
DISABLE:
- SPELL
- REPOSITORY
- JSON
- MARKDOWN
- JAVASCRIPT
- CSS
- HTML
- COPYPASTE
DISABLE_LINTERS:
- YAML_V8R
- SPELL_LYCHEE
- MARKDOWN_MARKDOWNLINT
- MARKDOWN_MARKDOWN_TABLE_FORMATTER
PRINT_ALL_FILES: false
DOCKERFILE_HADOLINT_ARGUMENTS: "--ignore DL3008 --ignore DL4006 --ignore DL3009 --ignore DL3059"
BASH_SHFMT_ARGUMENTS: "-i 4"
SHOW_ELAPSED_TIME: true
FLAVOR_SUGGESTIONS: false
FLAVOR_SUGGESTIONS: true
EMAIL_REPORTER: false
FILEIO_REPORTER: false
1 change: 1 addition & 0 deletions _dataset_categories/budget-finance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Budget / Finance
logo: "/img/categories/budget-finance.svg"
# spell-checker: disable
logo_credit: Renan Ferreira Santos from the Noun Project
featured: true
---
1 change: 1 addition & 0 deletions _dataset_categories/education.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Education
logo: "/img/categories/education.svg"
# spell-checker: disable
logo_credit: Sergey Patutin from the Noun Project
featured: true
---
1 change: 1 addition & 0 deletions _dataset_categories/parks-recreation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Parks / Recreation
logo: "/img/categories/parks-recreation.svg"
# spell-checker: disable
logo_credit: Pipe Rosas Licht from the Noun Project
featured: true
---
1 change: 1 addition & 0 deletions _dataset_categories/public-safety.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Public Safety
logo: "/img/categories/public-safety.svg"
# spell-checker: disable
logo_credit: Rohith M S from the Noun Project
featured: true
---
1 change: 1 addition & 0 deletions _dataset_categories/transportation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Transportation
logo: "/img/categories/transportation.svg"
# spell-checker: disable
logo_credit: Dmitry Baranovskiy from the Noun Project
featured: true
---
1 change: 1 addition & 0 deletions _dataset_categories/uncategorized.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Uncategorized
logo: "/img/categories/uncategorized.svg"
# spell-checker: disable
logo_credit: Edward Boatman from the Noun Project
featured: true
---
24 changes: 24 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// cSpell Settings
{
// Version of the setting file. Always 0.2
"version": "0.2",
// language - current active spelling language
"language": "en",
"allowCompoundWords": true,
// words - list of words to be always considered correct
"words": [
"jkan",
"esac",
"jsonify",
"markdownify",
"Wisniewski",
"Licence",
"Uncategorized",
"decap",
"Phila",
"ublabs",
"customised",
"customise",
"shfmt"
]
}
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ JKAN is a [Jekyll](http://jekyllrb.com/) site that uses JavaScript for enhanced
| `_data/licenses.yml` | A list of licenses that datasets can be associated with |
| `_datasets` | A directory of `.md` files containing dataset information in YAML front-matter |
| `_dataset_categories` | A directory of `.md` files containing dataset categories in YAML front-matter |
| `_includes` | HTML partials that are included in layouts. `display` is used by [schema files](/docs/configuration.md) |
| `_includes` | HTML partials that are included in layouts. |
| `_layouts` | Page templates |
| `_organizations` | A directory of `.md` files containing organization information in YAML front-matter |
| `editor` | Configuration for the Editor UI, described below |
Expand Down
8 changes: 4 additions & 4 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Upgrading
See [release notes](/releases) for details of what's changed between versions.
See [release notes](https://github.com/timwis/jkan/releases) for details of what's changed between versions.

## For every upgrade
If your JKAN repository is a fork, you should see a banner at the top of the repository saying, e.g. "This branch is 20 commits ahead, 32 commits behind timwis:gh-pages". Clicking on the "X commits behind" link should take you to a page where you can initiate a pull request, which should show you the changes that will be applied to your repository. It should take you to:
Expand All @@ -12,11 +12,11 @@ If there are no conflicting changes in your fork, you'll be able to merge the pu

## v1.x to v2.0
- If you use the editing UI
- You'll need to switch to the new editing UI, powered by Decap CMS. You don't need to host your JKAN site on Netlify to do so. Follow the [installation](installation) instructions to setup the OAuth integration.
- You'll need to switch to the new editing UI, powered by Decap CMS. You don't need to host your JKAN site on Netlify to do so. Follow the [installation](installation.md) instructions to setup the OAuth integration.
- If you have custom categories
- You'll need to convert `_data/categories.yml` into a collection (a directory of files) in the `_dataset_categories` directory. See the [sample categories](/_dataset_categories) for the format. You should delete `_data/categories.yml` afterwards.
- You'll need to convert `_data/categories.yml` into a collection (a directory of files) in the `_dataset_categories` directory. See the [sample categories](../_dataset_categories/) for the format. You should delete `_data/categories.yml` afterwards.
- If you have custom licenses
- We've also changed the structure of `_data/licenses.yml`. If you've customised that file at all, you'll need to update the structure to match the [new format](/_data/licenses.yml) as well.
- We've also changed the structure of `_data/licenses.yml`. If you've customised that file at all, you'll need to update the structure to match the [new format](../_data/licenses.yml) as well.
- If you have customised templates
- Replace any references to `site.data.categories` with `site.dataset_categories`
- Replace any references to `site.data.licenses` with `site.data.licenses.items`
Expand Down
28 changes: 27 additions & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
docker run --rm -v $PWD:/tmp/lint oxsecurity/megalinter-cupcake
#!/bin/bash

USAGE="./lint [-f | --fix] [-c | --changes-only]"

APPLY_FIXES=none
VALIDATE_ALL_CODEBASE=true

while [[ $# -gt 0 ]]; do
case "$1" in
-f | --fix)
APPLY_FIXES=all
;;
-c | --changes-only)
VALIDATE_ALL_CODEBASE=false
;;
*)
echo "Unknown option: $1"
echo "$USAGE"
exit 1
;;
esac
shift
done

docker run --rm \
-e APPLY_FIXES=$APPLY_FIXES \
-e VALIDATE_ALL_CODEBASE=$VALIDATE_ALL_CODEBASE \
-v "$PWD":/tmp/lint oxsecurity/megalinter-python