okfn-brasil / serenata-toolbox

📦 pip module containing code shared across Serenata de Amor's projects | ** Este repositório não recebe atualizações frequentes **
MIT License
154 stars 69 forks source link

Pinned the columns to write on method save #222

Closed sergiomario closed 4 years ago

sergiomario commented 4 years ago

What is the purpose of this Pull Request? This Pull Request has the purpose fixing the columns that will be saved in the csv, containing the reimbursements. To avoid type problems with unmapped columns. This is currently happening with a column named cpf, included in the chamber of deputies database. This is generating a Type Error in the reimbursements update routine.

What was done to achieve this purpose? An adjustment was made to the csv generation method to include only the columns specified in the serenata toolbox. The column argument containing a sequence with the values.

How to test if it really works? Command pipenv run ansible-playbook update.yml -vv

Who can help reviewing it? @cuducos <3

cuducos commented 4 years ago

Minor comment:

  1. As the CI says, we need to update tests. This line must include the new columns keyword argument.
    1. Also, if we do the version bump, the CI publishes the new version to PyPI on merge ; )

In the next hours, I'll run it and check the resulting CSV. I'll post here again soon.

sergiomario commented 4 years ago

@cuducos After your approval here, I will check the update on PyPI