-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
2,064 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
511 changes: 511 additions & 0 deletions
511
server/opendp_apps/dp_reports/test_data/release_695cb409-0f99-4c50-9f04-e0a94b029ade.json
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Register your models here. | ||
from django.contrib import admin | ||
|
||
from opendp_apps.release_schemas.forms import ReleaseInfoSchemaForm | ||
from opendp_apps.release_schemas.models import ReleaseInfoSchema | ||
|
||
|
||
class ReleaseInfoSchemaAdmin(admin.ModelAdmin): | ||
form = ReleaseInfoSchemaForm | ||
save_on_top = True | ||
search_fields = ('title',) | ||
list_filter = ('is_published',) | ||
list_display = ('version', | ||
'title', | ||
'is_published', | ||
'description', | ||
'updated', | ||
'created',) | ||
readonly_fields = ('title', | ||
'sortable_version', | ||
'schema_link', | ||
'id_link', | ||
'schema_display', | ||
'created', | ||
'updated',) | ||
fields = ['version', | ||
'title', | ||
'is_published', | ||
'schema', | ||
'description', | ||
'schema_link', | ||
'id_link', | ||
'schema_display', | ||
'created', | ||
'updated', ] | ||
|
||
|
||
admin.site.register(ReleaseInfoSchema, ReleaseInfoSchemaAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ReleaseSchemasConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'opendp_apps.release_schemas' |
317 changes: 317 additions & 0 deletions
317
server/opendp_apps/release_schemas/fixtures/schema_fixture_v0-2-0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,317 @@ | ||
[ | ||
{ | ||
"model": "release_schemas.releaseinfoschema", | ||
"pk": 2, | ||
"fields": { | ||
"created": "2023-09-05T17:40:56.186Z", | ||
"updated": "2023-09-06T18:25:39.620Z", | ||
"object_id": "6e8c338a-00a9-4d68-9cad-ab55f4cb20c6", | ||
"version": "0.2.0", | ||
"title": "OpenDP - DP Creator Schema 0.2.0", | ||
"description": "", | ||
"is_published": true, | ||
"schema": { | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "http://localhost:8000/api/schema/0.2.0/", | ||
"version": "0.2.0", | ||
"title": "OpenDP - DP Creator Schema 0.2.0", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"created": { | ||
"type": "object", | ||
"properties": { | ||
"iso": { | ||
"type": "string" | ||
}, | ||
"human_readable": { | ||
"type": "string" | ||
}, | ||
"human_readable_date_only": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"iso", | ||
"human_readable", | ||
"human_readable_date_only" | ||
] | ||
}, | ||
"application": { | ||
"type": "string" | ||
}, | ||
"application_url": { | ||
"type": "string" | ||
}, | ||
"differentially_private_library": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"url": { | ||
"type": "string" | ||
}, | ||
"version": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"url", | ||
"version" | ||
] | ||
}, | ||
"dataset": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"fileFormat": { | ||
"type": "string" | ||
}, | ||
"creator": { | ||
"type": "object", | ||
"properties": { | ||
"first_name": { | ||
"type": "string" | ||
}, | ||
"last_name": { | ||
"type": "string" | ||
}, | ||
"email": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"first_name", | ||
"last_name", | ||
"email" | ||
] | ||
}, | ||
"upload_date": { | ||
"type": "object", | ||
"properties": { | ||
"iso": { | ||
"type": "string" | ||
}, | ||
"human_readable": { | ||
"type": "string" | ||
}, | ||
"human_readable_date_only": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"iso", | ||
"human_readable", | ||
"human_readable_date_only" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"type", | ||
"name", | ||
"fileFormat", | ||
"creator", | ||
"upload_date" | ||
] | ||
}, | ||
"setup_questions": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"question_num": { | ||
"type": "number" | ||
}, | ||
"text": { | ||
"type": "string" | ||
}, | ||
"attribute": { | ||
"type": "string" | ||
}, | ||
"answer": { | ||
"type": "string" | ||
}, | ||
"context": { | ||
"type": "string" | ||
}, | ||
"longAnswer": { | ||
"type": "string" | ||
}, | ||
"privacy_params": { | ||
"type": "object", | ||
"properties": { | ||
"epsilon": { | ||
"type": "number" | ||
}, | ||
"delta": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"epsilon", | ||
"delta" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"question_num", | ||
"text", | ||
"attribute", | ||
"answer", | ||
"context" | ||
] | ||
} | ||
}, | ||
"statistics": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"statistic": { | ||
"type": "string" | ||
}, | ||
"variable": { | ||
"type": "string" | ||
}, | ||
"variable_type": { | ||
"type": "string" | ||
}, | ||
"result": { | ||
"type": "object", | ||
"properties": { | ||
"value": {} | ||
}, | ||
"required": [ | ||
"value" | ||
] | ||
}, | ||
"noise_mechanism": { | ||
"type": "string" | ||
}, | ||
"epsilon": { | ||
"type": "number" | ||
}, | ||
"delta": {}, | ||
"boolean_values": { | ||
"type": "object", | ||
"properties": { | ||
"true_value": { | ||
"type": "number" | ||
}, | ||
"false_value": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"true_value", | ||
"false_value" | ||
] | ||
}, | ||
"missing_value_handling": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
}, | ||
"fixed_value": {} | ||
}, | ||
"required": [ | ||
"type", | ||
"fixed_value" | ||
] | ||
}, | ||
"confidence_level": { | ||
"type": "number" | ||
}, | ||
"confidence_level_alpha": { | ||
"type": "number" | ||
}, | ||
"accuracy": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "number" | ||
}, | ||
"message": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"value", | ||
"message" | ||
] | ||
}, | ||
"description": { | ||
"type": "object", | ||
"properties": { | ||
"html": { | ||
"type": "string" | ||
}, | ||
"text": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"html", | ||
"text" | ||
] | ||
}, | ||
"bounds": { | ||
"type": "object", | ||
"properties": { | ||
"min": { | ||
"type": "number" | ||
}, | ||
"max": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"min", | ||
"max" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"statistic", | ||
"variable", | ||
"variable_type", | ||
"result", | ||
"noise_mechanism", | ||
"epsilon", | ||
"delta", | ||
"missing_value_handling", | ||
"confidence_level", | ||
"confidence_level_alpha", | ||
"accuracy", | ||
"description" | ||
] | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"created", | ||
"application", | ||
"application_url", | ||
"differentially_private_library", | ||
"dataset", | ||
"setup_questions", | ||
"statistics" | ||
] | ||
}, | ||
"schema_link": "https://json-schema.org/draft/2020-12/schema", | ||
"id_link": "http://localhost:8000/api/schema/0.2.0/", | ||
"sortable_version": "v-0000-0002-0000" | ||
} | ||
} | ||
] |
Oops, something went wrong.