Add updated installation instructions#138
Conversation
sgiarols
left a comment
There was a problem hiding this comment.
Here my comments.
I worked n a Windows machine and could test the procedure with pyenv and pipx on Windows.
venv did not work.
In general, I wonder whether venv is really useful as a developer may be familiar already with Anaconda and prefer to use Anaconda platform
|
|
||
| The main page for the documentation can then be found at ``docs/build/html/index.html`` and the file can viewed from any web browser. | ||
|
|
||
| Configuring VSCode |
There was a problem hiding this comment.
Can we mention editors alternative to VSCode can be used?
There was a problem hiding this comment.
Sure. If you are using a different editor, maybe you can write some instructions. The more instructions, the better!
|
|
||
| ### Recommended way | ||
| MUSE is available in `PyPI` and therefore it can be installed easily with `pip`. Detailed instructions on how to do that ensuring the right version of Python is used can be found in the Documentation. | ||
|
|
There was a problem hiding this comment.
It is fine to have the instructions only on one side to avoid repetitions. We would need a direct link to the documentation from the README file.
There was a problem hiding this comment.
In the text of the PR it is indicated that the README needs updating once this is merge. I cannot update the README until that happens.
There was a problem hiding this comment.
Oh, OK, so I misunderstood and the README would still have back again the info on the installation once the doc is updated.
There was a problem hiding this comment.
No, I think I was not clear either. The README will be short, as I have left it, but the link to the documentation in RdDs cannot be added until this is merged because there's nothing to point to (I can point to the documentation overall, but not to the specific sections of it because those have changed). Is it clearer?
|
|
||
| Creating a virtual environment with ``venv`` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
There was a problem hiding this comment.
I am a bit unsure that having venv would be useful. Compared to conda approach, it does not allow to know the decide the python version, compared to pyenv we still need to build an environment
There was a problem hiding this comment.
As a professional developer, I refuse to use conda and prefer, by a long shot, venv, so I will keep it for sure. It is way faster, despite not letting you choose the python version. conda tries to do everything and the result is pretty poor.
| In the developing phase, MUSE can also be used to run test cases to check that the model would reproduce expected results from a defined set of input data. Tests can be run with the command [pytest](https://docs.pytest.org/en/latest/), from the testing framework of the same name. | ||
|
|
||
| Within the ``MUSE-OS`` directory, just run: | ||
|
|
There was a problem hiding this comment.
We should say what needs to be checked to understand whether a user is in the MUSE-OS directory. Maybe we could have a screenshot showing the path on the command line.
There was a problem hiding this comment.
Maybe, but please let's keep in mind that we are talking about people aiming to develop MUSE. By necessity, they need to have some level of competency and know what they are doing.
| ---------------------------- | ||
|
|
||
| Developers of MUSE will need to have the version control tool ``git`` installed in their system and be familiar with its usage. The `Introduction to Git and GitHub for software development <https://imperialcollegelondon.github.io/introductory_grad_school_git_course/>`_ course created by `Imperial RSE Team <https://www.imperial.ac.uk/admin-services/ict/self-service/research-support/rcs/service-offering/research-software-engineering/>`_ can be a good place to start. | ||
|
|
There was a problem hiding this comment.
We may need the few instructions here to install git
There was a problem hiding this comment.
To be honest, if anyone wants to develop MUSE, they will need to have a bit of initiative and follow up on the resources provided. There's no point of giving everything this low level having so many excellent resources and guides out there, specially to someone who intends to become a developer. A certain level of competency on that front is to be required. But that's just my opinion.
|
|
||
| ### Recommended way | ||
| MUSE is available in `PyPI` and therefore it can be installed easily with `pip`. Detailed instructions on how to do that ensuring the right version of Python is used can be found in the Documentation. | ||
|
|
There was a problem hiding this comment.
In the text of the PR it is indicated that the README needs updating once this is merge. I cannot update the README until that happens.
| ---------------------------- | ||
|
|
||
| Developers of MUSE will need to have the version control tool ``git`` installed in their system and be familiar with its usage. The `Introduction to Git and GitHub for software development <https://imperialcollegelondon.github.io/introductory_grad_school_git_course/>`_ course created by `Imperial RSE Team <https://www.imperial.ac.uk/admin-services/ict/self-service/research-support/rcs/service-offering/research-software-engineering/>`_ can be a good place to start. | ||
|
|
There was a problem hiding this comment.
To be honest, if anyone wants to develop MUSE, they will need to have a bit of initiative and follow up on the resources provided. There's no point of giving everything this low level having so many excellent resources and guides out there, specially to someone who intends to become a developer. A certain level of competency on that front is to be required. But that's just my opinion.
| In the developing phase, MUSE can also be used to run test cases to check that the model would reproduce expected results from a defined set of input data. Tests can be run with the command [pytest](https://docs.pytest.org/en/latest/), from the testing framework of the same name. | ||
|
|
||
| Within the ``MUSE-OS`` directory, just run: | ||
|
|
There was a problem hiding this comment.
Maybe, but please let's keep in mind that we are talking about people aiming to develop MUSE. By necessity, they need to have some level of competency and know what they are doing.
|
|
||
| The main page for the documentation can then be found at ``docs/build/html/index.html`` and the file can viewed from any web browser. | ||
|
|
||
| Configuring VSCode |
There was a problem hiding this comment.
Sure. If you are using a different editor, maybe you can write some instructions. The more instructions, the better!
|
I think I've address or answered all of your comments, @sgiarols , but please let me know if there's anything that does not look right. |
Thanks. I think it all looks good. I only have two questions left.
|
|
For what I can tell, About the alias, many people will not need it - obviously not those that do not use Windows. But if you have that problem that whenever you try to run Python, you get the Microsoft Store, it will be difficult to figure out what is going on and how to fix it without some direction. I would leave it, just in case. I've follow these instructions in a MacOS and two pristine Windows computer. In one, I had the problem with the alias, but in the other I didn't, so... |
|
Indeed, it is confusing an unnerving for a new user to see a warning in a very basic example, and the explanation that wind is somehow outside the system boundaries is also confusing and reduces confidence in the model. What exactly is going on here?
A
|
# Conflicts: # docs/installing-muse.rst
…into new_installation
MUSE is saying that no process is producing wind in the current case study. We can simply address this problem in the case definition. |
| -- 2023-07-20 13:45:25 - muse.mca - INFO | ||
| Finish simulation year 2050! | ||
|
|
||
|
|
There was a problem hiding this comment.
-- 2023-08-02 09:11:50 - muse.sectors.sector - INFO
Running gas for year 2050
-- 2023-08-02 09:11:50 - muse.interactions - INFO
Net new_to_retro of 1 interactions interacting via transfer
-- 2023-08-02 09:11:50 - muse.hooks - INFO
Computing initial_asset_transform: default
-- 2023-08-02 09:11:50 - muse.hooks - INFO
Computing initial_asset_transform: clean
-- 2023-08-02 09:11:50 - muse.demand_share - INFO
Computing demand_share: default
-- 2023-08-02 09:11:51 - muse.production - INFO
Computing production: max
-- 2023-08-02 09:11:51 - muse.production - INFO
Computing production: max
-- 2023-08-02 09:11:51 - muse.production - INFO
Computing production: share
-- 2023-08-02 09:11:51 - muse.mca - INFO
Finish simulation year 2050!
There was a problem hiding this comment.
@dalonsoa , I updated screenshot of model results. This can substitute your lines.
sgiarols
left a comment
There was a problem hiding this comment.
Remembering we needed to update the model output before merging this PR
Description
Adds thorough and up-to-date installation instructions to the documentation available in Read the Docs. It also removes most of the information in the README (that needs updating one the documentation is live) so there is only one set of instructions, to avoid conflict.
Focus the review in
installation.rst. Modifying the other files are just side effects. You can find the rendered version of these instructions in https://muse-os.readthedocs.io/en/new_installation/installation.htmlFixes #133
Fixes #109
Fixes #132
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.
Key checklist
$ python -m pytest$ python -m sphinx -b html docs docs/buildFurther checks
N/A