Skip to content

Commit

Permalink
Merge pull request #415 from dbmi-bgm/c4_670
Browse files Browse the repository at this point in the history
C4-670 Implement 'add_no_value' schema parameter
  • Loading branch information
willronchetti authored Jul 7, 2021
2 parents 7a67b8b + 3bffbe7 commit d0d1bea
Show file tree
Hide file tree
Showing 17 changed files with 965 additions and 707 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ test-any:
poetry run python -m pytest -vv -r w --timeout=200

test-npm:
poetry run python -m pytest -vv -r w --timeout=200 -m "not manual and not integratedx and not performance and not broken and not sloppy and not indexing"
poetry run python -m pytest -vv -r w --timeout=300 -m "not manual and not integratedx and not performance and not broken and not sloppy and not indexing"

test-unit:
poetry run python -m pytest -vv -r w --timeout=200 -m "not manual and not integratedx and not performance and not broken and not sloppy and indexing"
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^5.14.0",
"@hms-dbmi-bgm/react-workflow-viz": "0.1.4",
"@hms-dbmi-bgm/shared-portal-components": "github:4dn-dcic/shared-portal-components#0.1.11",
"@hms-dbmi-bgm/shared-portal-components": "github:4dn-dcic/shared-portal-components#0.1.12",
"babel-polyfill": "^6.26.0",
"d3": "^5.16.0",
"detect-browser": "^3.0.1",
Expand Down
730 changes: 368 additions & 362 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ certifi = ">=2020.11.8"
chardet = "3.0.4"
colorama = "0.3.3"
dcicpyvcf = "1.0.0"
dcicsnovault = "^4.7.5"
dcicsnovault = "^4.8.1"
dcicutils = "1.15.0"
elasticsearch = "6.8.1"
execnet = "1.4.1"
Expand Down
478 changes: 239 additions & 239 deletions src/encoded/annotations/v0.5.4_variant_table.csv

Large diffs are not rendered by default.

37 changes: 26 additions & 11 deletions src/encoded/ingestion/table_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MappingTableHeader:
not vary across . """
HEADER_ROW_INDEX = 2
INTEGER_FIELDS = ['no', 'maximum_length_of_value', 'default', 'min', 'max']
BOOLEAN_FIELDS = ['is_list', 'calculated_property', 'embedded_field', 'do_import']
BOOLEAN_FIELDS = ['is_list', 'calculated_property', 'embedded_field', 'do_import', 'add_no_value']
STRING_FIELDS = ['field_name', 'vcf_field', 'source_name', 'source_version', 'sub_embedding_group',
'annotation_category', 'separator', 'description',
'scope', 'schema_title', 'pattern', 'link', 'abbreviation']
Expand Down Expand Up @@ -546,11 +546,11 @@ def extend_variant_sample_columns(cols):

@staticmethod
def add_extra_variant_sample_facets(facs):
'''
"""
Order of a Facet Group within top-level FacetList is determined by `min(grouped facet 1, grouped facet 2, ...)`
which is then used for sorting relative to all other top-level facets' and facet groups' orders.
Facets within a group are sorted relative to each other.
'''
"""
facs["variant.genes.genes_most_severe_gene.display_title"] = {
"title": "Gene",
"order": 1,
Expand Down Expand Up @@ -676,8 +676,6 @@ def add_extra_variant_sample_facets(facs):
"grouping": "Genotype",
"default_hidden": True
},


"associated_genotype_labels.sister_genotype_label": {
"title": "Sister Genotype",
"order": 1001,
Expand All @@ -702,8 +700,6 @@ def add_extra_variant_sample_facets(facs):
"grouping": "Genotype",
"default_hidden": True
},


"associated_genotype_labels.brother_genotype_label": {
"title": "Brother Genotype",
"order": 1005,
Expand All @@ -728,8 +724,6 @@ def add_extra_variant_sample_facets(facs):
"grouping": "Genotype",
"default_hidden": True
},


"associated_genotype_labels.daughter_genotype_label": {
"title": "Daughter Genotype",
"order": 1009,
Expand All @@ -754,8 +748,6 @@ def add_extra_variant_sample_facets(facs):
"grouping": "Genotype",
"default_hidden": True
},


"associated_genotype_labels.son_genotype_label": {
"title": "Son Genotype",
"order": 1013,
Expand Down Expand Up @@ -802,6 +794,17 @@ def generate_variant_sample_schema(self, sample_props, cols, facs, variant_cols,
schema['title'] = 'Sample Variant'
schema['description'] = "Schema for variant info for sample"
schema['id'] = '/profiles/variant_sample.json'
schema['mixinProperties'] = [
{"$ref": "mixins.json#/schema_version"},
{"$ref": "mixins.json#/uuid"},
{"$ref": "mixins.json#/aliases"},
{"$ref": "mixins.json#/submitted"},
{"$ref": "mixins.json#/modified"},
{"$ref": "mixins.json#/status"},
{"$ref": "mixins.json#/attribution"},
{"$ref": "mixins.json#/notes"},
{"$ref": "mixins.json#/static_embeds"},
]
schema['properties'] = sample_props
schema['properties']['schema_version'] = {'default': '1'}
schema['properties']['variant'] = { # link to single variant
Expand Down Expand Up @@ -929,6 +932,18 @@ def generate_variant_schema(self, var_props, cols, facs):
schema['title'] = 'Variants'
schema['description'] = "Schema for variants"
schema['id'] = '/profiles/variant.json'
schema['mixinProperties'] = [
{"$ref": "mixins.json#/schema_version"},
{"$ref": "mixins.json#/uuid"},
{"$ref": "mixins.json#/aliases"},
{"$ref": "mixins.json#/submitted"},
{"$ref": "mixins.json#/modified"},
{"$ref": "mixins.json#/status"},
{"$ref": "mixins.json#/attribution"},
{"$ref": "mixins.json#/notes"},
{"$ref": "mixins.json#/interpretation"},
{"$ref": "mixins.json#/static_embeds"},
]
schema['properties'] = var_props
schema['properties']['hg19'] = { # required for testing :( - will 1-8-2021
"title": "hg19 Coordinates",
Expand Down
3 changes: 2 additions & 1 deletion src/encoded/ingestion_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ def process_submission(*, submission_id, ingestion_type, app, bundles_bucket=Non
except KeyError as e:
debuglog("Manifest data is missing 'email' field.")
if DEBUG_SUBMISSIONS:
import pdb; pdb.set_trace()
pass
# import pdb; pdb.set_trace()
debuglog("processing submission %s with email %s" % (submission_id, email))
with vapp_for_email(email=email, app=app) as vapp:
if DEBUG_SUBMISSIONS:
Expand Down
5 changes: 5 additions & 0 deletions src/encoded/schemas/annotation_field.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@
"title": "Abbreviation",
"description": "A shorter name for this field, used by the UI",
"type": "string"
},
"add_no_value": {
"title": "Add No Value",
"description": "Specify 'true' to include documents with 'No value' for this field when 0 is in the search range",
"type": "boolean"
}
},
"facets": {
Expand Down
Loading

0 comments on commit d0d1bea

Please sign in to comment.