https://github.com/guoci/external_documentation_redirect
Python external documentation redirect for JetBrains IDEs
https://github.com/guoci/external_documentation_redirect
django documentation-tool jetbrains-ides keras matplotlib numpy pandas pycharm pytest python pytorch scikit-learn scipy sklearn tensorflow
Last synced: 2 months ago
JSON representation
Python external documentation redirect for JetBrains IDEs
- Host: GitHub
- URL: https://github.com/guoci/external_documentation_redirect
- Owner: guoci
- License: agpl-3.0
- Created: 2023-04-25T20:44:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T21:15:32.000Z (almost 2 years ago)
- Last Synced: 2025-01-23T05:34:26.115Z (4 months ago)
- Topics: django, documentation-tool, jetbrains-ides, keras, matplotlib, numpy, pandas, pycharm, pytest, python, pytorch, scikit-learn, scipy, sklearn, tensorflow
- Language: HTML
- Homepage:
- Size: 2.69 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python external documentation redirect for JetBrains IDEs
**Now available as a PyCharm [plugin](https://github.com/guoci/PyCharm-PythonDocumentationLinkProvider).**
Open html documentation from PyCharm.
This is the code for website to redirect to external documentation from the [`View external documentation`](https://www.jetbrains.com/help/pycharm/settings-tools-python-external-documentation.html) feature in Pycharm (or other Jetbrains IDEs with the Python plugin).
PyCharm hardly gives the correct URL for the documentation of 3rd party libraries. e.g. [PY-30970](https://youtrack.jetbrains.com/issue/PY-30970/Cannot-set-up-external-documentation-for-Django-2.0), [PY-36368](https://youtrack.jetbrains.com/issue/PY-36368/Bad-external-documentation-links-to-symbols-imported-directly-from-numpy-module), [PY-36306](https://youtrack.jetbrains.com/issue/PY-36306/Python-external-documentation-not-working-for-numpy), [PY-43736](https://youtrack.jetbrains.com/issue/PY-43736/Python-External-Documentation-Add-more-libraries-and-make-it-default-if-internal-is-missing)
Since most external documentation for 3rd party libraries do not follow a fixed pattern, it is impossible to use a template to give the correct URL for the documentation. This website uses a documentation mapping to redirect to the documentation URL.
## Usage
### Example configuration
There are 2 methods to configure, by editing IDE config files or changing settings with the IDE
#### Editing config files
Go to your [configuration directory](https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory), open `options/other.xml`.
Look for
```xml
...
```
put the following after the last `entry` tag.
```xml
```#### With IDE GUI
In `Settings` :arrow_right: `Tools` :arrow_right: `(Python) External Documentation`, change URLs for the supported modules to:`https://guoci.github.io/external_documentation_redirect/?qname={element.qname}`
Press `Shift+F1` to get external documentation of the symbol under the cursor.
Currently supported modules:
- `django`
- `matplotlib`
- `numpy`
- `pandas`
- `pytest`add the URL pattern to `_pytest`
- `pytorch`
- `scipy`
- `sklearn`
- `tensorflow`, `tensorflow.keras`
Requires adding `keras` and `tensorflow` URL pattern, see screenshot for an example.For `keras`, do import from `tensorflow.keras` instead of `keras`, for example:
`import tensorflow.keras as keras`
instead of
`import keras`
Users from China may want to override the default documentation site with:`https://guoci.github.io/external_documentation_redirect/?qname={element.qname}&docsite=https%3A%2F%2Ftensorflow.google.cn`
### Running a local instance
You can copy the files this repository and use [http.server](https://docs.python.org/3/library/http.server.html) to serve.