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

Techsub revamp #38

Merged
merged 8 commits into from
Feb 27, 2023
Merged

Techsub revamp #38

merged 8 commits into from
Feb 27, 2023

Conversation

samgdotson
Copy link
Collaborator

@samgdotson samgdotson commented Feb 23, 2023

This PR

  • reduces the amount of code repetition by employing *args and **kwargs
  • adds new technology data such as land_intensity and co2_rate.
  • allows users to pass time series data for some attributes (e.g., fuel cost and operating costs)
  • validate_quantity now handles array_types as well as constant_types.
  • adds tests to cover new features (in particular array-like data handling).

@samgdotson samgdotson added Comp:Core This issue has to do with the main bulk of the code or document. (methods, main content) Difficulty:2-Challenging This issue may be complex or require specialized skills. Priority:1-Critical This is the highest priority (i.e. it is blocking other work or facing a deadline). Status:5-In Review This issue has been handled, and the solution is being reviewed. (probably as a PR) Type:Style Is related to coding style guide compliance (e.g. PEP8 or google C++ style guide). labels Feb 23, 2023
@samgdotson samgdotson self-assigned this Feb 23, 2023
@samgdotson samgdotson mentioned this pull request Feb 23, 2023
Copy link
Contributor

@abachma2 abachma2 left a comment

Choose a reason for hiding this comment

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

Hi @samgdotson! Thanks for submitting this PR. I appreciate moving some of the code into the parent class to remove repeated code. I have a few questions about parts of the code. Do you have CI set up for this repository? If you don't I will create an issue to get that up so that reviewers can see if the tests are passing.

osier/models/capacity_expansion.py Outdated Show resolved Hide resolved
osier/models/dispatch.py Outdated Show resolved Hide resolved
osier/technology.py Show resolved Hide resolved
@samgdotson
Copy link
Collaborator Author

Thanks @abachma2, I think I’ve answered your questions. The CI is performed by github actions and can be viewed under the “checks” tab.

@abachma2
Copy link
Contributor

Thanks for pointing that out. I missed the checked passed.

Copy link
Contributor

@yardasol yardasol left a comment

Choose a reason for hiding this comment

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

Hi @samgdotson, great work on this PR. I only have a couple of comments.

osier/models/capacity_expansion.py Show resolved Hide resolved
osier/models/capacity_expansion.py Outdated Show resolved Hide resolved
osier/models/dispatch.py Outdated Show resolved Hide resolved
osier/technology.py Show resolved Hide resolved
osier/technology.py Show resolved Hide resolved
Comment on lines +541 to +543
super().__init__(technology_type=technology_type,
technology_category=technology_category,
*args, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

So much cleaner! Good work!

Copy link
Contributor

@LukeSeifert LukeSeifert 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! I didn't notice any other issues, just had one minor question pop up.

osier/technology.py Show resolved Hide resolved
@samgdotson
Copy link
Collaborator Author

@yardasol @abachma2 @LukeSeifert, thanks for your comments and suggestions! I think I've addressed all of them in some capacity.

Copy link
Contributor

@abachma2 abachma2 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing our comments. Once the confusion about the power_units in osier/models/capacity_expansion.py is cleared up I will approve.

@samgdotson
Copy link
Collaborator Author

@abachma2 @yardasol you were both right about the redundancy of initializing self.power_units twice. I removed that line. You can merge at will (unless there are other issues to address).

@abachma2
Copy link
Contributor

I will approve this PR. I will let @yardasol merge when he approves it.

Copy link
Contributor

@yardasol yardasol left a comment

Choose a reason for hiding this comment

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

Good work @samgdotson

@yardasol yardasol merged commit da88fd6 into arfc:main Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp:Core This issue has to do with the main bulk of the code or document. (methods, main content) Difficulty:2-Challenging This issue may be complex or require specialized skills. Priority:1-Critical This is the highest priority (i.e. it is blocking other work or facing a deadline). Status:5-In Review This issue has been handled, and the solution is being reviewed. (probably as a PR) Type:Style Is related to coding style guide compliance (e.g. PEP8 or google C++ style guide).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants