Skip to content

Burst run's documentation between user guide and dev guide, merge FAQ's run questions in the user guide #6658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Pierre-Sassoulas
Copy link
Member

Type of Changes

Type
βœ“ πŸ”¨ Refactoring
βœ“ πŸ“œ Docs

Description

Reviewable cleanup before #6589

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the burst-run-between-user-guide-and-dev-guide branch from 77735a4 to ac2713a Compare May 21, 2022 12:45
@coveralls
Copy link

coveralls commented May 21, 2022

Pull Request Test Coverage Report for Build 2365750878

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 15 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.05%) to 95.399%

Files with Coverage Reduction New Missed Lines %
pylint/lint/run.py 15 86.89%
Totals Coverage Status
Change from base Build 2360131034: 0.05%
Covered Lines: 16172
Relevant Lines: 16952

πŸ’› - Coveralls

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how user_guide/run.rst got a lot simpler. Just some final thoughts!

@@ -0,0 +1,83 @@
===========================================
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call this file run_as_package or something like that. run.html feels like we might want to use it for some more general pages in the future.


.. sourcecode:: python

from pylint import epylint as lint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example should be updated as epylint is not the same as pylint. We shouldn't suggest them interchangeably.


.. sourcecode:: python

from pylint import epylint as lint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@Pierre-Sassoulas
Copy link
Member Author

I made a somewhat big change by renaming "run" to "API" for the dev guide.

@@ -0,0 +1,22 @@
=======
epylint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole section of API should probably go into User guide? It's more usage related than development related right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me everything that is not doable by using the pylint executable with options is development. (Beside creating a file to call epylint's API is development ?).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But Development is about developing pylint right? Since pylint is a developer's tool everything related to it will be "development", but I feel like this is more part of "using pylint" than "developing or contributing to pylint". We never use these APIs in our own development and you don't really need them when writing a checker.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it's still unclear what is what. How about this:

  • User guides : using pylint's result from the command line
  • Developer guides: using pylint's API programmatically, understanding pylint plugin system, extension, checkers, etc.
  • Contributor guides : developing for pylint itself launching tests, process, etc. (also maintaining pylint : we have a release.md document that is not included in the doc yet).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that! Although I would perhaps put Developers and Contributing under a more general header of "Development" like black does. That would also allow showing some of the sub-headers of Usage in the sidebar.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're almost ready to do the big table of content revamp then πŸ˜„ .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm planning on adding readme and release.md first.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let you choose, but I'd prefer a PR that sets up the TOC first. It's quite hard to review content + redirects + new pages at the same time.
If we create one PR with all pages/sections we want to have and make sure redirects work we can then do the content afterwards. I would even be okay with adding some blank pages for now considering that you're working on this quite hard at the moment.

###
API
###

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably write something here. https://pylint--6658.org.readthedocs.build/en/6658/development_guide/api/index.html feels a bit empty.

Comment on lines 5 to 25
As you would launch the command line
------------------------------------

You can use the ``run_pylint`` function, which is the same function
called by the command line. You can either patch ``sys.argv``:

.. sourcecode:: python

from pylint import run_pylint

sys.argv = ["pylint", "--disable=line-too-long", "myfile.py"]
run_pylint()


Or supply arguments yourself:

.. sourcecode:: python

from pylint import run_pylint

run_pylint(argv=["--disable=line-too-long", "myfile.py"])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering:

Suggested change
As you would launch the command line
------------------------------------
You can use the ``run_pylint`` function, which is the same function
called by the command line. You can either patch ``sys.argv``:
.. sourcecode:: python
from pylint import run_pylint
sys.argv = ["pylint", "--disable=line-too-long", "myfile.py"]
run_pylint()
Or supply arguments yourself:
.. sourcecode:: python
from pylint import run_pylint
run_pylint(argv=["--disable=line-too-long", "myfile.py"])
As you would launch the command line
------------------------------------
You can use the ``run_pylint`` function, which is the same function
called by the command line.
.. sourcecode:: python
from pylint import run_pylint
run_pylint(argv=["--disable=line-too-long", "myfile.py"])

There should be one obvious way to do it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I like the suggestion better although I would keep Or supply arguments yourself: at the end.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e87b2ce ? Not sure if it is what you meant :)

@Pierre-Sassoulas Pierre-Sassoulas merged commit d24d5d9 into pylint-dev:main May 22, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the burst-run-between-user-guide-and-dev-guide branch May 22, 2022 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants