Skip to content

Commit

Permalink
Merge pull request #389 from dandi/rf-revert-disable-summaries
Browse files Browse the repository at this point in the history
Revert "Merge pull request #386 from dandi/workaround-no-summary"
  • Loading branch information
yarikoptic committed Jul 5, 2021
2 parents 93faf5f + 9332d49 commit 9118e50
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
4 changes: 1 addition & 3 deletions dandiapi/api/models/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,7 @@ def _populate_metadata(self, version_with_assets: Version = None):
'numberOfBytes': 0,
'numberOfFiles': 0,
}
# TODO: remove the `and False` and find a better way to handle the
# unconditional recomputation of the summary stats.
if version_with_assets.id and False:
if version_with_assets.id:
try:
summary = aggregate_assets_summary(
[asset.metadata.metadata for asset in version_with_assets.assets.all()]
Expand Down
3 changes: 0 additions & 3 deletions dandiapi/api/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def test_validate_asset_metadata_malformed_keywords(asset: Asset):
)


@pytest.mark.skip(reason='https://github.com/dandi/dandi-api/pull/386')
@pytest.mark.django_db
def test_validate_version_metadata(version: Version, asset: Asset):
version.assets.add(asset)
Expand Down Expand Up @@ -242,7 +241,6 @@ def test_validate_version_metadata_malformed_schema_version(version: Version, as
assert version.validation_error.startswith('Metadata version xxx is not allowed.')


@pytest.mark.skip(reason='https://github.com/dandi/dandi-api/pull/386')
@pytest.mark.django_db
def test_validate_version_metadata_no_description(version: Version, asset: Asset):
version.assets.add(asset)
Expand All @@ -262,7 +260,6 @@ def test_validate_version_metadata_no_description(version: Version, asset: Asset
)


@pytest.mark.skip(reason='https://github.com/dandi/dandi-api/pull/386')
@pytest.mark.django_db
def test_validate_version_metadata_malformed_license(version: Version, asset: Asset):
version.assets.add(asset)
Expand Down
4 changes: 0 additions & 4 deletions dandiapi/api/tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def test_version_make_version_save(mocker, dandiset, published_version_factory):
assert version_1.version != version_str_2


@pytest.mark.skip(reason='https://github.com/dandi/dandi-api/pull/386')
@pytest.mark.django_db
def test_version_metadata_computed(version, version_metadata):
original_metadata = version_metadata.metadata
Expand Down Expand Up @@ -353,7 +352,6 @@ def test_version_rest_info_with_asset(
}


@pytest.mark.skip(reason='https://github.com/dandi/dandi-api/pull/386')
@pytest.mark.django_db
def test_version_rest_update(api_client, user, draft_version):
assign_perm('owner', user, draft_version.dandiset)
Expand Down Expand Up @@ -409,7 +407,6 @@ def test_version_rest_update(api_client, user, draft_version):
assert draft_version.metadata.name == new_name


@pytest.mark.skip(reason='https://github.com/dandi/dandi-api/pull/386')
@pytest.mark.django_db
def test_version_rest_update_large(api_client, user, draft_version):
assign_perm('owner', user, draft_version.dandiset)
Expand Down Expand Up @@ -500,7 +497,6 @@ def test_version_rest_update_not_an_owner(api_client, user, version):
)


@pytest.mark.skip(reason='https://github.com/dandi/dandi-api/pull/386')
@pytest.mark.django_db
# TODO change admin_user back to a normal user once publish is allowed
def test_version_rest_publish(api_client, admin_user: User, draft_version: Version, asset: Asset):
Expand Down

0 comments on commit 9118e50

Please sign in to comment.