Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

update subquota limits #114

Merged

Conversation

giovanisleite
Copy link
Contributor

@giovanisleite giovanisleite commented Dec 6, 2017

What is the purpose of this Pull Request?
Update chronological sub-quota limits (close #113 )

What was done to achieve this purpose?
The limits of monthly_subquota_limit_classifier was updated

Who can help reviewing it?
@cuducos

TODO

  • Update tests

Using docker, I always get ok from the tests, even when I break them.

Without docker, I get this error:

ERROR: chamber_of_deputies (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: chamber_of_deputies
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/loader.py", line 462, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/rosie/chamber_of_deputies/__init__.py", line 1, in <module>
    from rosie.chamber_of_deputies import settings
  File "/rosie/chamber_of_deputies/__init__.py", line 2, in <module>
    from rosie.chamber_of_deputies.adapter import Adapter
  File "/rosie/chamber_of_deputies/adapter.py", line 6, in <module>
    from serenata_toolbox.chamber_of_deputies.dataset import Dataset
  File "/usr/lib/python3.6/site-packages/serenata_toolbox/chamber_of_deputies/dataset.py", line 9, in <module>
    from .reimbursements import AVAILABLE_YEARS, Reimbursements
  File "/usr/lib/python3.6/site-packages/serenata_toolbox/chamber_of_deputies/reimbursements.py", line 8, in <module>
    from serenata_toolbox import log
ImportError: cannot import name 'log'

@giovanisleite giovanisleite changed the title Giovani update subquota limits Giovani update subquota limits [WIP] Dec 6, 2017
@giovanisleite giovanisleite changed the title Giovani update subquota limits [WIP] Giovani update subquota limits Dec 6, 2017
@giovanisleite giovanisleite changed the title Giovani update subquota limits update subquota limits Dec 7, 2017
@cuducos
Copy link
Collaborator

cuducos commented Dec 7, 2017

Hey dude… probably most (if not all) CI tests error are due to a bug not related to your PR (something with the toolbox, check Issue #173 over there). In a while we update your branch and restart the CI, ok?

@anaschwendler
Copy link
Collaborator

#175 Fix that ;)
Re-runing the tests!

@giovanisleite
Copy link
Contributor Author

giovanisleite commented Dec 7, 2017

Thanks @anaschwendler and @cuducos!

Before that, There were a test expecting true when exactly on the limit and I changed to false. The test was getting ok because it was testing for the wrong limit. Just for checking, there isn't the intention of classifying exactly on the limit as suspicious, right?

@anaschwendler
Copy link
Collaborator

Just for checking, there isn't the intention of classifying exactly on the limit as suspicious, right?

Yes, that's true, there is no why testing exactly on the limit, only above the limit :)

@giovanisleite
Copy link
Contributor Author

giovanisleite commented Dec 13, 2017

Yes, that's true, there is no why testing exactly on the limit, only above the limit :)

I think they are there just to ensure that only those reimbursements that go beyond the limit are considered suspect. I think the other was just lost out there

Is there anything else that I can do here?

@anaschwendler
Copy link
Collaborator

Is there anything else that I can do here?

I'll test your PR now and check if there is something more :)

@anaschwendler
Copy link
Collaborator

What I did to test this PR:

  1. Clone the project:
$ git clone git@github.com:datasciencebr/rosie.git
  1. Change to rosie's folder:
$ cd rosie
  1. Change to @giovanisleite' branch:
$ git checkout -b giovanisleite-giovani-update-subquota-limits master
$ git pull https://github.com/giovanisleite/rosie.git giovani-update-subquota-limits
  1. Run the tests:
$ docker run --rm -v /tmp/serenata-data:/tmp/serenata-data datasciencebr/rosie test

The result:

rosie git:(giovanisleite-giovani-update-subquota-limits) docker run --rm -v /tmp/serenata-data:/tmp/serenata-data datasciencebr/rosie test
Unable to find image 'datasciencebr/rosie:latest' locally
latest: Pulling from datasciencebr/rosie
b56ae66c2937: Pull complete 
9b1046dbb70f: Pull complete 
cb24e37960bd: Pull complete 
f59f9a05cb7c: Pull complete 
ba2f93753fe1: Pull complete 
29de05c8752a: Pull complete 
982a9a1a4cab: Pull complete 
Digest: sha256:7c36e0ac70b32459154e233f1503376ae50b31e4af8f6706ac229198df117fa5
Status: Downloaded newer image for datasciencebr/rosie:latest
.................................................................
----------------------------------------------------------------------
Ran 65 tests in 3.071s

OK

I took a great look at the tests and they seem to be covering very well, @cuducos said that it looks good tomorrow morning, so it is good to go! \o\

@anaschwendler anaschwendler merged commit bcbff22 into okfn-brasil:master Dec 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update chronological sub-quota limits
3 participants