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

Update and simplify README installation instructions #205

Open
zkamvar opened this issue Oct 31, 2024 · 7 comments
Open

Update and simplify README installation instructions #205

zkamvar opened this issue Oct 31, 2024 · 7 comments
Labels
documentation Improvements or additions to documentation

Comments

@zkamvar
Copy link
Member

zkamvar commented Oct 31, 2024

At the moment, the readme is not quite accurate:

  • We do not use a Jupyter book theme, we use the sphinx book theme
  • Installation individual packages to the global python environment is frowned upon in the Python world (so I understand). We should provide instructions to set up a virtual environment
  • Since it ensh*ttified, we should no longer recommend conda for setting up python. We should probably just move to recommending uv (but maybe this is to @bsweger's chagrin).
@bsweger
Copy link
Contributor

bsweger commented Oct 31, 2024

Nah, we had talked a while back (on a dev call, I think) about using uv for the hubDocs project.

I completely agree that it is appropriate to yeet conda into the sun.

@micokoch
Copy link
Contributor

micokoch commented Nov 6, 2024

I don't know exactly how the installation instructions have changed, but to build it locally, in addition to the steps listed in the README, I had to do the following:
pip install sphinx_design
pip install sphinxcontrib.mermaid
That should also be mentioned (unless there is a different step).

@zkamvar
Copy link
Member Author

zkamvar commented Nov 6, 2024

Ideally, you shouldn't have to pip install every single package. The way to do it IIRC is (@bsweger please correct me if I am mistaken)

python -m venv .venv # set up a virtual environment
source .venv/bin/activate # activate it in your local session
pip install -r docs/requirements.txt # install the requirements into the virtual environment

Then every time you come back to the project, you can run source .venv/bin/activate when you want to work on it.

@micokoch
Copy link
Contributor

micokoch commented Nov 6, 2024

Thanks @zkamvar ! That is all very helpful. I have a couple of comments:

  1. The first instructions in the README should include the most straightforward installation. That is what I usually use, following the ## Installation and building steps. In these, there is no requirement for a virtual environment. Also, now there is a need to install sphinx_design and sphinxcontrib.mermaid separately if one only follows those steps.
  2. Those first steps should include the pip install -r docs/requirements.txt even if you don't use a virtual environment.
  3. I should note that I encountered error messages when running pip install -r docs/requirements.txt without a virtual environment (a problem with myst-parser==4.0.0) and with the virtual environment (a problem with numpy==1.21.2). Neither of these problems seemed important, as the site was built anyway, but I mention them in case they are important.
  4. One matter that caused me tremendous headaches when I just started using Python, so it probably should be clarified from the start, is that you may need to write python or python3 in the commands you mention. Without the virtual environment, I had to write python3, which was needed to create the virtual environment. In the virtual environment, I only needed to write python. This is in spite of the fact that both use the same version of Python.
  5. I would usually volunteer to edit the README, but I don't understand all of this enough to write good instructions.

Thanks for looking into this.

@micokoch micokoch added the documentation Improvements or additions to documentation label Nov 6, 2024
@zkamvar
Copy link
Member Author

zkamvar commented Nov 6, 2024

5. I would usually volunteer to edit the README, but I don't understand all of this enough to write good instructions.

Completely understandable! A lot of this is the reason why https://xkcd.com/1987/ exists.

@annakrystalli
Copy link
Member

annakrystalli commented Dec 17, 2024

While I'm fully for simplifying to a single instruction and moving to uv, we do provide instructions to set up a virtual environment: https://github.com/hubverse-org/hubDocs?tab=readme-ov-file#create-environment-and-install-dependencies

@zkamvar
Copy link
Member Author

zkamvar commented Dec 18, 2024

While I'm fully for simplifying to a single instruction and moving to uv, we do provide instructions to set up a virtual environment: https://github.com/hubverse-org/hubDocs?tab=readme-ov-file#create-environment-and-install-dependencies

Ah yes, but see my previous comment about conda:

Since it ensh*ttified, we should no longer recommend conda for setting up python.

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
Projects
Status: Todo
Development

No branches or pull requests

4 participants