Commit Graph

22 Commits

Author SHA1 Message Date
Paolo Tosco
c43f6d363a - enable building stubs in both in-tree and out-of-tree builds (#6980)
with cmake --build . --target stubs (also make stubs on *NIX)
- improved the patching script to do a better assignment of
  overloaded constructor parameters, whcih results in a number
  of docstring fixes

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2023-12-13 04:49:34 +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
79e8295586 Support Python 3.11 (#5994)
* remove some more deprecated numpy stuff

* workaround for changes to random.shuffle in python 3.11

* fix pickling of rdkit mols in python 3.11

* add py311 build to CI

* update py311 CI

* remove qt for py311 for the moment

* only use the new code with pyversion >=3.11

* use the new logic for all pickle_suites

* need to work with older py too
2023-01-24 18:16:26 +01:00
Greg Landrum
1f4584b2ca run clang_format (#5676) 2022-11-01 04:14:26 +01:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
Brian Kelley
549f318f29 Add ToList method to Sparse/ExplicitBitVector (#4467)
* Add ToList method to Sparse/ExplicitBitVector

* Pushed a change to an older version of the file, reverting

* Fix function name

* Merge with the change that actually compiles

* Add SparseIntVect ToList, Update tests

* Fix test

* Update Code/DataStructs/Wrap/SparseIntVect.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/DataStructs/Wrap/wrap_SparseBV.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2021-09-09 06:26:15 +02:00
Greg Landrum
8bd68be098 Add bit information to generalized FP generator (#3858)
* Split bonds to per-atom parts for interaction

* It would help to commit test fixes also

* Update Code/GraphMol/MolDraw2D/MolDraw2D.h

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2DSVG.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2DSVG.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2DSVG.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Refactored code

* bit info works for Morgan fps and is tested
get the stubs in place everywhere else

* add RDKitFP bit info too

* expand atom pair info

* add info for TTs

* atom pairs

* enable shared_ptrs for SparseBitVects in python

* fix core leaks in the bulk operations

* simplify the AdditionalOutput API

* first pass at a useable AtomOutput from Python
needs "a bit" more testing.

* documentation

* response to review

Co-authored-by: SPKorhonen <samuli-petrus.korhonen@iki.fi>
2021-03-06 04:25:51 +01:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
23ef7fae3b Fixes meaningless const qualifier for int 2015-10-18 15:13:41 -04:00
Greg Landrum
50332b599e get some of the pickle problems resolved; this probably only works with python3 and is not yet 100% functional 2014-06-19 06:05:42 +02:00
Sereina Riniker
52069683b9 function UnSetBitsFromList added 2014-04-08 10:38:52 +02:00
Greg Landrum
b6300a86fe support bit vects <-> byte strings 2012-01-08 06:12:47 +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
20096c76a9 refactoring of the BitVect interface to make capitalization consistent
w/ the rest of the RDKit. i.e.: SetNumBits -> setNumBits
2010-05-30 15:15:46 +00:00
Greg Landrum
f49a9dbe66 documentation update 2010-01-25 07:00:16 +00:00
Greg Landrum
79b8a77f93 get rid of those irritating POSIX_C_SOURCE warnings 2008-07-08 06:59:59 +00:00
Greg Landrum
940a9733b9 add operator== and operator!= to BitVects 2008-06-16 07:09:13 +00:00
Greg Landrum
029e08d6b4 merge in the changes from the 64 bit port branch r703:717 2008-06-11 05:01:17 +00:00
Greg Landrum
a73711e854 batch dos2unix conversion; untabify 2007-03-14 04:46:26 +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