Skip to content

Commit

Permalink
nodeList.json -> tomeshnet-node-list.json (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
makew0rld authored Sep 10, 2020
1 parent 6f8a229 commit 6971d92
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

This repository contains the list of nodes that are part of the Toronto Community Network.
Each node is recorded with geolocation and technical information as according to [schema.json][schema-json].
The list of nodes is organized as a JSON file at [nodeList.json](nodeList.json).
The list of nodes is organized as a JSON file at [tomeshnet-node-list.json](tomeshnet-node-list.json).

## Other Formats

[Travis CI](.travis.yml) converts the [nodeList.json](nodeList.json) file into several formats.
[Travis CI](.travis.yml) converts the [tomeshnet-node-list.json](tomeshnet-node-list.json)) file into several formats.

Currently:
- Keyhole Markup Language ([KML](https://developers.google.com/kml/))
Expand All @@ -23,13 +23,13 @@ These files are always available on the [Releases page](https://github.com/tomes

If you want to link to the latest version of these files, use these special URLs.

- https://raw.githubusercontent.com/tomeshnet/node-list/master/nodeList.json
- https://raw.githubusercontent.com/tomeshnet/node-list/master/tomeshnet-node-list.json
- https://raw.githubusercontent.com/tomeshnet/node-list/assets/tomeshnet-node-list-kml.kml
- https://raw.githubusercontent.com/tomeshnet/node-list/assets/tomeshnet-node-list-geojson.json

## Images

The [images](images) folder contains images referenced in [nodeList.json](nodeList.json).
The [images](images) folder contains images referenced in [tomeshnet-node-list.json](tomeshnet-node-list.json).
The images are named according to their associated node, with the following naming convention.

| Name | Description | Example |
Expand All @@ -40,7 +40,7 @@ The images are named according to their associated node, with the following nami

## Validation

In this repository, [Travis CI](.travis.yml) is configured to validate [nodeList.json](nodeList.json) against [schema.json][schema-json] using [Ruby JSON Schema Validator](https://github.com/ruby-json-schema/json-schema).
In this repository, [Travis CI](.travis.yml) is configured to validate [tomeshnet-node-list.json](tomeshnet-node-list.json)) against [schema.json][schema-json] using [Ruby JSON Schema Validator](https://github.com/ruby-json-schema/json-schema).
The validation tool currently supports up to [JSON Schema Draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04), so schema files must conform to the Draft 4 standard.

You can use [JSON Schema Lint](https://jsonschemalint.com) to validate manually.
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/geojson/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
sys.exit(1)
COMMIT = proc.stdout.strip()

with open("../../../nodeList.json", "r") as f:
with open("../../../tomeshnet-node-list.json", "r") as f:
nodes = json.load(f)["nodeList"]

# GeoJSON is stored in a FeatureCollection.
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/kml/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_desc(node):
return "<![CDATA[" + desc + "]]>"


with open("../../../nodeList.json", "r") as f:
with open("../../../tomeshnet-node-list.json", "r") as f:
nodes = json.load(f)["nodeList"]

kml = simplekml.Kml(name="Toronto Community Network")
Expand Down
6 changes: 3 additions & 3 deletions spec/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

schema_version = ENV['SCHEMA_VERSION']

describe 'nodeList.json' do
describe 'tomeshnet-node-list.json' do
it "conforms to v#{schema_version}/schema.json" do
schema_file = File.expand_path("../schema/v#{schema_version}/schema.json", File.dirname(__FILE__))
nodelist_file = File.expand_path('../nodeList.json', File.dirname(__FILE__))
nodelist_file = File.expand_path('../tomeshnet-node-list.json', File.dirname(__FILE__))
JSON::Validator.validate!(schema_file, nodelist_file)
end
end
end
File renamed without changes.

0 comments on commit 6971d92

Please sign in to comment.