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

📝 Remove references to a .rst README generated by poetry new #632

Merged
Merged
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
tiangolo marked this conversation as resolved.
Show resolved Hide resolved

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
Loading