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

Enable the use of a float value for the scale in load_options #397

Merged
merged 4 commits into from
Jul 1, 2022
Merged

Enable the use of a float value for the scale in load_options #397

merged 4 commits into from
Jul 1, 2022

Conversation

AnasAlgarei
Copy link
Collaborator

@AnasAlgarei AnasAlgarei commented Jun 30, 2022

Changes proposed in this Pull Request

The aim of the PR is to enable the use of a float value for the scale in load_options in the config file.

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and envs/environment.docs.yaml.
  • Changes in configuration options are added in all of config.default.yaml, config.tutorial.yaml, and test/config.test1.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@AnasAlgarei
Copy link
Collaborator Author

This PR is raised because I faced an error when using a float value for the scale in load_options: "typeerror: can't multiply sequence by non-int of type 'float'". The PR is a simple fix for this error where only the column of "Electricity demand" is multiplied by the float value, the other string columns are not multiplied.

@davide-f
Copy link
Member

Hey @AnasAlgarei awesome to see your first contribution.
The ci is unfortunately failing, but it is related to the fact that the config files (default tutorial and test) have not been changed according to the additional option that you proposed.
After doing that the ci should be working.

@AnasAlgarei
Copy link
Collaborator Author

Hey @AnasAlgarei awesome to see your first contribution. The ci is unfortunately failing, but it is related to the fact that the config files (default tutorial and test) have not been changed according to the additional option that you proposed. After doing that the ci should be working.

Hey @davide-f! Thanks for your reply
I understand that I should change the config files then? but the only related change in the config files is the scale, and the PR works for both a float and an integer scale. Can we discuss this in the meeting tomorrow?

@pz-max
Copy link
Member

pz-max commented Jun 30, 2022

@AnasAlgarei if you add the readme this PR is ready to merge 💯

@pz-max
Copy link
Member

pz-max commented Jul 1, 2022

@AnasAlgarei you fix here a big. Float values couldn't be used in the past. GIving a hint in the release docs would be helpful. I merge this PR anyways if the CI is successful. Congrats on your first contribution 👯

@AnasAlgarei
Copy link
Collaborator Author

@AnasAlgarei you fix here a big. Float values couldn't be used in the past. GIving a hint in the release docs would be helpful. I merge this PR anyways if the CI is successful. Congrats on your first contribution 👯

Great! Thanks for the hints @pz-max and @davide-f, I added a note in the release notes though, looking forward to future contributions 😊

@pz-max pz-max merged commit 3451789 into pypsa-meets-earth:main Jul 1, 2022
pz-max added a commit that referenced this pull request Sep 24, 2022
Enable the use of a float value for the scale in load_options
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.

None yet

3 participants