-
-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 Remove references to a .rst README generated by poetry new (#632)
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
1 parent
f94b484
commit 39fc510
Showing
1 changed file
with
3 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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`. | ||
|
@@ -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 | ||
|