Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save period info to metadata model #141

Merged
merged 26 commits into from
Jan 30, 2024

Conversation

mmwinther
Copy link
Member

  • Extract the data from the file path and save it to the model when opening a new dataset.
  • Prevent exceptions when no period info present.

Ref: DPMETA-11

tilen1976 and others added 26 commits January 24, 2024 11:18
* Create class SsbDateFormat for SSB special formats with start and end months for each instance of SsbDateFormat type. Add return type SsbDateFormat on method categorize_period_string. Method get_ssb_period for handling SsDateFormat objects, return string with year and month. Change methods contains_date_from and contains_date_until to handle SsbDateFormat. Add testcases in test_dapla_dataset_path.

* Add doctests for convert_ssb_period.

* Add doctests for SSB date formats to categorize_period_string

* Add docstring for SSB date format  to contains_date_from and contains_date_until

* Correct half-year months and type hint supported_date_formats
Co-authored-by: Cecilie Seim <tilen1976@users.noreply.github.com>
Co-authored-by: Miles Mason Winther <mmwinther@users.noreply.github.com>
@mmwinther mmwinther requested a review from a team as a code owner January 30, 2024 12:21
Copy link

sonarcloud bot commented Jan 30, 2024

Copy link
Contributor

@tilen1976 tilen1976 left a comment

Choose a reason for hiding this comment

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

Looks good!

@mmwinther mmwinther merged commit 097b321 into master Jan 30, 2024
14 checks passed
@mmwinther mmwinther added the enhancement New feature or request label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants