InseeFrLab / pynsee

pynsee package contains tools to easily search and download french data from INSEE and IGN APIs
https://pynsee.readthedocs.io/en/latest/
MIT License
67 stars 8 forks source link

Support range patterns of SIRENE API #166

Closed tfardet closed 1 year ago

tfardet commented 1 year ago

Fixes #165 by supporting the [X TO Y] and {X TO Y} patterns (cf. doc).

NB: I used \w for the pattern matching, not sure whether we need to support special characters, let me know if it should be something else, or even ..

codecov-commenter commented 1 year ago

Codecov Report

Merging #166 (a3ffa5a) into master (6657801) will decrease coverage by 26.47%. The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           master     #166       +/-   ##
===========================================
- Coverage   92.38%   65.92%   -26.47%     
===========================================
  Files         118      118               
  Lines        3942     3903       -39     
===========================================
- Hits         3642     2573     -1069     
- Misses        300     1330     +1030     
Files Changed Coverage Δ
pynsee/sirene/search_sirene.py 94.87% <100.00%> (-0.13%) :arrow_down:

... and 71 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

hadrilec commented 1 year ago

is this PR finalised, can I merge it?

tfardet commented 1 year ago

@hadrilec there's just the question of special characters: if we need to support anything other than a-z, A-Z, 0-9 and _, then I need to make some changes; otherwise we're good to go. This requires more in-depth knowledge about the content of the SIRENE database than what I possess, hence my question.

hadrilec commented 1 year ago

ok then I think it is fine, I dont think the data will include special characters. If it still happens I guess a user might raise a new issue later on.