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

Adds new stats, reorganises stats, adds padding and dev library #28

Merged
6 commits merged into from
Apr 11, 2019

Conversation

ghost
Copy link

@ghost ghost commented Apr 2, 2019

No description provided.

@ghost ghost force-pushed the work-2019-04-02 branch 2 times, most recently from 8040bba to de6fe37 Compare April 2, 2019 15:11
@ghost ghost changed the title WIP: Work 2019 04 02 Adds now stats, reorganises stats, adds padding and dev library Apr 2, 2019
@ghost ghost requested a review from rhiaro April 2, 2019 15:13
@ghost ghost self-assigned this Apr 2, 2019
@ghost ghost requested a review from Bjwebb April 2, 2019 15:13
@ghost ghost mentioned this pull request Apr 2, 2019
@ghost ghost changed the title Adds now stats, reorganises stats, adds padding and dev library Adds new stats, reorganises stats, adds padding and dev library Apr 2, 2019
@ghost
Copy link
Author

ghost commented Apr 2, 2019

See screenshots at #24 (comment)

@ghost
Copy link
Author

ghost commented Apr 2, 2019

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">
Copy link
Collaborator

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).

@@ -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
Copy link
Collaborator

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?

Copy link
Author

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.

Copy link
Collaborator

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.

Copy link
Author

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?

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']
Copy link
Collaborator

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'])

Copy link
Author

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?

@ghost ghost force-pushed the work-2019-04-02 branch from de6fe37 to 780d707 Compare April 9, 2019 07:36
Based on feedback in #24
@ghost ghost force-pushed the work-2019-04-02 branch from b3f5b65 to 1227d33 Compare April 9, 2019 07:47
@ghost
Copy link
Author

ghost commented Apr 9, 2019

@Bjwebb Can this be re-reviewed? Thanks

@ghost ghost merged commit cabff10 into master Apr 11, 2019
@ghost ghost deleted the work-2019-04-02 branch April 11, 2019 16:35
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants