• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CenterForOpenScience / SHARE / 14839804620

05 May 2025 03:11PM UTC coverage: 79.141% (-12.6%) from 91.745%
14839804620

push

github

web-flow
Merge pull request #859 from CenterForOpenScience/release/25.2.0

Release/25.2.0 share cleanupgrade (milestone 1: simplify)

147 of 204 new or added lines in 33 files covered. (72.06%)

984 existing lines in 69 files now uncovered.

6101 of 7709 relevant lines covered (79.14%)

1.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/api/rawdata/views.py
1
from rest_framework import viewsets
2✔
2

3
from share import models
2✔
4

5
from api.base.views import ShareViewSet
2✔
6
from api.pagination import CursorPagination
2✔
7
from api.rawdata.serializers import RawDatumSerializer
2✔
8

9

10
class RawDataViewSet(ShareViewSet, viewsets.ReadOnlyModelViewSet):
2✔
11
    """
12
    Raw data, exactly as harvested from the data source.
13

14
    ## Query by object
15
    To get all the raw data corresponding to a Share object, use the query
16
    parameters `object_id=<@id>` and `object_type=<@type>`
17
    """
18

19
    ordering = ('-id', )
2✔
20
    pagination_class = CursorPagination
2✔
21
    serializer_class = RawDatumSerializer
2✔
22

23
    def get_queryset(self):
2✔
24
        object_id = self.request.query_params.get('object_id', None)
2✔
25
        object_type = self.request.query_params.get('object_type', None)
2✔
26
        if object_id and object_type:
2✔
UNCOV
27
            return models.RawDatum.objects.filter(
×
28
                normalizeddata__changeset__changes__target_id=object_id,
29
                normalizeddata__changeset__changes__target_type__model=object_type
30
            ).distinct('id').select_related('suid')
31
        return models.RawDatum.objects.all().select_related('suid')
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc