Skip to content

Commit

Permalink
Add user documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Feb 28, 2024
1 parent cdfabcd commit d4b5aa9
Show file tree
Hide file tree
Showing 16 changed files with 331 additions and 75 deletions.
Binary file added .github/readme/icon-outline-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/readme/icon-outline-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docs

on:
push:
branches:
- master

jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
-
name: Checkout
uses: actions/checkout@v4
# Docs: https://github.com/actions/checkout
-
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: x64
-
name: Cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
-
name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
-
name: Mkdocs
run: |
mkdocs build --verbose --clean --strict
-
name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.gradle
build/
site/
venv/
TODO.md
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
TODO.md

### IntelliJ IDEA ###
.idea/**
Expand Down
105 changes: 45 additions & 60 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,27 @@ It works by saving all your files as-is before running
the executable provided by you. If you are not OK with that,
please <em>do not</em> install this plugin.

User documentation can be found [here][2].


[1]: https://github.com/microsoft/pyright
[2]: https://insyncwithfoo.github.io/pyright-plugin/
<!-- Plugin description end -->


## Installation

This plugin has not been published to [the Marketplace][2].
This plugin has not been published to [the Marketplace][3].
Download the ZIP file manually from <i>Releases</i>
and follow the instructions described [here][3].
and follow the instructions described [here][4].


## Usage

![](https://raw.githubusercontent.com/InSyncWithFoo/pyright-plugin/master/.github/readme/demo1.png)
![](./docs/img/demo1.png)

Go to <b>Settings</b> | <b>Tools</b> |
<b>Pyright (Global)</b> / <b>Pyright(Project)</b> and
<b>Pyright (Global)</b> / <b>Pyright (Project)</b> and
set the executable path to your Pyright executable.

Save, return to your file and start making some modifications.
Expand All @@ -45,29 +48,36 @@ This is only a minimum viable product.
have run, expect a major delay (up to a few seconds) between checks.

If you are interested in contributing to this project,
see [the contributing guide][4].
see [the contributing guide][5].


## Release schedule

Version 0.1.0 will be released once PyCharm 2024.1 is released.
Until then, a new MVP version is released every Sunday,
if there are enough changes to justify a release.


## Credits

Most of the code is derived from [@koxudaxi/ruff-pycharm-plugin][5].
Most of the code is derived from [@koxudaxi/ruff-pycharm-plugin][6].
It is such a fortune that that plugin does almost the same thing
and is also written in Kotlin, and hence easily understandable.

The SVG logo is derived from [the README image][6]
The SVG logo is derived from [the README image][7]
of the [@microsoft/pyright][1] repository,
generated using Inkscape's autotrace feature.


## See also

* [Pyright (Experimental)][7], its non-working sister plugin
* [Pyright (Experimental)][8], its non-working sister plugin
for PyCharm Professional, using the experimental LSP API.


[2]: https://plugins.jetbrains.com/
[3]: https://www.jetbrains.com/help/pycharm/managing-plugins.html#install_plugin_from_disk
[4]: ./CONTRIBUTING.md
[5]: https://github.com/koxudaxi/ruff-pycharm-plugin
[6]: https://github.com/microsoft/pyright/blob/main/docs/img/PyrightLarge.png
[7]: https://github.com/InSyncWithFoo/pyright-experimental-plugin
[3]: https://plugins.jetbrains.com/
[4]: https://www.jetbrains.com/help/pycharm/managing-plugins.html#install_plugin_from_disk
[5]: ./CONTRIBUTING.md
[6]: https://github.com/koxudaxi/ruff-pycharm-plugin
[7]: https://github.com/microsoft/pyright/blob/main/docs/img/PyrightLarge.png
[8]: https://github.com/InSyncWithFoo/pyright-experimental-plugin
38 changes: 38 additions & 0 deletions docs/configurations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

## Generic

### Executable

For the plugin to work, you need to define at least one executable file
using either the <b>Global</b> or <b>Project</b> panel.

Such a file is typically named `pyright.exe` and can be found in:

* Global: Your Python interpreter directory
* Virtual environment: `/venv/Scripts/` (Windows) or `/venv/bin` (Linux)

You can also use a relative path.
It would be interpreted as relative to the project directory.


### Configuration file

Despite being called "file", you can specify a path to a directory
containing `pyright-config.json` and/or `pyproject.toml`.
This path will be passed to the executable via [the `-p` option][1].

* If the executable is local, only the local path is used.
* If the executable is global, the local path is used if it is specified,
falling back to the global one.

If neither paths are specified, the project directory is used.


## Global

### Always use global

Check this option to always use the global executable and configuration file.


[1]: https://microsoft.github.io/pyright/#/command-line
File renamed without changes
Loading

0 comments on commit d4b5aa9

Please sign in to comment.