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

Start a schema based on ATF4 guidance #34

Merged
merged 1 commit into from
Mar 31, 2023
Merged

Start a schema based on ATF4 guidance #34

merged 1 commit into from
Mar 31, 2023

Conversation

dabreegster
Copy link
Collaborator

#31

Note the schema isn't written correctly yet; the editor shows an error Value must validate against exactly one of the provided schemas. It currently validates against 4 of the schemas.. I think it's because the complexity field is used in all of the enum cases, so the schema can't understand which case we're in. Not worried about figuring out the right way to encode this yet; this is all just illustrative anyway.

Also, I only added a few categories from the page. The details in each one are not terribly interesting... instead of making people pick complexity, we should ask more specific questions and auto-calculate complexity from it

"properties": {
"intervention": {
"type": "object",
"oneOf": [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big 👍 on this.


<script>
async function setup() {
let resp = await fetch("./all.json");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cleaned up the HTML editor to do this instead of writing the schema in this file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great. Many thanks.

<head>
<meta charset="utf-8" />
<title>ATF4 Schema option</title>
<!-- You can't open this file locally in a browser due to CORS; use something like 'python3 -m http.server' -->
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this. It's true for the other stuff already checked in

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or 'Live Server' with VS code...

@Robinlovelace
Copy link
Contributor

Will check locally now...

@Robinlovelace
Copy link
Contributor

Looking good.

image

@Robinlovelace
Copy link
Contributor

Seems to only be scheme level options and complexity + n. junctions, right?

@Robinlovelace
Copy link
Contributor

In any case, good iteration and something we can build on.

@dabreegster
Copy link
Collaborator Author

dabreegster commented Mar 31, 2023

Seems to only be scheme level options and complexity + n. junctions, right?

No, the schema describes one single intervention. Each is one of 4 cases, with different details based on the table in the guidance doc. Most of those details are just a complexity field.

<head>
<meta charset="utf-8" />
<title>ATF4 Schema option</title>
<!-- You can't open this file locally in a browser due to CORS; use something like 'python3 -m http.server' -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or 'Live Server' with VS code...

"segregatedCyclingFacility": {
"properties": {
"complexity": {
"enum": ["high", "medium", "low"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I think that complexity should not be a question to authorities: the level of complexity can be derived. It's too subjective to ask people developing schemes IMO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, that's what I put in the PR description:

Also, I only added a few categories from the page. The details in each one are not terribly interesting... instead of making people pick complexity, we should ask more specific questions and auto-calculate complexity from it

But the definition of complexity in the doc is hard to translate into more concrete questions to ask. Should we ask people to state the number of junctions themselves, or should we calculate this for them?

@Robinlovelace
Copy link
Contributor

I think the key thing is a taxonomy that includes the types of intervention:

image

Those can be within out existing top level classification of area/route/crossing interventions I think.

@dabreegster
Copy link
Collaborator Author

Those can be within out existing top level classification of area/route/crossing interventions I think.

Notice this JSON schema doesn't mention area/route/crossing/other. I'm trying to follow exactly the doc's system in this option.

@dabreegster dabreegster merged commit e2eae03 into main Mar 31, 2023
@dabreegster dabreegster deleted the atf4 branch March 31, 2023 13:46
@Robinlovelace
Copy link
Contributor

Those can be within out existing top level classification of area/route/crossing interventions I think.

Notice this JSON schema doesn't mention area/route/crossing/other. I'm trying to follow exactly the doc's system in this option.

That's reasonable. Good to be faithful to what's in the guidance for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants