22 Commits

Author SHA1 Message Date
Greg Landrum
3a27ca2910 V2 API for the MolSuppliers (#7168)
* backup

* backup

* backup

* new testing file

* reorder things in the SMILES and SMARTS parser
parameters to allow easier struct initialization

* add v2 of SmilesMolSupplier

v1 is not yet there

* add TDTMolSupplier

add some very basic tests for v1 suppliers

* more progress

* all tests passing

I think all the suppliers are now moved over

* check for maeparser before building the tests

* get SWIG builds working

* changes in response to review
2024-02-29 06:46:56 +01: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
Riccardo Vianello
51bd3f51f2 Fix the compressed sd mol supplier and cleanup the python iterators (#3202)
* fix the CompressedSDMolSupplier python iterator interface

* cleanup the python iterators code (remove support for python2)
2020-07-03 13:15:07 +02:00
Greg Landrum
ec366c1ab7 Dev/pvs studio cleanups2 (#2877)
* a round of cleanups courtesy of PVS studio

* add a test to make sure that a warning is a false alarm

* bug fix

* Fix a UFF bug

* more PVS studio cleanups

* next round of PVS studio cleanups

* completely remove the chances for that bug

* changes in response to review

* add an additional test
+ a bit of reformatting that snuck in
2020-01-22 15:10:58 +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
Greg Landrum
6e838e3df3 Fixes #2479 (#2482)
* Fixes #2479

* a bit of cleanup

* catch some additional fun edge cases

* change in response to review
2019-06-07 12:44:51 -04: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
180c15fe0e support reading/writing atom props from SD files (#2297)
* first crude pass

* fix a deprecation

* change naming scheme, support bools

* add standalone function

* add a default value for missings

* support long lines

* stupid typo

* make operator[] work

* revisit missing value handling

* modify missing value handling

* switch to an alternate scheme for specifying missing values

* clang-format

* First pass at property list parser
still needs more tests

* add test for processMolPropertyLists

* get this working as part of the ForwardSDMolSupplier

* first pass at python wrappers and tests

* clang-format run

* add creation of property lists at the mol level

* wrap long lines on output

* remove PoC implementation

* fix python wrappers

* remove out-of-date reference to the Python PoC

* changes in response to review
2019-03-03 13:17:13 -05:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
e37296d7c7 post review 2015-11-14 08:08:14 +01:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Riccardo Vianello
3358ec5925 initial set of changes introducing python3 support 2014-06-17 18:26:41 +02:00
Greg Landrum
7085d82463 remove x bit 2012-04-14 04:01:08 +00:00
Greg Landrum
dbd78604c8 fix and test issue 3477283
add a new option for ctab parsing to cause the parser to be less strict about
  errors in the file syntax.
2012-01-22 09:40:54 +00:00
Greg Landrum
779eeaa24a expose streambufs and ostreams 2011-11-20 06:20:51 +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
dd0f3fb5f3 lots of cleanup and refactoring 2011-11-19 14:15:31 +00:00
Greg Landrum
839104b2d0 forward progress; basic function is there; tests pass on the mac 2011-11-19 13:20:08 +00:00
Greg Landrum
53d804a02e not really working yet; backup commit 2011-11-18 06:55:06 +00:00