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

upgrade-validator #4257

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
# Edit Snovault version after the `@` here, can be a branch or tag
SNOVAULT_DEP = "git+https://github.com/ENCODE-DCC/snovault.git@1.0.62"
SNOVAULT_DEP = "git+https://github.com/ENCODE-DCC/snovault.git@upgrade-validator-sno2"

INSTALL_REQUIRES = [
"PasteDeploy==2.1.0",
Expand All @@ -21,7 +21,7 @@
"elasticsearch==5.4.0",
"future==0.18.2",
"humanfriendly==6.1",
"jsonschema_serialize_fork==2.1.1",
"jsonschema[format]==4.4.0",
"loremipsum==1.0.5",
"passlib==1.7.2",
"psutil==5.6.7",
Expand All @@ -32,7 +32,7 @@
"pyramid==1.10.4",
"python-magic==0.4.15",
"pytz==2019.3",
"rdflib-jsonld==0.4.0",
"rdflib-jsonld==0.6.0",
"rdflib==4.2.2",
"repoze.debug==1.1",
"rfc3987==1.3.8",
Expand Down
2 changes: 1 addition & 1 deletion src/encoded/auth0.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from snovault.schema_utils import validate_request
from pyramid.authentication import CallbackAuthenticationPolicy
from encoded.types.user import User
from jsonschema_serialize_fork.exceptions import ValidationError
from jsonschema.exceptions import ValidationError
from pyramid.httpexceptions import (
HTTPBadRequest,
HTTPInternalServerError,
Expand Down
2 changes: 1 addition & 1 deletion src/encoded/schema_formats.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import re
import rfc3987
from jsonschema_serialize_fork import FormatChecker
from jsonschema import FormatChecker
from pyramid.threadlocal import get_current_request
from uuid import UUID

Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/access_key.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Admin access key",
"id": "/profiles/access_key_admin.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/access_key_admin.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [],
"additionalProperties": false,
"mixinProperties": [
Expand Down
6 changes: 3 additions & 3 deletions src/encoded/schemas/aggregate_series.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Aggregate series",
"description": "Schema for submitting metadata for an aggregate series.",
"id": "/profiles/aggregate_series.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/aggregate_series.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [ "award", "lab"],
"identifyingProperties": ["uuid", "accession" , "aliases"],
Expand All @@ -21,7 +21,7 @@
{ "$ref": "series.json#/properties" },
{ "$ref": "mixins.json#/submitter_comment" }
],
"dependencies": {
"dependentSchemas": {
"status": {
"oneOf": [
{
Expand Down
5 changes: 2 additions & 3 deletions src/encoded/schemas/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"title": "Analysis",
"description": "Schema for grouping files into one analysis.",
"comment": "An analysis is typically performed on one experiments and is initially designed to group only files from a single experiment.",
"id": "/profiles/analysis.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/analysis.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["files"],
"identifyingProperties": ["uuid", "accession", "aliases"],
Expand All @@ -18,7 +18,6 @@
{ "$ref": "mixins.json#/notes" },
{ "$ref": "mixins.json#/documents" }
],
"dependencies": {},
"properties": {
"schema_version": {
"default": "1"
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/analysis_step.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Analysis step",
"description": "Schema for submitting a computational analysis steps as a subobject of pipeline that transforms input files to output files.",
"id": "/profiles/analysis_step.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/analysis_step.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_label", "title", "analysis_step_types", "input_file_types", "major_version"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/analysis_step_run.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Analysis step run",
"description": "Schema for reporting the specific calculation of an analysis_step",
"id": "/profiles/analysis_step_run.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/analysis_step_run.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["analysis_step_version"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/analysis_step_version.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Analysis step version",
"description": "A compatible version of an analysis step.",
"id": "/profiles/analysis_step_version.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/analysis_step_version.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["software_versions", "analysis_step", "minor_version"],
"additionalProperties": false,
Expand Down
12 changes: 7 additions & 5 deletions src/encoded/schemas/annotation.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Annotation",
"description": "Schema for submitting metadata for an annotation set.",
"id": "/profiles/annotation.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/annotation.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [ "award", "lab", "annotation_type"],
"identifyingProperties": ["uuid", "accession" , "aliases"],
Expand All @@ -21,7 +21,11 @@
{ "$ref": "dataset.json#/properties" },
{ "$ref": "file_set.json#/properties" }
],
"dependencies": {
"dependentRequired": {
"relevant_timepoint": ["relevant_timepoint_units"],
"relevant_timepoint_units": ["relevant_timepoint"]
},
"dependentSchemas": {
"biosample_ontology": {
"not": {
"properties": {
Expand All @@ -41,8 +45,6 @@
}
}
},
"relevant_timepoint": ["relevant_timepoint_units"],
"relevant_timepoint_units": ["relevant_timepoint"],
"status": {
"oneOf": [
{
Expand Down
12 changes: 7 additions & 5 deletions src/encoded/schemas/antibody_characterization.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
{
"title": "Antibody characterization",
"description": "Schema for submitting antibody characterization data.",
"id": "/profiles/antibody_characterization.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/antibody_characterization.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [ "award", "lab", "characterizes", "target", "attachment"],
"identifyingProperties": ["uuid", "aliases"],
Expand All @@ -20,8 +20,10 @@
{ "$ref": "mixins.json#/documents" },
{ "$ref": "mixins.json#/submitter_comment" }
],
"dependencies": {
"characterization_reviews": ["primary_characterization_method"],
"dependentRequired": {
"characterization_reviews": ["primary_characterization_method"]
},
"dependentSchemas": {
"primary_characterization_method": {
"oneOf": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/antibody_lot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Antibody lot",
"description": "Schema for submitting an antibody lot (not including target or characterization information).",
"id": "/profiles/antibody_lot.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/antibody_lot.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [ "award", "lab", "product_id", "source", "lot_id", "host_organism"],
"identifyingProperties": ["uuid","accession","aliases"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "ATAC-seq alignment enrichment quality metric",
"description": "Schema for ATAC-seq alignment enrichment quality metrics",
"id": "/profiles/atac_alignment_enrichment_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/atac_alignment_enrichment_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run","quality_metric_of", "award", "lab"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/atac_alignment_quality_metric.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "ATAC-seq alignment quality metric",
"description": "Schema for reporting ATAC-seq alignment quality metrics",
"id": "/profiles/atac_alignment_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/atac_alignment_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run","quality_metric_of", "award", "lab"],
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "ATAC-seq library quality metric",
"description": "Schema for reporting ATAC-seq library quality metrics",
"id": "/profiles/atac_library_complexity_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/atac_library_complexity_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run","quality_metric_of", "award", "lab"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/atac_peak_enrichment_quality_metric.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "ATAC-seq peak enrichment quality metric",
"description": "Schema for reporting ATAC-seq peak enrichment quality metrics",
"id": "/profiles/atac_peak_enrichment_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/atac_peak_enrichment_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run","quality_metric_of", "award", "lab"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/atac_replication_quality_metric.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "ATAC-seq replication quality metric",
"description": "Schema for reporting ATAC-seq replication quality metrics",
"id": "/profiles/atac_replication_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/atac_replication_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run","quality_metric_of", "award", "lab"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/award.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Grant",
"id": "/profiles/award.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/award.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [ "name", "project", "rfa", "title"],
"identifyingProperties": ["uuid", "name", "title"],
"additionalProperties": false,
Expand Down
14 changes: 8 additions & 6 deletions src/encoded/schemas/biosample.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"title": "Biosample",
"description": "Schema for submitting a biosample.",
"comment": "For cultured samples this object represents unique growths or culture harvests.",
"id": "/profiles/biosample.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/biosample.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [ "award", "lab", "source", "organism", "biosample_ontology"],
"identifyingProperties": ["uuid", "accession", "aliases"],
Expand All @@ -27,7 +27,7 @@
{"$ref": "mixins.json#/accession"},
{"$ref": "mixins.json#/uuid"}
],
"dependencies": {
"dependentSchemas": {
"biosample_ontology": {
"not": {
"properties": {
Expand Down Expand Up @@ -976,9 +976,11 @@
"maximum": 100
}
},
"dependencies": {
"expression_range_minimum": ["expression_range_maximum"],
"expression_range_maximum": ["expression_range_minimum"],
"dependentRequired": {
"expression_range_minimum": ["expression_range_maximum"],
"expression_range_maximum": ["expression_range_minimum"]
},
"dependentSchemas": {
"expression_percentile": {
"not": {
"anyOf": [
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/biosample_characterization.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Biosample characterization",
"description": "Schema for submitting biosample characterization data",
"id": "/profiles/biosample_characterization.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/biosample_characterization.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [ "award", "lab", "characterizes", "attachment"],
"identifyingProperties": ["uuid", "aliases"],
Expand Down
6 changes: 3 additions & 3 deletions src/encoded/schemas/biosample_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"title": "Biosample Type",
"description": "Schema for describing the type of a specific biosample.",
"comment": "This object collects common properties of a group of similar biosamples to help reduce ambiguity and duplications. Do not submit. DCC personnel is responsible for creating and maintaining these objects",
"id": "/profiles/biosample_type.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/biosample_type.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["classification", "term_id", "term_name"],
"identifyingProperties": ["aliases", "uuid"],
Expand All @@ -16,7 +16,7 @@
{"$ref": "mixins.json#/standard_status"},
{"$ref": "mixins.json#/uuid"}
],
"dependencies": {
"dependentSchemas": {
"term_id":{
"oneOf": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/bismark_quality_metric.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Bismark quality metric",
"description": "Schema for reporting the specific calculation of an quality metrics",
"id": "/profiles/bismark_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/bismark_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run", "quality_metric_of", "award", "lab"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/bru_library_quality_metric.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Bru library quality metric",
"description": "Schema for reporting Bru assay library quality metric",
"id": "/profiles/bru_library_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/bru_library_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run", "award", "lab", "quality_metric_of"],
"additionalProperties": false,
Expand Down
6 changes: 3 additions & 3 deletions src/encoded/schemas/cart.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"title": "Cart",
"description": "Cart of objects aka shopping cart.",
"comment": "This object gets connected with user objects.",
"id": "/profiles/cart.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/cart.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["name"],
"identifyingProperties": ["uuid", "identifier"],
Expand All @@ -13,7 +13,7 @@
{ "$ref": "mixins.json#/submitted" },
{ "$ref": "mixins.json#/uuid" }
],
"dependencies": {
"dependentSchemas": {
"status":{
"comment": "Listed, released, or revoked carts must have a description.",
"oneOf": [
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/characterization.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Base characterization",
"description": "Schema for submitting a characterization of an object.",
"id": "/profiles/characterization.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/characterization.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [ "award", "lab", "characterizes", "attachment"],
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/schemas/chia_pet_alignment_quality_metric.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "ChIA-PET alignment quality metric",
"description": "Schema for reporting ChIA-PET alignment quality metric",
"id": "/profiles/chia_pet_alignment_quality_metric.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "/profiles/chia_pet_alignment_quality_metric.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["step_run", "award", "lab", "quality_metric_of"],
"additionalProperties": false,
Expand Down
Loading