6 Commits

Author SHA1 Message Date
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
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
Greg Landrum
bca3e747f2 Improvements to some constructors in python wrappers (#4581)
* documentation typos

* better handling of overloaded constructors in python wrappers
2021-10-06 04:17:53 +02:00
Greg Landrum
e970148830 Allow applying single-reactant/single-product reactions in place (#4511)
* minor preparatory refactor

* add test

* add reaction literals

* tests for the new literals

* add runReactant
first steps to making things work

* remove works

* backup

* all current tests passing except bond-order changes
some atom-property copying fixed

* bond changes now work

* handle atomic stereo

* some cleanup and more tests

* docs

* not-working

* add KekulizeIfPossible()

* return a value from KekulizeIfPossible

* Revert "not-working"

This reverts commit 2ebd8a5519.

* add in-place reactions to python wrapper

* simplify deprotection wrapper code

* support in-place deprotection

* changes in response to review

* forgotten change
2021-09-26 14:35:23 -04:00
Ric
9aa949576a Addresses #4425 (#4426)
* refactor converter registration checking

* some more converters refactoring & cleanup
2021-08-20 11:23:39 +02:00
Brian Kelley
202c863302 [WIP] Deprotection Library (#3294)
* Add deprotection library

* Add copyrights

* Add dll exports

* Fix doc strings, use std::shared_ptr

* Changes for Review

* clang-format

* Fix seg fault and compile issues

* Fix namespace issue

* Add examples to datastructure and use them for testing

* Make the test actually compile and run

* Remove greek character
2020-09-11 05:35:36 +02:00