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

Make poetry a prerequisite #307

Closed
4 tasks done
dgarcia360 opened this issue Jan 12, 2022 · 0 comments · Fixed by #311
Closed
4 tasks done

Make poetry a prerequisite #307

dgarcia360 opened this issue Jan 12, 2022 · 0 comments · Fixed by #311
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dgarcia360
Copy link
Collaborator

dgarcia360 commented Jan 12, 2022

Motivation

If the user does not have it installed poetry, the toolchain installs the package manager automatically using the script located in docs/_utils/setup.sh.

It's a better practice to let the user install Poetry as a prerequisite in their machine for the following reasons:

  1. The user can decide which version of poetry they want to install. We are now forcing them to choose one version, which is usually not the latest.

  2. With the latest version, the installation instructions have changed. Therefore, we should update the script in every repo.

  3. We would get rid of the docs/_utils/setup.sh script, which is sometimes different between projects depending on when they installed the toolchain.

  4. docs/_utils/setup.sh makes the documentation toolchain only compatible with UNIX systems. However, this is not compatible with other OS such as Windows.

Proposal

  • Remove the file docs/_utils/setup.sh.
  • Adapt the Makefile to not call this file.
  • Adapt the GitHub Actions workflows to install poetry.
  • List poetry as a prerequisite in the installation guide.

Before we release the change

When we open issues for each repository to migrate to 1.1, we will link to a guide where we list:

  • How to remove the current poetry installation.
  • How to install the latest poetry.
  • Which files need to be removed or adapted.
@dgarcia360 dgarcia360 added the enhancement New feature or request label Jan 12, 2022
This was referenced Jan 12, 2022
@dgarcia360 dgarcia360 added this to the 1.1 milestone Jan 12, 2022
avikivity added a commit to scylladb/scylladb that referenced this issue Feb 10, 2022
Related issue scylladb/sphinx-scylladb-theme#310

ScyllaDB Sphinx Theme 1.1 is now released 🥳

We’ve made a number of updates to update all our dependencies to the latest version and introduced new directives you can use to write great docs.

You can read more about all notable changes [here](https://sphinx-theme.scylladb.com/master/upgrade/CHANGELOG.html#february-2022).

Before,  the theme installed [poetry 1.1.x](https://python-poetry.org/) as a dependency to manage Python dependencies. However, ``poetry 1.2.x`` changed the installation method. Therefore, we've decided to [#307 Make poetry a prerequisite](scylladb/sphinx-scylladb-theme#307) so that you can decide to install the poetry version you prefer.

To preview the docs locally, you should uninstall the previous version of poetry. Then, install the latest version:

1. Uninstall Poetry 1.1.x.

```
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_UNINSTALL=1 python -
```

2. Install Poetry 1.2.x. For detailed instructions, see [Poetry installation](https://python-poetry.org/docs/master/#installation).

1. Clone this PR. For more information, see [Cloning pull requests locally](https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally).

2. Uninstall poetry 1.1 and install poetry 1.2. For more information, see **Breaking changes** notice above.

3. Enter the docs folder, and run:

```
make preview
````

4. Open http://127.0.0.1:5500/ with your favorite browser. The doc should render without errors, and the version should be Sphinx Theme version (see the footer) must be ``1.1.x``:

![image](https://user-images.githubusercontent.com/9107969/152107446-52b167d8-c607-4431-a7a4-92579153d024.png)

Closes #10054

* github.com:scylladb/scylla:
  Add missing lexer
  docs: update theme 1.1
@dgarcia360 dgarcia360 self-assigned this Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant