Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
rojopolis committed May 22, 2019
1 parent dedc5a7 commit dbe1354
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# spellcheck-github-actions
Spell check action

This comment has been minimized.

Copy link
@facelessuser

facelessuser May 23, 2019

Hey, I'm the author of PySpelling. I saw you starred the repo, and was just curious how it was being used so I checked out your project. Nice to see people interested in using it because I figured I was most likely the only one using it.

With that said, I noticed a few things when looking at your test results:

  1. After seeing the odd results of your output, I realized a few. the reason connfiguration doesn't show up in your results is that aspell, by default, still has its filters enabled. To be honest, this hadn't occurred to me up until now as the types of tests I was doing didn't expose this. To turn off Aspell filters just add the following to your Markdown task:

      apsell:
        mode: none
  2. When running the markdown filter, it is probably desirable to run it through the pyspelling.filters.html filter right after it so you don't get things like href and such. It will then parse it with HTML.

I'm wondering if it might be less confusing for PySpelling to set Aspell mode to None unless it is explicitly set to something by the user. As someone experimenting with the project, I'd be interested to hear your opinion. Anyways, hopefully my unsolicited comments are helpful.

If you have any suggestions or comments with using PySpelling, I'd love to hear them, as right now I'm in an echo chamber.

This comment has been minimized.

Copy link
@rojopolis

rojopolis via email May 23, 2019

Author Owner

This comment has been minimized.

Copy link
@facelessuser

facelessuser May 23, 2019

It looks like a lot of work went into this!

Yeah, I'm a typo machine, so I mainly wrote it to make sure I could spell check the things I cared about in my projects with better flexibility.

I’m not quite clear on comment #1

I noticed that configuration was spelled wrong in your readme, but the CI test didn't report it. That is all I was pointing out. I was explaining why it wasn't reporting it in your case. Basically it is because Aspell is running its own internal filter by default that got tripped up on the HTML result that was returned by PySpelling's markdown filter. By setting the aspell specific command line option mode to none, you can disable that behavior. Afterwards, the misspelled connfiguration should appear in the CI results:

- name: Markdown
  apsell:
    mode: none
  pipeline:
  - pyspelling.filters.markdown:
  sources:
  - '**/*.md'

It seems like the best way to do that is to allow the user to map a custom config file into the container.

When I wrote PySpelling, it was with the idea of running it in a CI environment, which is how I primarily use it. So the idea was to have a config with different tasks in it. You can specify specific tasks by specifying the name pyspelling -n taskname. You could have different configs as well and run them simply as pyspelling -c customconfig.yml.

Each task can have different custom dictionaries of words to not ignore, I guess wordlists. The pyspelling project is used to spellcheck itself, so I use custom wordlists to ignore words that I know are okay. Is that what you are talking about? If you are talking about the the main dictionary, that is generally controlled directly with aspell command line options which are exposed as I showed above with mode. I think I generally set lang to en and then tell it where my custom wordlist is and where I'd like it to generate the compiled wordlist.

  aspell:
    lang: en
  dictionary:
    wordlists:
    - docs/src/dictionary/en-custom.txt
    output: build/dictionary/mkdocs.dic

In the case above, it would take whatever wordlists I specify and compile them into the mkdocs.dic to be used in addition to the english dictionary.

I guess if you installed other main dictionaries (not wordlists) you could maybe redirect to them. I think there may be a command line option to maybe give an absolute path to a dictionary in aspell? I know you can in hunspell, which pyspelling also works with. I'd probably need to know better what you are trying to do and refresh my memory.

This comment has been minimized.

Copy link
@rojopolis

rojopolis via email May 23, 2019

Author Owner
A Github Action that spell checks Python, Markdown, and Text files.

This action uses [PySpelling](https://facelessuser.github.io/pyspelling/) to
check source files in the project. This release doesn't allow any
connfiguration.

TODO: Add support for custom dictionary and other settings.

1 comment on commit dbe1354

@facelessuser
Copy link

Choose a reason for hiding this comment

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

When you use this in a CI context do you generally include a config file in the repo to be checked (similar to including a .pylintrc)?

Yup. The pyspelling project actually spellchecks itself, but here is a separate project that employs it:

By default, PySpelling looks for .spelling.yml (deprecated) or .pyspelling.yml. You can also just manually specify the config.

By the way, if you’d prefer you are more than welcome to just include the Github Actions stuff in your own repo.

Seems interesting. Never played with GitHub Actions before. Definitely something I will probably play around with.

Please sign in to comment.