Skip to content

Conversation

@dalonsoa
Copy link
Collaborator

@dalonsoa dalonsoa commented May 23, 2023

Description

Combines the development done by the RSE team in different fronts and individually described in:

Mostly they refer to modernising the infrastructure of MUSE and taking the steps to easy its distribution. A couple of extra issues were open as a consequence of this. See #120 , #109

Type of change

Please add a line in the relevant section of
CHANGELOG.md to
document the change (include PR #) - note reverse order of PR #s.

  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass: $ python -m pytest
  • The documentation builds and looks OK: $ python setup.py build_sphinx

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

TinyMarsh and others added 30 commits May 19, 2023 10:42
Co-authored-by: Diego Alonso Álvarez <[email protected]>
Co-authored-by: Diego Alonso Álvarez <[email protected]>
Co-authored-by: Diego Alonso Álvarez <[email protected]>
Co-authored-by: Diego Alonso Álvarez <[email protected]>
Add entrypoint (via muse_main) to pyproject.toml
Added GitHub workflow to check for broken links
Copy link
Collaborator

Choose a reason for hiding this comment

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

python setup.py build_sphinx
is not working anymore

Copy link
Collaborator

@sgiarols sgiarols left a comment

Choose a reason for hiding this comment

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

It looks good. I have a few points to comment on

  • the command on creating the documentation is not working anymore nor it does the command on the PR template python setup.py build_sphinx
  • the README file should be updated on the use of the "muse" command rather than reporting just python -m muse ...
  • fullsim[trade] fails on my laptop (MACOS, python version 3.9.0). I could see that the server does not use xlrd-1.2.0 (which I have) whereas the server environment uses more packages (
    alabaster-0.7.13 ;
    babel-2.12.1 ;
    certifi-2023.5.7 ;
    charset-normalizer-3.1.0 ;
    docutils-0.18.1 ;
    et-xmlfile-1.1.0 ;
    imagesize-1.4.1 ;
    latexcodec-2.0.1 ;
    markdown-it-py-2.2.0 ;
    mdit-py-plugins-0.3.5 ;
    mdurl-0.1.2 ;
    myst-parser-1.0.0 ;
    nbsphinx-0.9.1 ;
    openpyxl-3.1.2 ;
    pandoc-2.3 ;
    plumbum-1.8.1 ;
    ply-3.11 ;
    pybtex-0.24.0 ;
    pybtex-docutils-1.0.2 ;
    requests-2.31.0 ;
    snowballstemmer-2.2.0 ;
    sphinx-5.0.2 ;
    sphinxcontrib-applehelp-1.0.4 ;
    sphinxcontrib-bibtex-2.5.0 ;
    sphinxcontrib-devhelp-1.0.2 ;
    sphinxcontrib-htmlhelp-2.0.1 ;
    sphinxcontrib-jsmath-1.0.1 ;
    sphinxcontrib-qthelp-1.0.3 ;
    sphinxcontrib-serializinghtml-1.1.5 ;
    urllib3-2.0.2 )

Uploading Screenshot 2023-05-23 at 22.51.20.png…

Regarding the broken links in the documentation, there are many which do not seem real errors. For example:

Shall we tweak a bit this error function to reduce the errors to the actual ones before updating the documentation?

@dalonsoa
Copy link
Collaborator Author

fullsim[trade] fails on my laptop (MACOS, python version 3.9.0). I could see that the server does not use xlrd-1.2.0 (which I have) whereas the server environment uses more packages...

@sgiarols , could you open an issue explaining how you have run that model, error message and package versions you are using. Otherwise it is rather difficult to isolate and figure out the problem.

@dalonsoa
Copy link
Collaborator Author

Building the documentation has been fixed in 4cf01e8

The old way of doing it, python setup.py build_sphinx, is deprecated and Sphinx itself does not support static configuration files - it was able to use it before via setup.py. That's not really an issue as all the information was already in docs/conf.py, so it was redundant, anyway.

I have updated the README and the pull request template to indicate the correct way of building the documentation.

@dalonsoa
Copy link
Collaborator Author

About the broken links:

  • If a link to an external website fails because that website is not working, it might be just a glitch and it will work again at some point or it might be truly that the URL to the external website is no longer correct. Then is a problem in MUSE documentation and that link should be updated. For example https://www.anaconda.com/what-is-anaconda/ really does not exist and needs to be updated. Also, for papers you should use proper DOIs rather than URLs, so https://www.sciencedirect.com/science/article/pii/S0306261920308072 should be included as https://doi.org/10.1016/j.apenergy.2020.115295, which is guaranteed to exist (by the definition of DOI, as far as I can tell).
  • The internal links are also related to locations that do not exist. For example, if you go to https://muse-os.readthedocs.io/en/latest/source/muse.outputs.html#muse.outputs.YearlyAggregate, it indeed open the page, but does not go to the tag #muse.outputs.YearlyAggregate, as required, because that tag does not exist. What does exist is #muse.outputs.sinks.YearlyAggregate. I guess that at some point the location of that class was changed, but the documentation was not. And the same with the others.

So, I don't see why they should not be flagged as errors.

About the errors related to missing files I'm not totally sure what you mean. Could you elaborate?

I'm going to investigate the options of the tool to see if it can tell us where the broken link is located, not just that there is a broken link, which will make sorting them out much easier.

@dalonsoa
Copy link
Collaborator Author

It is not possible to report the location of the broken link, at the moment. I've created an issue in their repo to see if that can be added. For now, we need to review the documentation manually - using the search function in VSCode, obviously.

@dalonsoa
Copy link
Collaborator Author

About updating the way of using MUSE in the readme, I will do it once we have finish #106 , so we provide an even simpler way of doing things. For now, the existing instructions are still valid.

@dalonsoa dalonsoa requested a review from sgiarols May 26, 2023 09:20
@dalonsoa
Copy link
Collaborator Author

@sgiarols , I've added the automatic deployment of MUSE to PyPI. It has taken a few attempts to get the configuration right, but it is working, now. The instructions in the README will not work until we push a new tag to PyPI - for now, it is only in TestPyPI, which is not fit for production, only for testing, as the name suggests.

I will clean the history and clear the tags once you have reviewed and approved the PR - but before merging - and we will make a proper release as MUSE 1.1.0 once this PR is merged.

dalonsoa added 2 commits May 27, 2023 09:52
:wip: trigger publishing from develop_imperial branch

:wip: fine tune publishing

Bump version: 1.0.1 → 1.0.2

Run workflow when pushing tags

Bump version: 1.0.2 → 1.0.3

:wip: fine tune publishing - again

Bump version: 1.0.3 → 1.0.4

Bump version: 1.0.4 → 1.0.5

:wip: fine tune publishing - again2

Bump version: 1.0.5 → 1.0.6

:wip: fine tune publishing - again3

Bump version: 1.0.6 → 1.0.7

:wip: fine tune publishing - again4

Bump version: 1.0.7 → 1.0.8

:wip: fine tune publishing - again5

Bump version: 1.0.8 → 1.0.9

:wip: fine tune publishing - withou environment

Bump version: 1.0.9 → 1.0.10

:wip: fine tune publishing - building package

Bump version: 1.0.10 → 1.0.11

:wip: fine tune publishing - why artifacts not uploaded?

Bump version: 1.0.11 → 1.0.12

Fix intended audience

Bump version: 1.0.12 → 1.0.13

GitHub repos removed from pyproject.toml

Bump version: 1.0.13 → 1.0.14

Rename MUSE as MUSE_OS in pyproject.toml

Bump version: 1.0.14 → 1.0.15

Update CI to deploy to PyPI
@dalonsoa dalonsoa force-pushed the develop_imperial branch from 8e524b5 to 68791ec Compare May 27, 2023 08:54
@dalonsoa
Copy link
Collaborator Author

@sgiarols , I've clean the history and removed the unnecessary tags, so this is ready for merging.

@sgiarols
Copy link
Collaborator

fullsim[trade] fails on my laptop (MACOS, python version 3.9.0). I could see that the server does not use xlrd-1.2.0 (which I have) whereas the server environment uses more packages...

@sgiarols , could you open an issue explaining how you have run that model, error message and package versions you are using. Otherwise it is rather difficult to isolate and figure out the problem.

done here #127

@sgiarols sgiarols merged commit b33342e into develop May 31, 2023
@sgiarols sgiarols deleted the develop_imperial branch May 31, 2023 13:51
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.

6 participants