Skip to content

Commit

Permalink
📝 Remove references to a .rst README generated by poetry new (#632)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas M. Miguel <Jonas M. Miguel>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: svlandeg <[email protected]>
Co-authored-by: Sebastián Ramírez <[email protected]>
  • Loading branch information
4 people committed Apr 7, 2024
1 parent f94b484 commit 39fc510
Showing 1 changed file with 3 additions and 58 deletions.
61 changes: 3 additions & 58 deletions docs/tutorial/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ You can see that you have a generated project structure that looks like:
.
├── poetry.lock
├── pyproject.toml
├── README.rst
├── README.md
├── rick_portal_gun
│   └── __init__.py
└── tests
Expand Down Expand Up @@ -146,69 +146,14 @@ def load():

## Modify the README

Let's change the README. By default it's a file `README.rst`.

Let's change it to `README.md`. So, change the extension from `.rst` to `.md`.

So that we can use Markdown instead of reStructuredText.

And change the file to have something like:
Let's change the README to have something like:

```Markdown
# Portal Gun

The awesome Portal Gun
```

## Modify your project metadata

Edit your file `pyproject.toml`.

It would look something like:

```TOML
[tool.poetry]
name = "rick-portal-gun"
version = "0.1.0"
description = ""
authors = ["Rick Sanchez <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.10"
typer = {extras = ["all"], version = "^0.1.0"}

[tool.poetry.dev-dependencies]
pytest = "^5.2"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
```

We changed the default README, so let's make it use the new `README.md`.

Add the line:

```TOML hl_lines="6"
[tool.poetry]
name = "rick-portal-gun"
version = "0.1.0"
description = ""
authors = ["Rick Sanchez <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
typer = {extras = ["all"], version = "^0.1.0"}

[tool.poetry.dev-dependencies]
pytest = "^5.2"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
```

## Add a "script"

We are creating a Python package that can be installed with `pip install`.
Expand Down Expand Up @@ -468,7 +413,7 @@ The file would live right beside `__init__.py`:
.
├── poetry.lock
├── pyproject.toml
├── README.rst
├── README.md
├── rick_portal_gun
│ ├── __init__.py
│ ├── __main__.py
Expand Down

0 comments on commit 39fc510

Please sign in to comment.