Update download method of SIA data for PA
Currently, DBC files of SIA data for PA have prefixes a,b and c. The following image show that:

So, the download method pysus.online_data.SIA.download( estado, ano, mes ) is outdated.
@alfonso777 how do you suggest he handle these variants? Currently I don't have the time to inspect these datafiles.
Hello guys, I would like to try to contribute here. If possible, I can create the PR with the code suggestion.
My suggestion would be changing download() function inside pysus/online_data/SIA.py.
A small draft from solution:
- transform lines 107-118 into a function wich receives file name as parameter;
- try to read() with the current filename format 2.1 in case of success handle with the same code; 2.2 in case of error, handle exception of file not found (or not available) into FTP and start a loop appending letters (a, b, c ....) to the filename until a file not found exception occurs; 2.3. for each file returned in 2.2, append the content to the same parquet file.
We can also check if exceptions raised by ftp.retrbinary(), inside _fetch_file() function, helps to differentiate between different scenarios.
:tada: This issue has been resolved in version 0.10.1 :tada:
The release is available on:
-
0.10.1 - GitHub release
Your semantic-release bot :package::rocket: