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

Read CSV using TulipaIO and DuckDB and create table_tree from DB #634

Merged
merged 5 commits into from
May 14, 2024

Conversation

abelsiqueira
Copy link
Member

@abelsiqueira abelsiqueira commented May 8, 2024

Pull request details

Describe the changes made in this pull request

  • Create a function that reads CSV into a DuckDB connection.
  • Create a function that reads the DuckDB tables and creates the table_tree.
  • Change function that reads from CSV to table_tree to use the functions above.
  • Rename various things to work properly with the new format.
  • Create PERIOD_TYPES global to hold the period types.

List of related issues or pull requests

Closes #629

Collaboration confirmation

As a contributor I confirm

  • I read and followed the instructions in README.dev.md
  • The documentation is up to date with the changes introduced in this Pull Request (or NA)
  • Tests are passing
  • Lint is passing

@abelsiqueira abelsiqueira added the benchmark PR only - Run benchmark on PR label May 8, 2024
Copy link
Contributor

github-actions bot commented May 8, 2024

Benchmark Results

40e326c... 71ce69f... 40e326c.../71ce69fb3c2d10...
energy_problem/create_model 0.103 ± 0.0051 h 0.103 ± 0.005 h 0.996
energy_problem/input_and_constructor 15.1 ± 1 s 12.9 ± 0.094 s 1.18
time_to_load 2.63 ± 0.01 s 2.85 ± 0.025 s 0.924
40e326c... 71ce69f... 40e326c.../71ce69fb3c2d10...
energy_problem/create_model 0.738 G allocs: 31 GB 0.738 G allocs: 31 GB 1
energy_problem/input_and_constructor 16.3 M allocs: 0.829 GB 6.39 M allocs: 0.636 GB 1.3
time_to_load 0.153 k allocs: 14.5 kB 0.153 k allocs: 14.5 kB 1

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@abelsiqueira abelsiqueira removed the benchmark PR only - Run benchmark on PR label May 8, 2024
@abelsiqueira
Copy link
Member Author

This depends on the TulipaIO release. Check back after 11/May in the afternoon.

@abelsiqueira abelsiqueira added the benchmark PR only - Run benchmark on PR label May 11, 2024
Copy link

codecov bot commented May 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9aa3270) to head (71ce69f).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #634   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines          656       691   +35     
=========================================
+ Hits           656       691   +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abelsiqueira abelsiqueira marked this pull request as ready for review May 13, 2024 10:01
@abelsiqueira abelsiqueira requested a review from suvayu May 13, 2024 11:03
Copy link
Member

@suvayu suvayu left a comment

Choose a reason for hiding this comment

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

LGTM

src/io.jl Outdated Show resolved Hide resolved
src/io.jl Show resolved Hide resolved
abelsiqueira and others added 2 commits May 14, 2024 08:14
Co-authored-by: Suvayu Ali <suvayu@users.noreply.github.com>
Co-authored-by: Suvayu Ali <suvayu@users.noreply.github.com>
@abelsiqueira abelsiqueira merged commit 292dbdd into main May 14, 2024
7 checks passed
@abelsiqueira abelsiqueira deleted the 629-tulipaio branch May 14, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark PR only - Run benchmark on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use TulipaIO instead of reading CSV
2 participants