Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jonas M. Miguel · committed by GitHub · parent f94b484 · Browse files · 1 file+3 added−58 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • 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 <svlandeg@github.com>
  • Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>

Diff stats

1 file+3 added−58 removed

  • other:+3 added−58 removed

1 file+3 added−58 removed

modified:docs/tutorial/package.md+3 added-58 removed
95 unmodified lines
96```97.98├── poetry.lock99├── pyproject.toml100├── README.rst100├── README.md101├── rick_portal_gun102│   └── __init__.py103└── tests104 ├── __init__.py
40 unmodified lines
145 As we are creating an installable Python package, there's no need to add a section with `if __name__ == "__main__":`.146147## Modify the README148149Let's change the README. By default it's a file `README.rst`.149Let's change the README to have something like:150151Let's change it to `README.md`. So, change the extension from `.rst` to `.md`.152153So that we can use Markdown instead of reStructuredText.154155And change the file to have something like:156151```Markdown152# Portal Gun153154The awesome Portal Gun155```156163## Modify your project metadata164165Edit your file `pyproject.toml`.166167It would look something like:168169```TOML170[tool.poetry]171name = "rick-portal-gun"172version = "0.1.0"173description = ""174authors = ["Rick Sanchez <rick@example.com>"]175176[tool.poetry.dependencies]177python = "^3.10"178typer = {extras = ["all"], version = "^0.1.0"}179180[tool.poetry.dev-dependencies]181pytest = "^5.2"182183[build-system]184requires = ["poetry>=0.12"]185build-backend = "poetry.masonry.api"186```187188We changed the default README, so let's make it use the new `README.md`.189190Add the line:191192```TOML hl_lines="6"193[tool.poetry]194name = "rick-portal-gun"195version = "0.1.0"196description = ""197authors = ["Rick Sanchez <rick@example.com>"]198readme = "README.md"199200[tool.poetry.dependencies]201python = "^3.10"202typer = {extras = ["all"], version = "^0.1.0"}203204[tool.poetry.dev-dependencies]205pytest = "^5.2"206207[build-system]208requires = ["poetry>=0.12"]209build-backend = "poetry.masonry.api"210```211157## Add a "script"158159We are creating a Python package that can be installed with `pip install`.160
251 unmodified lines
412``` hl_lines="7"413.414├── poetry.lock415├── pyproject.toml471├── README.rst416├── README.md417├── rick_portal_gun418│ ├── __init__.py419│ ├── __main__.py420│ └── main.py
326 unmodified lines