From dadb7702ff7e106809032ad3f3e2e08e75c25722 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Thu, 19 May 2022 20:18:00 +0200 Subject: [doc] Cleanup the installation/testing/badge documentation in the Readme --- README.rst | 132 ++++++++++++++++++++++--------------------------------------- 1 file changed, 48 insertions(+), 84 deletions(-) (limited to 'README.rst') diff --git a/README.rst b/README.rst index d951f7a70..835283199 100644 --- a/README.rst +++ b/README.rst @@ -18,6 +18,9 @@ Pylint .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black +.. image:: https://img.shields.io/badge/linting-pylint-yellowgreen + :target: https://github.com/PyCQA/pylint + .. image:: https://results.pre-commit.ci/badge/github/PyCQA/pylint/main.svg :target: https://results.pre-commit.ci/latest/github/PyCQA/pylint/main :alt: pre-commit.ci status @@ -26,25 +29,6 @@ Pylint :width: 200 :alt: Tidelift -.. list-table:: - :widths: 10 100 - - * - |tideliftlogo| - - Professional support for pylint is available as part of the `Tidelift - Subscription`_. Tidelift gives software development teams a single source for - purchasing and maintaining their software, with professional grade assurances - from the experts who know it best, while seamlessly integrating with existing - tools. - -.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-pylint?utm_source=pypi-pylint&utm_medium=referral&utm_campaign=readme - -Documentation -============= - -Please check `the full documentation`_. - -.. _`the full documentation`: https://pylint.pycqa.org/ - What is pylint ? ================ @@ -73,67 +57,50 @@ re-evaluate and re-enable messages as your priorities evolve. Pylint ships with three additional tools: -- :ref:`pyreverse ` (standalone tool that generates package and class diagrams.) -- :ref:`symilar ` (duplicate code finder that is also integrated in pylint) -- :ref:`epylint ` (Emacs and Flymake compatible Pylint) - -Install -------- - -Pylint can be simply installed by running:: - - pip install pylint - -If you are using Python 3.7.2+, upgrade to get full support for your version:: - - pip install pylint --upgrade - -If you want to install from a source distribution, extract the tarball and run -the following command :: +- pyreverse_ (standalone tool that generates package and class diagrams.) +- symilar_ (duplicate code finder that is also integrated in pylint) +- epylint_ (Emacs and Flymake compatible Pylint) - python setup.py install +.. Enf of do not modify this without also modifying doc/index.rst +.. _pyreverse: https://pylint.pycqa.org/en/latest/pyreverse.html +.. _symilar: https://pylint.pycqa.org/en/latest/symilar.html +.. _epylint: https://pylint.pycqa.org/en/latest/user_guide/ide_integration/flymake-emacs.html -Do make sure to do the same for astroid, which is used internally by pylint. +Install +------- -For debian and rpm packages, use your usual tools according to your Linux distribution. +.. Do not modify anything here, modify doc/user_guide/installation.rst instead -More information about installation and available distribution format -can be found here_. +For command line use, pylint is installed with:: -Testing -------- + pip install pylint -You should be able to install our tests dependencies with:: +It can also be integrated in most editors or IDE. More information can be found +`in the documentation`_. - pip install -r requirements_test.txt +.. _in the documentation: https://pylint.pycqa.org/en/latest/user_guide/installation.html -You can then use pytest_ directly. If you want to run tests on a specific portion of the -code with pytest_ and your local python version:: +Documentation +============= - # ( pip install pytest-cov ) - python3 -m pytest - # Everything in tests/message with coverage for the relevant code: - python3 -m pytest tests/message/ --cov=pylint.message - coverage html - # Only the functional test "missing_kwoa_py3": - python3 -m pytest "tests/test_functional.py::test_functional[missing_kwoa_py3]" +Please check `the full documentation`_. -You can also *optionally* install tox_. To run the test suite for a particular -Python version, with tox you can do:: +.. _`the full documentation`: https://pylint.pycqa.org/ - tox -e py39 +Contributing +------------ -To run individual tests with ``tox``, you can do:: +We welcome all contributions, doc, code, checking issues for duplicate or telling us +that we can close them, confirming that it's still an issue, creating issues because +you found a bug or want a feature... everything helps ! - tox -e py37 -- -k name_of_the_test +Please follow the `code of conduct`_ and check `the contribution documentation`_ if you want to +make a code contribution. -If you're testing new changes in astroid you need to clone astroid_ and install -with an editable installation as follows:: +.. _code of conduct: https://github.com/Pierre-Sassoulas/pylint/blob/main/CODE_OF_CONDUCT.md +.. _the contribution documentation: https://pylint.pycqa.org/en/latest/development_guide/contribute.html - git clone https://github.com/PyCQA/astroid.git - cd astroid - python3 -m pip install -e . Show your usage ----------------- @@ -143,27 +110,9 @@ You can place this badge in your README to let others know your project uses pyl .. image:: https://img.shields.io/badge/linting-pylint-yellowgreen :target: https://github.com/PyCQA/pylint -Use the badge in your project's README.md (or any other Markdown file):: - - [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint) - -Use the badge in your project's README.rst (or any other rst file):: - - .. image:: https://img.shields.io/badge/linting-pylint-yellowgreen - :target: https://github.com/PyCQA/pylint - - -If you use GitHub Actions, and one of your CI workflows begins with "name: pylint", you -can use GitHub's `workflow status badges `_ -to show an up-to-date indication of whether pushes to your default branch pass pylint. -For more detailed information, check the documentation. +See how in `the badge documentation`_. -.. _here: https://pylint.pycqa.org/en/latest/user_guide/installation.html -.. _tox: https://tox.readthedocs.io/en/latest/ -.. _pytest: https://docs.pytest.org/en/latest/ -.. _pytest-benchmark: https://pytest-benchmark.readthedocs.io/en/latest/index.html -.. _pytest-cov: https://pypi.org/project/pytest-cov/ -.. _astroid: https://github.com/PyCQA/astroid +.. _the badge documentation: https://pylint.pycqa.org/en/latest/user_guide/badge.html License ------- @@ -174,3 +123,18 @@ The icon files are licensed under the `CC BY-SA 4.0 `_ - `doc/logo.svg `_ + +Support +------- + +.. list-table:: + :widths: 10 100 + + * - |tideliftlogo| + - Professional support for pylint is available as part of the `Tidelift + Subscription`_. Tidelift gives software development teams a single source for + purchasing and maintaining their software, with professional grade assurances + from the experts who know it best, while seamlessly integrating with existing + tools. + +.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-pylint?utm_source=pypi-pylint&utm_medium=referral&utm_campaign=readme -- cgit v1.2.1