dsa-ou / algoesup

Algorithmic essays support: examples, templates, guides, library
https://dsa-ou.github.io/algoesup/
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Configure linters via command line, to not require pyproject.toml #19

Closed densnow closed 8 months ago

densnow commented 8 months ago

Some of the violations printed by %ruff do not make sense in the context of Jupyter Notebook environments due to the cell by cell linting that occurs. This was previously handled via configuration in pyproject.toml

Since %ruff will only be used in Ipython environments, and algoesup is on the PyPi, we could add an @argument to %ruff so that violations that do not make sense for this environment are ignored.

mwermelinger commented 8 months ago

If this is something you could do and test w/ Colab, I'd appreciate.

densnow commented 8 months ago

Yes sure, no problem.

mwermelinger commented 8 months ago

Thanks. From https://docs.astral.sh/ruff/configuration/#full-command-line-interface it seems we can do in the CLI all that is in src/essays/pyproject.toml, with ruff check --ignore D100,W292,... --select ... --output-format pylint.

mwermelinger commented 8 months ago

%pytype also needs to be configured from the command line, but the pyproject.toml file can remain for those linting from the terminal