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

Add load_dataset method to pastas #693

Merged
merged 10 commits into from
Mar 1, 2024
Merged

Add load_dataset method to pastas #693

merged 10 commits into from
Mar 1, 2024

Conversation

raoulcollenteur
Copy link
Member

@raoulcollenteur raoulcollenteur commented Feb 20, 2024

Short Description

This PR adds a load_dataset method to pastas, allowing users to load predefined test datasets from the Pastas new dataset repo (https://github.com/pastas/pastas-data/tree/main). For now, only a limited number of datasets are available, but more can be added later.

Checklist before PR can be merged:

Usage

Simple, just type:

ps.load_dataset("collenteur_2021")

@raoulcollenteur raoulcollenteur added the development Indicates development of new features label Feb 20, 2024
@raoulcollenteur raoulcollenteur added this to the 1.5 milestone Feb 20, 2024
@raoulcollenteur raoulcollenteur self-assigned this Feb 20, 2024
@raoulcollenteur raoulcollenteur marked this pull request as draft February 20, 2024 13:24
Copy link

codacy-production bot commented Feb 20, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.24% (target: +0.00%) 89.29%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6a7edc7) 5975 4458 74.61%
Head commit (8000aa3) 6055 (+80) 4532 (+74) 74.85% (+0.24%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#693) 56 50 89.29%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

@raoulcollenteur raoulcollenteur marked this pull request as ready for review February 20, 2024 15:15
@raoulcollenteur raoulcollenteur linked an issue Feb 20, 2024 that may be closed by this pull request
Copy link
Member

@dbrakenhoff dbrakenhoff 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! Simple and effective!

We can add a function to list the available datasets?

def list_datasets():
  r = requests.get(GITHUB_URL)
  return [file["name"] for file in r.json() if file["type"]=="dir"]

@raoulcollenteur raoulcollenteur removed the request for review from martinvonk March 1, 2024 15:09
@raoulcollenteur
Copy link
Member Author

I think PR is finished now and ready for review and hopefully merging. We can start adding data to the test_dataset as well if we want. I added aps.list_datasetsmethod 👍🏻

Copy link
Member

@dbrakenhoff dbrakenhoff left a comment

Choose a reason for hiding this comment

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

👍

@raoulcollenteur raoulcollenteur merged commit eeddcae into dev Mar 1, 2024
13 checks passed
@raoulcollenteur raoulcollenteur deleted the datasets branch March 1, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Indicates development of new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DEVELOPMENT] Add (synthetic) test datasets
2 participants