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

[2492] Add new page to document installation methods #3941

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

takoman-mg
Copy link

@takoman-mg takoman-mg commented Oct 12, 2023

Description

Based on the comments in #2492 , I've made the following documentation additions:

  1. Added a new page 'Ways to install Black' under Usage and Configuration
  2. Linked to it in the Getting Started page
  3. Added entry in the index under Usage and Configuration

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Can't hurt to outline all the ways to do this on a page. I feel you missed some links and just offering some suggestions.


## Install from PyPI

To install the latest release of _Black_ from [PyPI] (Requires Python 3.8+), use:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can link to the pyproject.toml directive here to avoid having yet another place to upgrade when we move to requiring >= 3.9 - All for ideas here but can live with it if it's to hard ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm checking if this can be done via tomli and Sphinx configuration somehow.

performance, compiled using [mypyc]

By default, `pip` will prefer a compatible wheel and revert to the source distribution
if no such wheels are found, as outlined in [Python documentation].
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if no such wheels are found, as outlined in [Python documentation].
if no such wheels are found, as outlined in [Python documentation](LINK).

Did you forget the link?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The links were all declared at the end of the page, similar to other pages in the documentation. I've changed all of them to avoid confusion.

Comment on lines 24 to 26
To install the latest version of _Black_ from GitHub, use:

`pip install git+https://github.com/psf/black`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To install the latest version of _Black_ from GitHub, use:
`pip install git+https://github.com/psf/black`
To install the latest version of _Black_ from GitHub, use:
`pip install git+https://github.com/psf/black`
- This will install from the latest commit from `main` branch

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 36 to 37
Official _Black_ Docker images are available on [Docker Hub]. For more information,
check the [Black Docker image] section.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Official _Black_ Docker images are available on [Docker Hub]. For more information,
check the [Black Docker image] section.
Official _Black_ Docker images are available on [Docker Hub](https://hub.docker.com/r/pyfound/black). For more information,
check the [Black Docker image](LINK_TO_PAGE) page.
- `docker run --rm --volume $(pwd):/src --workdir /src pyfound/black:latest_release black --check .`

Command example optional but I think we should fix the link to make this page more useful.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left out the command example because it's already present in the Black Docker page, can add it if required.


To install the latest release of _Black_ from [PyPI] (Requires Python 3.8+), use:

`pip install black`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O - Just thought of it - Please talk about all black's optional installs in this section too, please.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, please check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants