ipol-journal / ipolDevel

IPOL demo system development
GNU Affero General Public License v3.0
23 stars 3 forks source link

use modern style-check tools in the CI #157

Closed kidanger closed 1 year ago

kidanger commented 1 year ago

This MR replaces the pylint cron by ruff, black and isort. These tools are configured through the pyproject.toml file, but it's better to keep their default configuration as much as possible. It is possible to setup most code editors to use these tools during development. When developing, make sure to use the same version of the tools as defined here: https://github.com/ipol-journal/ipolDevel/blob/ci-checks/.github/workflows/python.yaml#L46 Later we can include mypy as well.

If you prefer I can split the MR in two: one for setting up the CI, the other for reformatting all the codebase.

hmaciasc commented 1 year ago

I was just digging around and it is used for creating hashes like for example: Signing serialised data (e.g. JSON documents). Unique tokens for a user session, password reset request, messages, etc. Prevention of cross-site or replay attacks by adding (and then expecting) unique values for the request. Generating a unique salt for hash functions.

It has been there since the beginning, same for the old CP. It is not used however (thankfully) for login or auth, so there's that..

mcolom commented 1 year ago

I see, then it's just a crypo. salt, which doesn't need to be secret. Probably not the best name for this! in Django :) I'm approving the PR then.

hmaciasc commented 1 year ago

I'll approve it too but please consider adding some documentation on new linter usage and how to install locally, it would help us all and possible new members of the team in the future.

kidanger commented 1 year ago

I'll approve it too but please consider adding some documentation on new linter usage and how to install locally, it would help us all and possible new members of the team in the future.

I've added a few lines to the readme.