Skip to content

Fix get_series_list - #257

Merged
tgrandje merged 5 commits into
InseeFrLab:masterfrom
tfardet:fix-demand-touristic
Mar 6, 2025
Merged

tgrandje merged 5 commits into
InseeFrLab:masterfrom
tfardet:fix-demand-touristic

Conversation

@tfardet

@tfardet tfardet commented Feb 28, 2025 •

Copy link
Copy Markdown
Collaborator

This fixes #201

I also took the opportunity to refactor the imports and group functions that we doing similar things or were not used anywhere else into single files.

The main changes are:

  • in pynsee/macrodata/_get_dimensions (which now contains both _get_dataset_dimension and _get_dimension_values to reduce code duplication)
  • in pynsee/macrodata/_download_idbanks (that contains all idbanks-related stuff since they were only used internally by _download_idbank_list)
  • in pynsee/macrodata/_get_metadata (which now contains both _get_dataset_metadata and _get_dataset_metadata_core that was only used internally)

Once this is merged, I would propose to make a bugfix release with a fix for #255 at the same time if that's OK with you, @tgrandje and @hadrilec

@tfardet tfardet added the bugfix Fixes a bug label Feb 28, 2025

@tgrandje tgrandje left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments, but this is mostly ok for me!

Comment thread pynsee/macrodata/_download_idbanks.py Resolved
Comment thread pynsee/macrodata/_download_idbanks.py Resolved
Comment on lines +21 to +33
INSEE_sdmx_link_datastructure = (
"https://bdm.insee.fr/series/sdmx/datastructure/FR1"
)
INSEE_api_link_datastructure = (
"https://api.insee.fr/series/BDM/V1/datastructure/FR1"
)

INSEE_sdmx_link_datastructure_dataset = (
INSEE_sdmx_link_datastructure + "/" + dataset
)
INSEE_api_link_datastructure_dataset = (
INSEE_api_link_datastructure + "/" + dataset
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move the 2 first statements to pure constants outside the function (maybe even move to constants.py) and reset to lower case for the two variables later on?

EDIT : no, I see there are still too many constants of that style, we should move all of those in a different PR or not at all. I let this comment for memory's sake.

Comment thread pynsee/macrodata/_download_idbanks.py Resolved
@tgrandje
tgrandje merged commit 17467ad into InseeFrLab:master Mar 6, 2025
tfardet added a commit to tfardet/pynsee that referenced this pull request May 11, 2025
* Refactor macrodata

Signed-off-by: Tanguy Fardet <[email protected]>
Former-commit-id: 17467ad
@tfardet
tfardet deleted the fix-demand-touristic branch May 11, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistency between column names and content for SUIVI-DEMANDE-TOURISTIQUE

2 participants