Skip to content
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

README: elaborate of some noteworthy usage flags #143

Merged
merged 1 commit into from
Oct 6, 2017

Conversation

luzpaz
Copy link
Collaborator

@luzpaz luzpaz commented Oct 4, 2017

Also offer some examples.
Devs, this PR needs feedback. I'm not familiar with .rst format so much. I am pretty sure tweaks are needed.

@codecov-io
Copy link

codecov-io commented Oct 4, 2017

Codecov Report

Merging #143 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #143   +/-   ##
=======================================
  Coverage   89.01%   89.01%           
=======================================
  Files           3        3           
  Lines         619      619           
  Branches       86       86           
=======================================
  Hits          551      551           
  Misses         53       53           
  Partials       15       15

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b50382a...70809c0. Read the comment docs.

@larsoner
Copy link
Member

larsoner commented Oct 4, 2017

You can use the GitHub interface to see the rendered version:

https://github.com/luzpaz/codespell/blob/8b6b2406a269353ff6710011f0bfd861dc9ed2be/README.rst

@luzpaz
Copy link
Collaborator Author

luzpaz commented Oct 4, 2017

Ok, i fixed the formatting issue AFAICT. .rst seems like a weird format at least to me. How does it read? Ok?

README.rst Outdated

codespell -w, --write-changes

The -w flag will actually implement the changes recommended by codespell. Not running with ``-w`` flag is equated with doing a dry run. Recommended to run this with the ``-i`` or ``--ineractive`` flag.::
Copy link
Member

Choose a reason for hiding this comment

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

is equated -> is the same as

Recommended to -> It is recommended to

--ineractive -> --interactive

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

README.rst Outdated

codespell -S, --skip=

Comma-separated list of files to skip. It accepts globs as well. Example:
Copy link
Member

Choose a reason for hiding this comment

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

Examples:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

README.rst Outdated

Comma-separated list of files to skip. It accepts globs as well. Example:

to skip .eps & .txt files, invoke ``codespell --skip="*.eps,*.txt"``
Copy link
Member

Choose a reason for hiding this comment

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

* to skip ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

README.rst Outdated

to skip .eps & .txt files, invoke ``codespell --skip="*.eps,*.txt"``

to skip directories, invoke ``codespell --skip="./src/3rd-Party,./src/Test"`` ::
Copy link
Member

Choose a reason for hiding this comment

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

* to skip ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

README.rst Outdated

codespell -I FILE, --ignore-words=FILE

This flag can be used to whitelist certain words that are in the ``codespell_lib/data/dictionary.txt``. Format of whitelist file is one word per line. Invoke ``codespell -I path/to/file.txt`` to execute codespell referencing said whitelist.
Copy link
Member

Choose a reason for hiding this comment

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

Format of whitelist -> The format of the whitelist

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

README.rst Outdated

codespell -i 3 -w

Will run interactive mode level 3 and write changes to file.
Copy link
Member

Choose a reason for hiding this comment

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

Will run -> Run

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

@luzpaz
Copy link
Collaborator Author

luzpaz commented Oct 4, 2017

the whitelist passed to -I is case-sensitive based on how it is listed in dictionary.txt.
for example after running codespell, the following results could be displayed:
allEdges ==> alleges
in order to whitelist this word you need to lowercaseallEdges since that is how it is listed in dictionary.txt
Not sure how to covey that in the README. Thoughts?

@larsoner
Copy link
Member

larsoner commented Oct 5, 2017

I think you can just say that "The whitelist passed to -I is case-sensitive based on how it is listed in dictionary.txt.", and people in these corner cases will figure out the correct usage.

@luzpaz
Copy link
Collaborator Author

luzpaz commented Oct 5, 2017

I think you can just say that "The whitelist passed to -I is case-sensitive based on how it is listed in dictionary.txt.", and people in these corner cases will figure out the correct usage.

👍

@luzpaz
Copy link
Collaborator Author

luzpaz commented Oct 5, 2017

I added a section on upgrading using pip. Please offer feedback as well. Thanks!

README.rst Outdated
--------
To stay current with codespell developments it is possible to build codespell from GitHub via::

pip3 install --upgrade git+https://github.com/lucasdemarchi/codespell.git
Copy link
Member

Choose a reason for hiding this comment

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

We should just say pip and assume this links to the correct place (people who need to use pip3 instead of pip hopefully already understand their environment)

README.rst Outdated

pip3 install --user --upgrade git+https://github.com/lucasdemarchi/codespell.git

* It has been reported that after installing from `pip`, codespell can't be located. Please check the $PATH variable to see if `~/.local/bin` is present. If it isn't then add it to your path.
Copy link
Member

Choose a reason for hiding this comment

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

double-backticks on inline code in RST format (otherwise it's interpreted as a link)

README.rst Outdated
pip3 install --user --upgrade git+https://github.com/lucasdemarchi/codespell.git

* It has been reported that after installing from `pip`, codespell can't be located. Please check the $PATH variable to see if `~/.local/bin` is present. If it isn't then add it to your path.
* If you decide to install via `pip` then be sure to remove any previously installed versions of codespell (via you OSs preferred app mananger).
Copy link
Member

Choose a reason for hiding this comment

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

same here

@luzpaz
Copy link
Collaborator Author

luzpaz commented Oct 5, 2017

@larsoner
double backticks are visible? How do I hide them and make sure that command is not interpreted as a link? See screenshot:

image

README.rst Outdated
--------
To stay current with codespell developments it is possible to build codespell from GitHub via::

``pip install --upgrade git+https://github.com/lucasdemarchi/codespell.git``
Copy link
Member

Choose a reason for hiding this comment

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

don't use double-backticks in code blocks

README.rst Outdated
``pip install --upgrade git+https://github.com/lucasdemarchi/codespell.git``

**Important Notes:**
* Sometimes installing via `pip` will complain about permissions. If this is the case then run with ::
Copy link
Member

Choose a reason for hiding this comment

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

use double-backticks here for pip (with inline code)

README.rst Outdated

``pip install --user --upgrade git+https://github.com/lucasdemarchi/codespell.git``

* It has been reported that after installing from `pip`, codespell can't be located. Please check the $PATH variable to see if `~/.local/bin` is present. If it isn't then add it to your path.
Copy link
Member

Choose a reason for hiding this comment

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

and here, pip and ~/local/bin

Copy link
Member

Choose a reason for hiding this comment

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

Also offer some examples. 
and added an Update section
final
@luzpaz
Copy link
Collaborator Author

luzpaz commented Oct 6, 2017

Ok, just not used to .RST
Thanks for your patience. I fixed the issues you mentioned and also refined a few more I found. I think this is good to go after this.

@larsoner larsoner merged commit 5cda413 into codespell-project:master Oct 6, 2017
@larsoner
Copy link
Member

larsoner commented Oct 6, 2017

Thanks @luzpaz

@luzpaz luzpaz deleted the README-elaborations branch October 6, 2017 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants