Comments (11)
I can think now in two ways:
-
I would isolate the integration point, in this case is fetch and unit test translate and clean with a mocked example files.
-
In a second way I would unit test the three steps using mock while transform the integration test into a journey test, that should test this workflow without any mocks and let it run in Travis CI.
from serenata-toolbox.
cc @lipemorais
from serenata-toolbox.
this is against TDD, but
In Brazilian Portuguese TDD means teste depois do deploy, right?
from serenata-toolbox.
Hey!
Do we consider it half done with the PR #68, now it should be done for CEAP also.
from serenata-toolbox.
Notes by @lipemorais in #53 about def __translate_file(self, csv_path)
:
This internal method looks a little big, could we break it to make the parts smaller and more meaningful and clear?
At this line looks that is a translation from portuguese to english but it's changing state of categories variable here. It is making this code more complex than it could be. :/
May it could be done in a function just to give it a name and help with clarity.
Show all reviewers
(this last comment about line 93)
from serenata-toolbox.
I'm working on it. :)
from serenata-toolbox.
Probably next week I can handle that. If anyone wants to pair on that, drop a line saying day/time it could work for you.
from serenata-toolbox.
We we're thinking about testing:
- Check the translations
- The
clean()
method unify all the senate datasets, maybe test if the reimbursements are getting concatenated (this is against TDD, but ¯_(ツ)_/¯ ) - The
fetch()
method does not check if the senate website is available to fetch the datasets, maybe test it or implement something should be good :)
from serenata-toolbox.
I'm run the tests and I just realized one thing, because it's taking more time than I expect.
Test this PR would even easier with unit tests. Just fetch needs integration, translate and clean could use only use unit test with a example files. :/
from serenata-toolbox.
@lipemorais Yes, I was talking about that tests taking so long to run yesterday in your daily meeting, and I didn't know what to do, do you have any suggestion for us? Something like a light or something? I really doesn't know what to do :T
I just really tested what I wanted to do, and didn't know how to properly refactor it
from serenata-toolbox.
Ok, I'll close it ;)
from serenata-toolbox.
Related Issues (20)
- [Question] New contributors HOT 4
- Access denied when executing example on README
- Failing to import "log" HOT 2
- Rename .xz to .csv.xz HOT 3
- Cannot download the datasets HOT 1
- Problem when downloading datasets from our servers HOT 3
- Is there a data dictionary for the chamber of deputies reimbursements? HOT 3
- Error trying to download 2016-08-08-datasets-format.html
- function test_download_no_file() duplicated HOT 1
- Dataset checksum and avoid download duplicate HOT 3
- Add checksum file of datasets to the bucket HOT 4
- Process datasets with Dask
- serenata-toolbox cli HOT 1
- README.rst broken links related to generating datasets HOT 5
- Config file for downloading datasets HOT 1
- Cannot use ChamberDataset() to download data HOT 7
- Error: SSL: CERTIFICATE_VERIFY_FAILED HOT 2
- Where do the datasets download? HOT 4
- Run tox tests in TravicCI HOT 3
- We need to catch an HTTP error early in new years HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serenata-toolbox.