Skip to content

feat!: reimplement dtocean-economics#68

Merged
H0R5E merged 40 commits into
DTOcean:mainfrom
H0R5E:dtocean_economics
Apr 21, 2026
Merged

feat!: reimplement dtocean-economics#68
H0R5E merged 40 commits into
DTOcean:mainfrom
H0R5E:dtocean_economics

Conversation

@H0R5E

@H0R5E H0R5E commented Apr 16, 2026

Copy link
Copy Markdown
Member

This pull request reimplements the dtocean-economics code in Python 3 and incorporates it into the new plugin architecture.

The PR makes the following changes to dtocean-economics:

Added

  • Added the stats module from dtocean_core.utils
  • Added LCOE PDF confidence level plot
  • Added module interface for dtocean_core

Changed

  • Moved the functions module to the top level
  • Renamed the costs_from_bom function to add_costs_to_bom and included discounted costs in the given dataframe

Removed

  • Removed the get_combined_lcoe, get_lcoe and get_total_cost functions

Closes #57

@H0R5E H0R5E force-pushed the dtocean_economics branch from 751f471 to 93e8825 Compare April 16, 2026 14:00
@codecov

codecov Bot commented Apr 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.14530% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.08%. Comparing base (6caf5f3) to head (f269b4f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...s/dtocean-economics/src/dtocean_economics/stats.py 97.16% 4 Missing ⚠️
...-economics/src/dtocean_plugins/themes/economics.py 99.70% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   76.69%   77.08%   +0.39%     
==========================================
  Files         200      205       +5     
  Lines       32767    33352     +585     
  Branches       34       34              
==========================================
+ Hits        25131    25711     +580     
- Misses       7628     7633       +5     
  Partials        8        8              
Flag Coverage Δ
dtocean 100.00% <ø> (ø)
dtocean-app 78.25% <ø> (ø)
dtocean-core 83.87% <ø> (ø)
dtocean-docs 100.00% <ø> (ø)
dtocean-dummy-module 48.51% <ø> (ø)
dtocean-economics 99.14% <99.14%> (?)
dtocean-hydrodynamics 70.77% <ø> (ø)
dtocean-qt 78.50% <ø> (ø)
mdo-engine 76.49% <ø> (ø)
polite-config 91.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@H0R5E H0R5E force-pushed the dtocean_economics branch from cf82038 to 6307bf0 Compare April 20, 2026 12:41
H0R5E and others added 27 commits April 21, 2026 14:16
Already done:

+ Converted to Python 3
+ Converted to Poetry
+ Running tests from 3.12 to 3.14
Also add contourpy as dependency for stats module
I'm considering removing the main module entirely
and just calling the functions individually.
Requires testing
Automatically generated by python-semantic-release
Automatically generated by python-semantic-release
@H0R5E H0R5E force-pushed the dtocean_economics branch from 965b8d3 to 8ebd20e Compare April 21, 2026 13:20
@H0R5E H0R5E changed the title Reimplement dtocean-economics feat!: reimplement dtocean-economics Apr 21, 2026
@H0R5E H0R5E merged commit 8df626c into DTOcean:main Apr 21, 2026
81 checks passed
@H0R5E H0R5E deleted the dtocean_economics branch April 21, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reimplement dtocean-economics

1 participant