12 Commits

Author SHA1 Message Date
Ric
880a8e5725 Reformat Python code for 2023.03 release (#6294)
* run yapf

* run isort

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-04-28 06:53:56 +02:00
Kevin Burk
f8cf31068e Support for logging via Python's logging module. (#4846)
* Support for logging via Python's logging module.

* Avoid the Python 3.9+ PyObject_CallOneArg function.

* Move logging functions to RDBase; Python logger by default; clean up tests.

* See if removing NOGIL fixes the Windows stall.

* get tests running on windows

* Reset to using C++ logging; whiespace tweaks.

* Longer timestamp grace period; try tempfile vs Windows logging stall.

* Clean up commented code; get details for log count bug.

* SubstructLibrary: Fix c++ threads calling into python

* FilterCatalog: Fix c++ threads calling into python

* Release notes; make sure Jupyter still logs to sys.stderr.

* Always use thread-local log buffers.

* de-verbosify a test

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
Co-authored-by: Brian Kelley <fustigator@gmail.com>
2022-01-24 04:49:27 +01:00
Greg Landrum
24f1737839 Remove a bunch of Python2-related warts (#2315)
* remove all of the "from __future__" imports

* remove the first batch of rdkit.six imports/uses

* next step of rdkit.six removal

* removing xrange, range, and some maps

* next round of removals

* next round of cleanups

* fix inchi test

* last bits of "from rdkit.six" are gone

* and the last of the six stuff is gone

* strange importlib problem
2019-03-06 20:43:49 -05:00
gedeck
e9af48ffd7 Issue1071/yapf (#1078)
* Issue #1071: add yapf configuration file

* yapf formatting of Code directory

* yapf formatting of Contrib directory

* yapf formatting of Data directory

* yapf formatting of Docs directory

* yapf formatting of External directory

* yapf formatting of Projects directory

* yapf formatting of Regress directory

* yapf formatting of Scripts directory

* yapf formatting of Web directory

* yapf formatting of rdkit directory
2016-09-23 04:58:46 +02:00
Brian Kelley
556cffb75c Tests capturing stderr from logs 2016-01-27 17:51:32 -05:00
Brian Kelley
f1d79f41a1 Removed testing code, make logging release GIL, added better tests 2016-01-27 17:36:46 -05:00
Brian Kelley
63e21bc7dd Adds support for capturing RDLogs in Python StdErr streams
Adds four basic logging functions to Chem that log through the C++
logging mechanism:

 Chem.LogWarningMsg(msg)
 Chem.LogInfoMsg(msg)
 Chem.LogErrorMsg(msg)
 Chem.LogDebugMsg(msg)

And a Wrapper to enable logs to be mirrored in Python SysStderr.  One of
the nicer features of this logging system, is that Threaded logging is
synchronized to Python where it is interleaved in raw C++ logging.

  Chem.WrapLogs()
2016-01-26 13:56:38 -05:00
Brian Kelley
5349b600c4 More Python3 fixes 2015-10-15 09:47:40 -04:00
Brian Kelley
b15e5789dc Removes print statement 2015-10-15 09:07:29 -04:00
Brian Kelley
9ed56b32ba Adjust thread count based on number of cpus 2015-10-15 08:14:20 -04:00
Brian Kelley
9242c031f5 Python Thread Tests runner is cleaner, less redundant, stresses threadsafety more, works on Python3 2015-10-15 08:10:39 -04:00
Brian Kelley
aeafa2e5ae Release the GIL on THREADSAFE_SSS only\nAdds some sanity testing for GIL releases 2015-10-14 19:14:15 -04:00