Luthaf / rascaline

Computing representations for atomistic machine learning
https://luthaf.fr/rascaline/
BSD 3-Clause "New" or "Revised" License
44 stars 13 forks source link

Please B028 linter #157

Closed PicoCentauri closed 1 year ago

PicoCentauri commented 1 year ago

This PR explicitly sets the stacklevel of warnings since this is required by flake8:

B028: No explicit stacklevel keyword argument found. The warn method from the warnings module uses a stacklevel of 1 by default. This will only show a stack trace for the line on which the warn method is called. It is therefore recommended to use a stacklevel of 2 or greater to provide more information to the user.

Here, I set the level to stacklevel=1 (the default) meaning that no additional backtrace information is given. I think we do not need more information for the user because the warnings are well written and a link and codeblock does not help much. If you disagree we can also set it to 2 or 3.

github-actions[bot] commented 1 year ago

The documentation for this PR is (or will soon be) available on readthedocs: https://rascaline--157.org.readthedocs.build/en/157/

github-actions[bot] commented 1 year ago

Here is a pre-built version of the code in this pull request: wheels.zip, you can install it locally by unzipping wheels.zip and using pip to install the file matching your system

PicoCentauri commented 1 year ago

We have to ping the version of csv wich is a dependency of criterion for our tests. I tried several things but nothing works. Cargo always wants to install v 1.2. Maybe @Luthaf has an idea?