-
Notifications
You must be signed in to change notification settings - Fork 30
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
docs: document the option of installing with virtual environments #2060
docs: document the option of installing with virtual environments #2060
Conversation
I am aware that I have broken |
206fe69
to
f381789
Compare
|
f381789
to
4da3b72
Compare
I have re-evaluated this and learned more about using |
Hmm, I am noticing one more thing: I mistakenly forgot to update the EDIT: Just tried it. Although it does indeed update the
Is this desirable? |
Hey @nogjam , thanks for reviewing this setup step and contributing a possible improvement. Before implementing the current solution, I had definitely tried doing the setup your way, but I encountered a limitation of Could you confirm that this problem indeed exists and suggest a possible workaround? Thanks for looking into this. I am all in for simpler solutions. |
Hmm, I thought only
Could you please clarify and/or provide an example of this undesirable behavior? |
Here's some more information from https://setuptools.pypa.io/en/latest/userguide/development_mode.html:
Is the kind of problem you're thinking of something that |
The kind of problem I am referring to is when the source files will be at least partially read from the installed However, if you start working with the source code of StrictDoc, you will quickly notice that some/all of the files will be taken from the installed Pip, and so your developer experience will not be as you want it to be.
The custom script that your MR is trying to remove only installs StrictDoc's dependencies and nothing else whereas even in the "editable installation" mode pip install still behaves like a strictdoc installer. For example, if I test on CI, I want to test the source code by only installing the dependencies but not the Pip itself. Just to make sure: is this I would be open to removing this script if there was a good replacement but |
Ah thanks, I think I understand now. So we don't want to install the project as it exists on PyPI, but we do want to install the project as it currently exists in the source code. In this case, both They both install the project from source code; the difference is, From https://setuptools.pypa.io/en/latest/userguide/development_mode.html:
So To answer you question about whether it's getting in my way: I'm pretty new to StrictDoc and getting spun up on it at work for some specs/requirements we're working on. (We are impressed, btw. This is a very nice tool and will save us a ton of time. Thank you for your work on it!) We will likely bring more people up to speed in the near future, and I have that in mind as I'm getting started. The custom install script was not intuitive to me, a bit of a sticking point since I'm used to |
4da3b72
to
ecdd93e
Compare
First of all, a general comment: I do understand how
Not exactly :) I don't want to install the project at all when it comes to development. In the development mode, I want to work directly with the
If you are 100% sure, working with I personally don't care much about the virtual environments when I run strictdoc because I have a multitude of Python versions with pyenv. At the same time, a separate sections suggesting to always work with a venv is fine for me as an option. I prefer to have StrictDoc's development dependencies installed and then call Let me know if updating a doc with a dedicated section for virtual environments would make be a good solution. Updated later: Suggestion:
Add this and explain your preferred approach:
|
Thanks for your detailed explanation! Sounds like there may be deep waters here I do not yet fathom, but may understand better with time if I continue working with StrictDoc and other tools like pyenv (which I'm not familiar with). I also appreciate the insight on StrictDoc's history with Poetry, presumably in response to my comment here. I too have been frustrated by some of Poetry's dependency issues in the past. Presently, I am a Poetry fan, it works well for me, and I share the concerns of others in the Python community around uv's sustainability outlook, esp it not being written in Python. But I'm not opposed to trying something new and would love to be wrong about my concerns. I like your suggestion to simply extend the docs. I'd be happy to update this PR to that end! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Revert all the code changes and adjust changes to documentation.
Sounds good. I will also have an eye on improving these setup steps if I see a good opportunity.
Yes, just updating the docs is good for this round. Regarding your other comment regarding also updating the corresponding RST file. The Sphinx website used to be the default documentation website but not anymore. We have recently migrated to host the native SDoc docs on readthedocs, and the Sphinx website will probably be deprecated or removed very soon. Don't regenerate the docs with this MR, just the .sdoc change is enough. (I am not decided yet on whether to keep the Sphinx one just as a working example of the SDoc->RST export feature or delete it for good.) |
ecdd93e
to
87fb417
Compare
We should be good to go! (I'm a bit new to GitHub pull requests. Not sure if there's a better way to block merge based on pending tasks.) |
Can close #2058 when merged. |
Thanks! I also renamed the PR title to better reflect the final change. |
pip_install_strictdoc_deps.py requires a manual pip install of the toml module before it works with a fresh virtual environment. We can achieve a working installation much easier with a virtual environment (which is better practice anyway) and pip. This begs the question of whether this script is needed at all. Delete it, and make the corresponding updates to the Dev Guide and tox.ini.