Skip to content

Commit

Permalink
Move contributing guidelines, migrate to Python and fiboa schema
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Apr 10, 2024
1 parent f5876eb commit 107b119
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 104 deletions.
11 changes: 0 additions & 11 deletions .github/.remarkrc

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: actions/setup-python@v5
with:
python-version: '>=3.9'
- uses: actions/checkout@v4
- run: |
npm install
npm run init
npm test
- name: Install pipenv
run: |
pip install pipenv
pipenv install
- run: pipenv run test-docs
- run: pipenv run test-schema
- run: pipenv run test-geojson
- run: pipenv run test-geoparquet
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ Thumbs.db
/.idea/
/.vscode/

# Node / npm
.npm
/node_modules/
package-lock.json
# Python
Pipfile.lock
23 changes: 23 additions & 0 deletions CONRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing

All contributions are subject to the
[fiboa Code of Conduct](https://github.com/fiboa/specification/blob/main/CODE_OF_CONDUCT.md).
For contributions, please follow the
[fiboa contributing guideline](https://github.com/fiboa/specification/blob/main/CONTRIBUTING.md).

## Running tests

You'll need to install Python >= 3.9 and pip to setup the test environment.
We use pipenv to execute the tests.

Start with the following command in the folder where this README is located:
`pip install pipenv --user`

Finally, you can run the tests as follows:

- To check the markdown run: `pipenv run test-docs`
- To check the fiboa schema run: `pipenv run test-schema`
- To check the examples run:
- `pipenv run test-geojson` for GeoJSON
- `pipenv run test-geoparquet` for GeoParquet
- To create a GeoParquet from the GeoJSON examples: `pipenv run create-geoparquet`
15 changes: 15 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
fiboa-cli = ">=0.3"
pymarkdownlnt = ">=0.9"

[scripts]
test-docs = "pymarkdown -d md024 -d md013 scan ."
test-schema = "fiboa validate-schema schema/schema.yaml"
test-geojson = "fiboa validate examples/geojson -c examples/geojson/collection.json -e https://fiboa.github.io/extension-template/v0.1.0/schema.yaml,schema/schema.yaml"
test-geoparquet = "fiboa validate examples/geoparquet -e https://fiboa.github.io/extension-template/v0.1.0/schema.yaml,schema/schema.yaml"
create-geoparquet = "fiboa create-geoparquet examples/geojson -o examples/geoparquet/example.parquet -c examples/geojson/collection.json -e https://fiboa.github.io/extension-template/v0.1.0/schema.yaml,schema/schema.yaml"
21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,4 @@ The fields in the table below can be used in these parts of fiboa documents:

## Contributing

All contributions are subject to the
[fiboa Code of Conduct](https://github.com/fiboa/specification/blob/main/CODE_OF_CONDUCT.md).
For contributions, please follow the
[fiboa contributing guideline](https://github.com/fiboa/specification/blob/main/CONTRIBUTING.md).

### Running tests

You'll need to install [nodejs and npm](https://nodejs.org/en/download/) to run the tests.
Alternatively, you can also use [yarn](https://yarnpkg.com/) instead of npm.
In this case replace all occurrences of `npm` with `yarn` below.
Additionally, you need Python >= 3.9 installed.

Afterwards, navigate to the root of the specification repository.
Now, install the required test software: `npm install` and `npm run init`

Finally, you can run all tests or subset of them:

- To run all tests: `npm test`
- To check the markdown run: `npm run check-docs`
- To check the examples run: `npm run check-examples`
See the [contributing guideline](CONTRIBUTING.md) for more details.
39 changes: 1 addition & 38 deletions examples/geojson/collection.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
{
"fiboa_version": "0.1.0",
"fiboa_version": "0.2.0",
"fiboa_extensions": [
"https://fiboa.github.io/extension-template/v0.1.0/schema.yaml"
],
"stac_version": "1.0.0",
"type": "Collection",
"id": "fiboa",
"description": "An example fiboa dataset",
"license": "CC-0",
"extent": {
"spatial": {
"bbox": [
[
-180,
-90,
180,
90
]
]
},
"temporal": {
"interval": [
[
"2019-01-01T00:00:00Z",
"2020-01-01T00:00:00Z"
]
]
}
},
"links": [
{
"rel": "item",
"href": "example.json",
"type": "application/geo+json"
},
{
"rel": "item",
"href": "example.parquet",
"type": "application/vnd.apache.parquet"
}
]
}
Binary file modified examples/geoparquet/example.parquet
Binary file not shown.
24 changes: 0 additions & 24 deletions package.json

This file was deleted.

3 changes: 3 additions & 0 deletions schema/schema.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
$schema: https://fiboa.github.io/schema/v0.1.0/schema.json
required:
- template:field1
properties:
template:field1:
type: uint8
Expand Down

0 comments on commit 107b119

Please sign in to comment.