25 Commits

Author SHA1 Message Date
Ricardo Rodriguez
ccfb1fa688 ... and more mem errors fixed (#7924)
* fixleak in CIP labels catch test

* fix leak in Murtagh clustering

* do not leak writers in streambuf

* fix leaks in fingerprintgeneratorwrapper

* remove 'minor leak' comments
2024-10-25 07:01:34 +02:00
Paolo Tosco
2b4202867e Add Python modules to generate stubs and automatically patch docstrings (#6919)
* - added gen_rdkit_stubs Python module to generate rdkit-stubs
- added patch_rdkit_docstrings Python module to patch existing C++ sources to fix docstrings missing self parameter and add named parameters taken from C++ signatures where possible
- added rdkit-stubs/CMakeLists.txt to build rdkit-stubs as part of the RDKit build
- added an option to CMakeLists.txt to enable building rdkit-stubs as part of the RDKit build (defaults to OFF)

* fixed CMakeLists.txt, rdkit-stubs/CMakeLists.txt and a doctest

* - added missing cmp_func parameter
- fixed case with overloads with optional parameters
- do not trim params if expected_param_count == -1
- add dummy parameter names if we could not find any
- keep into account member functions when making up parameter names
- address __init__ and make_constructor __init__ functions
- fix incorrectly assigned staticmethods

* patched sources

* address residual few remarks

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2023-11-30 04:54:18 +01:00
Greg Landrum
46a0af898d Support context managers for mol Suppliers and Writers (#3704)
* Add context managers for writers
Allow calling close() on already closed Writers
Fixes #2217

* add a close method to MolSuppliers

* modernize the way we handle presence/absence of MAEPARSER support

* add context managers to suppliers

* changes in response to review

* some cleanup

* more cleanup
2021-01-11 05:52:57 +01:00
Greg Landrum
8388ab7d7c raise ValueErrors when constructing streambuffs with the incorrect type. (#2592)
* First pass at enforcing streambuf types on object creation

* make this work on windows
2019-08-19 11:27:47 -04:00
Peter St. John
871940fc45 fix to SDWriter docs (#2521)
The previous SDWriter docs for writing to a gzipped object throws an error in python3. From the mailing this, 'wt+' seems to work fine.
https://sourceforge.net/p/rdkit/mailman/message/36406080/
2019-07-12 05:23:12 +02:00
Greg Landrum
060bc7c519 Fixes #2436
A bunch of other doc formatting tweaks are in there too
2019-05-13 11:01:59 +02:00
Greg Landrum
fb5e325705 update docstrings in the wrappers too 2019-03-05 11:40:28 +01:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
2e961be508 rename method to getText() 2016-03-31 05:17:41 +02:00
Greg Landrum
11d8995a05 get the python bindings working and tested 2016-03-30 16:36:03 +02:00
Greg Landrum
baa2b9b217 first version 2016-03-30 16:08:05 +02:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Greg Landrum
3fe2e13afd support forcing V3000 writing and kekulization in the SDWriter
Fixes #174
2013-12-30 06:58:48 +01:00
Greg Landrum
586651341d docs fix 2012-12-31 11:57:43 +00:00
Greg Landrum
6f91815d5a update doc strings 2012-01-04 06:04:36 +00:00
Greg Landrum
7ee9cb8fc1 add TDT writer supporter 2011-12-03 04:35:15 +00:00
Greg Landrum
4b9f0c741f doc update; start adding stream support to SmilesWriter 2011-11-21 04:44:39 +00:00
Greg Landrum
0b2f306516 get the SDWriter working using ostreams; get ForwardSDMolSupplier working with filenames 2011-11-20 05:32:43 +00:00
Greg Landrum
3b3d44db16 remove exe property from source files 2011-01-13 04:22:56 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
116c036c07 doc updates for writers to indicate that "-" writes to stdout;
rename computedProps property to __computedProps
2010-09-19 13:13:10 +00:00
Greg Landrum
3f08f58208 add close() method to writers 2010-07-28 04:29:58 +00:00
Greg Landrum
5d03333c22 setup svn keywords (should have done this before import... grn) 2006-05-06 22:54:39 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00