-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adds new stats, reorganises stats, adds padding and dev library #28
Conversation
8040bba
to
de6fe37
Compare
See screenshots at #24 (comment) |
Review one commit at a time maybe |
@@ -14,7 +14,7 @@ <h4 class="panel-title"> | |||
<span class="glyphicon glyphicon-collapse-up"></span>{% trans 'Download Data' %} | |||
</h4> | |||
</div> | |||
<div id="downloadData" class="collapse in"> | |||
<div id="downloadData" class="collapse in box-padding"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the more bootstrap thing to do is to have <div class="panel-body">
. (This is what 360 CoVE does anyway https://dataquality.threesixtygiving.org/data/62eabd80-1d1a-46a4-9e1b-b7820eb1f1fd).
cove_bods/views.py
Outdated
@@ -89,6 +89,12 @@ def explore_bods(request, pk): | |||
db_data.rendered = True | |||
db_data.save() | |||
|
|||
# We need to calculate some stats for showing in the view | |||
total_interest_statements = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly confused about "interest statements". Aren't interests an array within ownership-or-control statements, rather than a statement themselves?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that could be a better variable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its also called that in the web UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is called that in the Web UI, but under a header that says "Ownership or Control Statements" so I thought that was ok. Is this a detail we can pick up in the redesign that the next sprint will be around?
cove_bods/views.py
Outdated
context['statistics']['count_entity_statements_types_with_any_identifier_with_id_and_scheme']['legalEntity'] | ||
context['statistics']['count_entities_registeredEntity_legalEntity'] = \ | ||
context['statistics']['count_entity_statements_types'][r_e_type] + \ | ||
context['statistics']['count_entity_statements_types']['legalEntity'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible to do these line continuations with brackets rather than slashes.
context['statistics']['count_entities_registeredEntity_legalEntity'] = (
context['statistics']['count_entity_statements_types'][r_e_type] +
context['statistics']['count_entity_statements_types']['legalEntity'])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked, this is kinda suggested in Pip8 tho it's not totally explicit. https://www.python.org/dev/peps/pep-0008/#indentation Can we make sure this is documented in https://opendataservices.gitbook.io/developer-docs/code/code-python#coding-style so all us developers can be on the same page about this?
Based on feedback in #24
@Bjwebb Can this be re-reviewed? Thanks |
No description provided.