contributing.md
This file
Path
docs/contributing.md
164 lines · 4.6 KiB · Markdown
Last changed by
✏️ Fix typo in `docs/contributing.md` (#947)Sebastián Ramírezbefore adoptioncb196cf
History of this fileTake it
The walk stopped after 200 commits: lines older than fececf5 point at it.
🔧 Update MkDocs to have titles in Markdown files instead of config (#913)Sebastián Ramírezbefore adoption6b264ac
lines 1–2why, one step back1# Development - Contributing2✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 3–6why, one step back3First, you might want to see the basic ways to [help Typer and get help](help-typer.md){.internal-link target=_blank}.45## Developing6📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 7why, one step back7If you already cloned the <a href="https://github.com/fastapi/typer" class="external-link" target="_blank">typer repository</a> and you want to deep dive in the code, here are some guidelines to set up your environment.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 8why, one step back8📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 9why, one step back9### Virtual Environment✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 10why, one step back10✏️ Fix typo in `docs/contributing.md` (#947)Sebastián Ramírezbefore adoptioncb196cf
line 11why, one step back11Follow the instructions to create and activate a [virtual environment](virtual-environments.md){.internal-link target=_blank} for the internal code of `typer`.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 12why, one step back12📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 13why, one step back13### Install Requirements Using `pip`✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 14why, one step back14📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 15why, one step back15After activating the environment, install the required packages:✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 16why, one step back16🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 17why, one step back17<div class="termy">✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 18why, one step back18🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 19why, one step back19```console📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
lines 20–22why, one step back20$ pip install -r requirements.txt2122---> 100%🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 23why, one step back23```✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 24why, one step back24🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 25why, one step back25</div>✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 26why, one step back26📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 27why, one step back27It will install all the dependencies and your local Typer in your local environment.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 28why, one step back28📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 29why, one step back29### Using your Local Typer✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 30why, one step back30📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 31why, one step back31If you create a Python file that imports and uses Typer, and run it with the Python from your local environment, it will use your cloned local Typer source code.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 32why, one step back32📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 33why, one step back33And if you update that local Typer source code when you run that Python file again, it will use the fresh version of Typer you just edited.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 34why, one step back34📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 35why, one step back35That way, you don't have to "install" your local version to be able to test every change.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 36why, one step back36📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 37why, one step back37/// note | "Technical Details"✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 38why, one step back38📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 39why, one step back39This only happens when you install using this included `requirements.txt` instead of running `pip install typer` directly.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 40why, one step back40📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 41why, one step back41That is because inside the `requirements.txt` file, the local version of Typer is marked to be installed in "editable" mode, with the `-e` option.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 42why, one step back42📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 43why, one step back43///✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 44why, one step back44📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 45why, one step back45### Format🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 46why, one step back46📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 47why, one step back47There is a script that you can run that will format and clean all your code:🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
lines 48–49why, one step back4849<div class="termy">✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 50why, one step back50🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 51why, one step back51```console📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 52why, one step back52$ bash scripts/format.sh🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 53why, one step back53```✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 54why, one step back54🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 55why, one step back55</div>✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 56why, one step back56📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 57why, one step back57It will also auto-sort all your imports.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 58why, one step back58📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 59why, one step back59## Tests✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 60why, one step back60📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
lines 61–62why, one step back61There is a script that you can run locally to test all the code and generate coverage reports in HTML:62🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 63why, one step back63<div class="termy">✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 64why, one step back64🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 65why, one step back65```console📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 66why, one step back66$ bash scripts/test-cov-html.sh🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 67why, one step back67```✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 68why, one step back68🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
lines 69–70why, one step back69</div>70📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 71why, one step back71This command generates a directory `./htmlcov/`, if you open the file `./htmlcov/index.html` in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing.🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 72why, one step back72📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 73why, one step back73## Docs✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 74why, one step back74📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 75why, one step back75First, make sure you set up your environment as described above, that will install all the requirements.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 76why, one step back76📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 77why, one step back77### Docs live✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 78why, one step back78📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 79why, one step back79During local development, there is a script that builds the site and checks for any changes, live-reloading:🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 80why, one step back80✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 81–83why, one step back81<div class="termy">8283```console📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 84why, one step back84$ python ./scripts/docs.py live✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 85why, one step back85📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
lines 86–88why, one step back86<span style="color: green;">[INFO]</span> Serving on http://127.0.0.1:800887<span style="color: green;">[INFO]</span> Start watching changes88<span style="color: green;">[INFO]</span> Start detecting changes✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 89–92why, one step back89```9091</div>92📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 93why, one step back93It will serve the documentation on `http://127.0.0.1:8008`.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 94why, one step back94📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 95why, one step back95That way, you can edit the documentation/source files and see the changes live.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 96why, one step back96📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 97why, one step back97/// tip✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 98why, one step back98📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 99why, one step back99Alternatively, you can perform the same steps that scripts does manually.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 100why, one step back100📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 101why, one step back101Go into the docs director at `docs/`:✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 102why, one step back102📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
lines 103–104why, one step back103```console104$ cd docs/🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 105why, one step back105```✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 106why, one step back106📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 107why, one step back107Then run `mkdocs` in that directory:✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 108why, one step back108🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 109why, one step back109```console📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 110why, one step back110$ mkdocs serve --dev-addr 8008🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
lines 111–112why, one step back111```112📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 113why, one step back113///🔧 Update tabs and admonitions with new syntax and new MkDocs features (#906)Sebastián Ramírezbefore adoption289b230
line 114why, one step back114📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 115why, one step back115#### Typer CLI (optional)✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 116why, one step back116📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 117why, one step back117The instructions here show you how to use the script at `./scripts/docs.py` with the `python` program directly.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 118why, one step back118📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 119why, one step back119But you can also use <a href="https://typer.tiangolo.com/typer-cli/" class="external-link" target="_blank">Typer CLI</a>, and you will get autocompletion in your terminal for the commands after installing completion.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 120why, one step back120📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 121why, one step back121If you install Typer CLI, you can install completion with:✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 122–125why, one step back122123<div class="termy">124125```console📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
lines 126–129why, one step back126$ typer --install-completion127128zsh completion installed in /home/user/.bashrc.129Completion will take effect once you restart the terminal.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 130–133why, one step back130```131132</div>133📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 134why, one step back134### Docs Structure✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 135why, one step back135📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 136why, one step back136The documentation uses <a href="https://www.mkdocs.org/" class="external-link" target="_blank">MkDocs</a>.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 137why, one step back137📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 138why, one step back138And there are extra tools/scripts in place in `./scripts/docs.py`.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 139why, one step back139📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 140why, one step back140/// tip✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 141why, one step back141📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 142why, one step back142You don't need to see the code in `./scripts/docs.py`, you just use it in the command line.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 143why, one step back143📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 144why, one step back144///✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 145–155why, one step back145146All the documentation is in Markdown format in the directory `./docs`.147148Many of the tutorials have blocks of code.149150In most of the cases, these blocks of code are actual complete applications that can be run as is.151152In fact, those blocks of code are not written inside the Markdown, they are Python files in the `./docs_src/` directory.153154And those Python files are included/injected in the documentation when generating the site.155📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 156why, one step back156### Docs for Tests✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 157–159why, one step back157158Most of the tests actually run against the example source files in the documentation.159📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 160why, one step back160This helps to make sure that:✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
line 161why, one step back161📝 Add docs for virtual environments, environment variables, and update contributing (#946)Sebastián Ramírezbefore adoption73b9698
line 162why, one step back162* The documentation is up-to-date.✏ Fix typo in `docs/tutorial/arguments/optional.md` (#602)Tadas Gedgaudasbefore adoptionfececf5
lines 163–164why, one step back163* The documentation examples can be run as is.164* Most of the features are covered by the documentation, ensured by test coverage.