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

Disable summary stats temporarily #386

Merged
merged 4 commits into from
Jul 2, 2021
Merged
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
4 changes: 3 additions & 1 deletion dandiapi/api/models/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ def _populate_metadata(self, version_with_assets: Version = None):
'numberOfBytes': 0,
'numberOfFiles': 0,
}
if version_with_assets.id:
# 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:
try:
summary = aggregate_assets_summary(
[asset.metadata.metadata for asset in version_with_assets.assets.all()]
Expand Down
3 changes: 3 additions & 0 deletions dandiapi/api/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ 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 @@ -241,6 +242,7 @@ 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 @@ -260,6 +262,7 @@ 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: 4 additions & 0 deletions dandiapi/api/tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ 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 @@ -352,6 +353,7 @@ 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 @@ -407,6 +409,7 @@ 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 @@ -497,6 +500,7 @@ 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