diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7e09da91..db49c30b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 3.1.1 +current_version = 3.1.2 commit = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(?:-(?Prc)\.(?P\d+))? serialize = diff --git a/cellxgene_schema_cli/cellxgene_schema/__init__.py b/cellxgene_schema_cli/cellxgene_schema/__init__.py index d539d50c..911557b8 100644 --- a/cellxgene_schema_cli/cellxgene_schema/__init__.py +++ b/cellxgene_schema_cli/cellxgene_schema/__init__.py @@ -1 +1 @@ -__version__ = "3.1.1" +__version__ = "3.1.2" diff --git a/cellxgene_schema_cli/cellxgene_schema/schema_definitions/3_0_0.yaml b/cellxgene_schema_cli/cellxgene_schema/schema_definitions/3_0_0.yaml index 8c59c96a..ddb50fb8 100644 --- a/cellxgene_schema_cli/cellxgene_schema/schema_definitions/3_0_0.yaml +++ b/cellxgene_schema_cli/cellxgene_schema/schema_definitions/3_0_0.yaml @@ -36,8 +36,6 @@ components: keys: schema_version: type: string - # If "required" is present, then the key/value are required - required: null title: type: string required: null diff --git a/cellxgene_schema_cli/setup.py b/cellxgene_schema_cli/setup.py index b6a2dbe9..5f48ce5e 100644 --- a/cellxgene_schema_cli/setup.py +++ b/cellxgene_schema_cli/setup.py @@ -5,7 +5,7 @@ setup( name="cellxgene-schema", - version="3.1.1", + version="3.1.2", url="https://github.com/chanzuckerberg/single-cell-curation", license="MIT", author="Chan Zuckerberg Initiative", diff --git a/cellxgene_schema_cli/tests/fixtures/examples_validate.py b/cellxgene_schema_cli/tests/fixtures/examples_validate.py index b32deb21..e12fd5be 100644 --- a/cellxgene_schema_cli/tests/fixtures/examples_validate.py +++ b/cellxgene_schema_cli/tests/fixtures/examples_validate.py @@ -155,6 +155,13 @@ # --- # 3. Creating individual uns component good_uns = { + "title": "A title", + "default_embedding": "X_umap", + "X_approximate_distribution": "normal", + "batch_condition": ["is_primary_data"], +} + +good_uns_with_labels = { "schema_version": SCHEMA_VERSION, "title": "A title", "default_embedding": "X_umap", @@ -213,7 +220,7 @@ X=sparse.csr_matrix(X), obs=pd.concat([good_obs, obs_expected], axis=1), var=var_expected, - uns=good_uns, + uns=good_uns_with_labels, obsm=good_obsm, ) @@ -270,7 +277,7 @@ adata_with_lables_unmigrated = anndata.AnnData( X=sparse.csr_matrix(unmigrated_X), obs=umigrated_obs, - uns=good_uns, + uns=good_uns_with_labels, var=var_unmigrated, obsm={"X_umap": numpy.zeros([unmigrated_X.shape[0], 2])}, ) diff --git a/cellxgene_schema_cli/tests/test_schema_compliance.py b/cellxgene_schema_cli/tests/test_schema_compliance.py index 5e885480..287d96ca 100644 --- a/cellxgene_schema_cli/tests/test_schema_compliance.py +++ b/cellxgene_schema_cli/tests/test_schema_compliance.py @@ -1043,7 +1043,6 @@ def test_optional_fields_schema_version_is_old(self): def test_optional_fields_schema_version_is_missing(self): latest_version = "1.0.0" self.validator.schema_version = None - del self.validator.adata.uns["schema_version"] with patch( "cellxgene_schema.validate.schema.get_schema_versions_supported", return_value=[latest_version] ) as mock_supported_versions, patch(