tlittenberg / lisacattools

Python module for interacting with example LISA catalogs
GNU General Public License v3.0
15 stars 7 forks source link

Fix the log verbose and use read-only mode when opening file #12

Closed J-Christophe closed 2 years ago

J-Christophe commented 3 years ago

Hi Tyson,

I have fixed the problem of verbosity of the log. If you want to stop the log, just do the following:

from lisacattools import OFF # could be CRITICAL, FATAL, ERROR, WARNING, TRACE, INFO, DEBUG, NOTSET logger = logging.getLogger("lisacattools") logger.setLevel(OFF) // Now, do wathever you want Let me know the expected behavior that you wish : no log by default or INFO level (in the current implementation, we have INFO by default)

As for the file refresh timestamp, it was simple: just add 'r' to pd.HDFStore(location, "r")

In addition to that, I have improved the tools for the code quality, look please at the file .pre-commit-config.yaml. As its name indicates, the checks are launched when the developper do "git commit". The setup is in the Makefile by the "install-dev" task.

If you want to test as you go along, you can launch the "make quality" task

Let me know if you see a problem.