10 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
Paolo Tosco
4f23cb70c6 Fix a few broken docstrings (#6480)
* - Fix a couple of docstrings that were confusing boost::python
- Python keywords should not be used as parameter names

* changes in response to review

* removed two leftover BOOST_PYTHON_FUNCTION_OVERLOADS

---------

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-06-23 13:47:51 +02:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
bzoracler
3847cc5598 Shift constructors to class methods (#4225)
Shift `Trajectory` and `Snapshot` class constructors to methods on the classes themselves to prevent shadowing of class names in the Python wrapper module
2021-06-17 16:53:25 +02:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements
clang-format the results
clean up all the parts that clang-tidy-8 broke

* fix problem on windows
2020-01-25 14:19:32 +01:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Paolo Tosco
0922ecd70e - re-applied Trajector Python docstring changes 2016-05-16 09:25:25 +01:00
Paolo Tosco
a335b7f1be - fixed typo in Code/GraphMol/Wrap/Trajectory.cpp
- removed leading and trailing underscores in Code/GraphMol/Trajectory/Trajectory.h
2016-05-13 07:26:13 +01:00
Paolo Tosco
2b3a818f84 - removed the dependency on Trajectory from ROMol and ForceField 2016-05-11 19:37:09 +01:00
Paolo Tosco
8b5176f8c9 - initial work to put the Trajectory code into a separate object 2016-05-09 19:05:15 +01:00