From ba74e98452ff992e40ef61a50e81b67fc480c47e Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Fri, 2 Apr 2021 23:42:40 +0300 Subject: [PATCH 1/4] Added troubleshooting guide to docs Signed-off-by: Shay Nehmad --- docs/troubleshooting.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docs/troubleshooting.rst diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst new file mode 100644 index 000000000..e95cd709f --- /dev/null +++ b/docs/troubleshooting.rst @@ -0,0 +1,29 @@ +=============== +Troubleshooting +=============== + +This troubleshooting guide includes common issues users have faced and tips for dealing with them. + +If you don't find answers to your problems here, be sure to check out ``betterproto``'s `Slack`! + +Upgrading betterproto in a poetry environment +============================================= + +It seems like in some situations, installing and then updating ``betterproto`` in ``poetry`` environments doesn't work. If, after updating ``betterproto``, you're not getting the new features you wanted, in might be because of the current virtual environment ``poetry`` has created. While there's probably a "surgical" fix, we've found that removing the venv and re-installing it works. + +To do that, run ``poetry env info`` to see the venv path: + +```sh +❯ poetry env info + +Virtualenv +Python: 3.8.7 +Implementation: CPython +Path: /home/username/.cache/pypoetry/virtualenvs/project-name-random-py3.8 # <-- THIS PATH +Valid: True +``` + +Then just ``rm -rf`` that path to delete the venv, and re-create the env using `poetry shell` and `poetry install`. + +.. _Slack: https://join.slack.com/t/betterproto/shared_invite/zt-f0n0uolx-iN8gBNrkPxtKHTLpG3o1OQ + From 367a0c0db109ff0a6bfb48aa1accd9054d42fdd3 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Fri, 2 Apr 2021 23:47:14 +0300 Subject: [PATCH 2/4] Ignoring vim swp files - almost committed one by accident Signed-off-by: Shay Nehmad --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 67d07686a..877c775c5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,7 @@ output .venv .asv venv + +# Ignore vim swp files +*.swp + From b222e6629b57661cad06bf9e86b55520f45aa97a Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Fri, 2 Apr 2021 23:50:36 +0300 Subject: [PATCH 3/4] Fix sphinx warnings and made code block emphasize the relevant line Signed-off-by: Shay Nehmad --- docs/index.rst | 1 + docs/troubleshooting.rst | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 3eabac147..956224c47 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -24,6 +24,7 @@ Contents: quick-start api migrating + troubleshooting If you still can't find what you're looking for, try in one of the following pages: diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index e95cd709f..05351c52d 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -13,17 +13,19 @@ It seems like in some situations, installing and then updating ``betterproto`` i To do that, run ``poetry env info`` to see the venv path: -```sh -❯ poetry env info - -Virtualenv -Python: 3.8.7 -Implementation: CPython -Path: /home/username/.cache/pypoetry/virtualenvs/project-name-random-py3.8 # <-- THIS PATH -Valid: True -``` - -Then just ``rm -rf`` that path to delete the venv, and re-create the env using `poetry shell` and `poetry install`. +.. code-block:: shell + :linenos: + :emphasize-lines: 6 + + $ poetry env info + + Virtualenv + Python: 3.8.7 + Implementation: CPython + Path: /home/username/.cache/pypoetry/virtualenvs/project-name-random-py3.8 # <-- THIS PATH + Valid: True + +Then just ``rm -rf`` that path to delete the venv, and re-create the env using ``poetry shell`` and ``poetry install``. .. _Slack: https://join.slack.com/t/betterproto/shared_invite/zt-f0n0uolx-iN8gBNrkPxtKHTLpG3o1OQ From 966637bc2ee4a475733a77f9b54f71e1ae432990 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Fri, 2 Apr 2021 23:59:30 +0300 Subject: [PATCH 4/4] Fix CI warnings Signed-off-by: Shay Nehmad --- docs/troubleshooting.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 05351c52d..8670d97a1 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -9,23 +9,26 @@ If you don't find answers to your problems here, be sure to check out ``betterpr Upgrading betterproto in a poetry environment ============================================= -It seems like in some situations, installing and then updating ``betterproto`` in ``poetry`` environments doesn't work. If, after updating ``betterproto``, you're not getting the new features you wanted, in might be because of the current virtual environment ``poetry`` has created. While there's probably a "surgical" fix, we've found that removing the venv and re-installing it works. +It seems like in some situations, installing and then updating ``betterproto`` +in ``poetry`` environments doesn't work. +If, after updating ``betterproto``, you're not getting the new features you wanted, +it might be because of the current virtual environment ``poetry`` has created. +While there's probably a "surgical" fix, we've found that removing the venv and re-installing it works. To do that, run ``poetry env info`` to see the venv path: .. code-block:: shell - :linenos: - :emphasize-lines: 6 + :emphasize-lines: 5 - $ poetry env info - + $ poetry env info Virtualenv Python: 3.8.7 Implementation: CPython Path: /home/username/.cache/pypoetry/virtualenvs/project-name-random-py3.8 # <-- THIS PATH Valid: True -Then just ``rm -rf`` that path to delete the venv, and re-create the env using ``poetry shell`` and ``poetry install``. +Then just ``rm -rf`` that path to delete the venv, +and re-create the env using ``poetry shell`` and ``poetry install``. .. _Slack: https://join.slack.com/t/betterproto/shared_invite/zt-f0n0uolx-iN8gBNrkPxtKHTLpG3o1OQ