Skip to content

Update the mvs parameters docs file#479

Merged
Bachibouzouk merged 21 commits intodevfrom
improve-docs
Oct 1, 2020
Merged

Update the mvs parameters docs file#479
Bachibouzouk merged 21 commits intodevfrom
improve-docs

Conversation

@mahendrark
Copy link
Copy Markdown
Contributor

@mahendrark mahendrark commented Jul 27, 2020

Addressed part of #269

Changes proposed in this pull request:

  • Update the MVS parameters page on readthedocs

The following steps were realized, as well (if applies):

  • Use in-line comments to explain your code
  • Write docstrings to your code
  • For new functionalities: Explain in readthedocs
  • Write test(s) for your new patch of code
  • Update the CHANGELOG.md
  • Apply black (black . --exclude docs/)
  • Check if benchmark tests pass locally (EXECUTE_TESTS_ON=master pytest)

Please mark above checkboxes as following:

  • Open
  • Done

❌ Check not applicable to this PR

For more information on how to contribute check the CONTRIBUTING.md.

@smartie2076
Copy link
Copy Markdown
Collaborator

Proposal: Index of parameters (alphabetical) instead of list for each energyAsset type.

Parameter

unit: kW
type: str
example: "I_am_a_string"
restrictions: None
default: None
jdsaklfjdgepuewMCLKDS98E4JFEW

@mahendrark mahendrark self-assigned this Jul 28, 2020
@mahendrark mahendrark added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 28, 2020
@smartie2076 smartie2076 marked this pull request as draft July 29, 2020 07:51
@smartie2076
Copy link
Copy Markdown
Collaborator

@mahendrark I converted this to draft, as it is not ready to be merged.

@mahendrark
Copy link
Copy Markdown
Contributor Author

@smartie2076

can you please check the parameters docs and let me know if this is how you wanted the parameters to appear ?

Copy link
Copy Markdown
Collaborator

@smartie2076 smartie2076 left a comment

Choose a reason for hiding this comment

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

You can see the compiled rst file here (updates after about 5 Minutes)

https://mvs-eland.readthedocs.io/en/improve-docs/MVS_parameters.html

Formatting stuff

Co-authored-by: smartie2076 <[email protected]>
@mahendrark
Copy link
Copy Markdown
Contributor Author

mahendrark commented Aug 10, 2020

@smartie2076

Can you tell me how to address the Common Parameters in the CSV/JSON files and in energyConversion.csv ?

Should I move them all to their respective columns or keep them as it is now?

@smartie2076
Copy link
Copy Markdown
Collaborator

Can you tell me how to address the Common Parameters in the CSV/JSON files and in energyConversion.csv ?

Should I move them all to their respective calendars or keep them as it is now?

Not sure what you mean with "calendars", but I was thinking of having an alphabetically sorted list of parameters in the file now (aka a parameter index). Another file (or in the same file in the head section) we then can simply enumerate the all inputs for each parameter group, and we add links to the respective entries in the parameter index. That way, we do not have to define a parameter multiple times.

@smartie2076
Copy link
Copy Markdown
Collaborator

Hi @mahendrark! Can you tell me how far you got with this PR? We are aiming to close all PR asap.

@mahendrark mahendrark marked this pull request as ready for review September 30, 2020 12:28
@Bachibouzouk
Copy link
Copy Markdown
Collaborator

@mahendrark do you compile locally with html make and pay attention to the warnings?

Copy link
Copy Markdown
Collaborator

@Bachibouzouk Bachibouzouk left a comment

Choose a reason for hiding this comment

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

"Parameters and Definitions in CSVs/JSON" and "Parameters in each CSV file" seems to be two different sections according to the navigation bar (see picture)
Screenshot from 2020-10-01 10-28-49

However they appear on the same page. This might be due to the incorrect use of *** for title of subsections (instead of ---)

The number of -/*/= below a subsection/chapter/section's title should always match the number of characters of the title, this is not the case

I think we could separate the different definitions using ---- (4 times exactly and line breaks before and after), this will render as an horizontal line :)

Btw, this PR claims to fix #269, but it does not address any of the two points described in the description of #269, I would remove the mention "fix" to replace it with "addresses part of" so that the issue is not closed when we merge this PR :)

@Bachibouzouk
Copy link
Copy Markdown
Collaborator

Looking at the structure of the sections in readthedocs, I think there might be improvments:

  • "Parameters and Definitions in CSVs/JSON"
  • "Parameters in each CSV file"
  • "Outputs of the MVS simulation"
    Belong to "Simulating with the MVS". I would merge "Parameters and Definitions in CSVs/JSON" and "Parameters in each CSV file" (as they are already in one file and it seems redundant section headings) and place it as a subsection of "Input files" (at the same heading level that "Csv files: csv_elements folder" and "Json file: mvs_config.json").

I would then link the csv names under "Csv files: csv_elements folder" to the "Parameters in each CSV file" section and keep the same order of csv file names.

Copy link
Copy Markdown
Collaborator

@smartie2076 smartie2076 left a comment

Choose a reason for hiding this comment

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

You need to add a changelog entry.

Just a few comments, I did not check all definitions.

You can also check the formatting here: https://mvs-eland.readthedocs.io/en/improve-docs/MVS_parameters.html#

@smartie2076
Copy link
Copy Markdown
Collaborator

  I would merge "Parameters and Definitions in CSVs/JSON" and "Parameters in each CSV file" (as they are already in one file and it seems redundant section headings) 

+1

and place it as a subsection of "Input files" (at the same heading level that "Csv files: csv_elements folder" and "Json file: mvs_config.json").

+1 Eventhough the file will get really, really long. Will need to work out the correct section heads then. Maybe we also need to merge other currently seperate .rst files.

I would then link the csv names under "Csv files: csv_elements folder" to the "Parameters in each CSV file" section and keep the same order of csv file names.

I am not quite sure what you mean with that.

@Bachibouzouk
Copy link
Copy Markdown
Collaborator

and place it as a subsection of "Input files" (at the same heading level that "Csv files: csv_elements folder" and "Json file: mvs_config.json").

+1 Eventhough the file will get really, really long. Will need to work out the correct section heads then. Maybe we also need to merge other currently seperate .rst files.

We can use .. include:: <path to rst file> within a rst file to separate into more files. The section cut does not depend on splitting the content into several files (the compiler sees the whole content as one huge file) but on the section headings (we need to always know where we stand in the tableofcontent hierarchy if we use several files). For the documentation I think it is ok to have long files.

@Bachibouzouk
Copy link
Copy Markdown
Collaborator

I would then link the csv names under "Csv files: csv_elements folder" to the "Parameters in each CSV file" section and keep the same order of csv file names.

I am not quite sure what you mean with that.

Under the section heading "Simulating with the MVS/Input files/Csv files: csv_elements folder" we list the csv files in csv_element folder. We also do so in "Parameters in each CSV file", but not with the same order. I would go for alphabetical order as it is displayed in the input_template/csv_elements folder

@mahendrark
Copy link
Copy Markdown
Contributor Author

mahendrark commented Oct 1, 2020

@mahendrark do you compile locally with html make and pay attention to the warnings?

Yes, there are 18 warnings that not related to the code in the file that I am working on.

For example:

No module named 'mvs_eland.utils'
WARNING: autodoc: failed to import module 'E3_indicator_calculation' from module 'mvs_eland'; the following exception was raised:
No module named 'mvs_eland.utils'
WARNING: autodoc: failed to import module 'E4_verification_of_constraints' from module 'mvs_eland'; the following exception was raised:
No module named 'mvs_eland.utils'
WARNING: autodoc: failed to import module 'F0_output' from module 'mvs_eland'; the following exception was raised:
No module named 'mvs_eland.utils'
WARNING: autodoc: failed to import module 'F1_plotting' from module 'mvs_eland'; the following exception was raised:
No module named 'mvs_eland.utils'

@smartie2076

@mahendrark
Copy link
Copy Markdown
Contributor Author

+1 Eventhough the file will get really, really long. Will need to work out the correct section heads then. Maybe we also need to merge other currently seperate .rst files.

I think this should be done in another PR since this one only addresses the parameters of MVS and not broader documentation.

@mahendrark mahendrark requested a review from smartie2076 October 1, 2020 11:13
@smartie2076
Copy link
Copy Markdown
Collaborator

@Bachibouzouk if you think the file is correct from the sphinx viewpoint, I would say we merge it and I fix the definitions if necessary in a new PR. Can you check the latest commits?

:Type: Numeric
:Unit: currency
:Example: 10000
:Restrictions: Positive real numbers
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:Restrictions: Positive real numbers
:Restrictions: Positive real number

**cost_om**: Specific annual OPEX of the asset (€/kW/year)
:Definition: Stands for Demand Side Management. Currently, not implemented.
:Type: str
:Unit: Boolean value
Copy link
Copy Markdown
Collaborator

@Bachibouzouk Bachibouzouk Oct 1, 2020

Choose a reason for hiding this comment

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

@smartie2076
I find the fields describing a parameter would require a definition and a list of possible values as well. It is hard to understand what is a :Unit: in this example:
What is a Boolean value as a :Unit:. Shouln't :Type: be boolean and :Unit: be None?

**energyVector**: Energy commodity. E.g.: Electricity, heat, bio-gas, etc.
:Definition: Ratio of energy output/energy input. The battery efficiency is the ratio of the energy taken out from the battery, to the energy put in the battery. It means that it is not possible to retrieve as much energy as provided to the battery due to the discharge losses. The efficiency of the "input power" and "ouput power" columns should be set equal to the charge and dischage efficiencies respectively, while the "storage capacity" efficiency should be equal to the storage self-discharge/decay, which is usually in the range of 0 to 0.05.
:Type: Numeric
:Unit: Factor
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same remark here, how Factor is a unit comparable to kW ? Shouldn't the :Type: be factor?

:Type: Numeric
:Unit: Days
:Example: 365
:Restrictions: None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:Restrictions: None
:Restrictions: Positive integer number

:Type: Numeric
:Unit: Year
:Example: 30
:Restrictions: None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:Restrictions: None
:Restrictions: Positive integer number

Copy link
Copy Markdown
Collaborator

@Bachibouzouk Bachibouzouk left a comment

Choose a reason for hiding this comment

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

@mahendrark, @smartie2076 :
This PR is about inserting the references, the definition and correct units linked each parameter should be reviewed into a separate PR (created issue #586 for this), we can ignore my suggestion and merge

@Bachibouzouk Bachibouzouk merged commit 3f4835f into dev Oct 1, 2020
@Bachibouzouk Bachibouzouk deleted the improve-docs branch October 1, 2020 16:27
@Bachibouzouk Bachibouzouk mentioned this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants