64 Commits

Author SHA1 Message Date
Greg Landrum
ebd7dad122 Switch a bunch of C++ tests to use catch2 (#8625) 2025-07-18 11:50:38 +02:00
Greg Landrum
da6cd73168 Run clang-format across everything (#7849)
* run clang-format-18 across Code/*.cpp and Code/*.h

* run clang-format-18 across External
2024-09-26 13:39:02 +02:00
Anna Brünisholz
1734ef8071 Cleaner forloops, deleting of empty header file (#7320)
* clean up of python and c++ for-loops

* readd assignement

* Remove misleading walrus operators (#7323)

* Run installed tests if applicable (#7325)

* simpler check for equality

* Revert "simpler check for equality"

py assert does not work pointwise on lists on all platforms,
we need to iterate through all elements

This reverts commit 03cc0ad1a6.

* fix ambiguity on truth value of np arrays

* compare list elementwise

---------

Co-authored-by: Matt Swain <m.swain@me.com>
2024-04-07 05:41:29 +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
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
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
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
jasondbiggs
5065340b20 a few doxygen comment fixes (#4368)
* collection of doxygen fixes

* more files with fixed doxygen comments

* more doxygen fixes

* more doxygen fixes

* last set of doxygen comment fixes

Co-authored-by: Jason Biggs <jasonb@wolfram.com>
2021-08-09 04:58:01 +02:00
Eisuke Kawashima
b9a5be5a2d miscellaneous updates (#4284)
* Remove accidentally tracked files and unset x flag

* Ignore ComicNeue

* Unify test tag to `reader`

* Trivial destructors

* Bump CMAKE_CXX_STANDARD to 14 (#4165)
2021-07-13 06:57:29 +02:00
Eisuke Kawashima
013ba4f21d Run clang-tidy (modernize-use-override) (#4251) 2021-07-01 05:18:56 +02:00
Eisuke Kawashima
48f4f3ee82 Run clang-tidy (modernize-pass-by-value) (#4224) 2021-06-14 06:57:08 +02:00
Eisuke Kawashima
78aac3c1bc Run clang-format against header files (#4143) 2021-06-08 07:57:51 +02:00
Greg Landrum
c0a62388a2 switch to using target_compile_definitions instead of add_definitions (#3350)
* switch to using target_compile_definitions instead of add_definitions

* missed one
2020-08-21 04:49:07 +02:00
Greg Landrum
45b9aef28b clang-tidy modernize-use-default-member-init and modernize-use-emplace (#3190)
* run clang-tidy with modernize-use-default-member-init

* results from modernize-use-emplace

* one uniform initialization per line
otherwise SWIG is unhappy

Co-authored-by: Brian Kelley <fustigator@gmail.com>
2020-05-28 09:07:58 +02:00
Greg Landrum
45bf58754a Cleanup some cmake dependencies (#3077)
* change minimal cmake version to a consistent 3.5

* progress towards a cleanup

* get the basic python deps working

* two more libs

* another round of changes
all tests pass at this point

* next round of changes
all tests pass at this point

* close to done
all tests pass

* very close

* almost done

* shift the RDBoost dependencies around a bit

* remove an extraneous python linkage
this is trying to get the mac builds working again

* Only link to python if it was built shared (#3091)

* change in response to review

Co-Authored-By: Ric <ricrogz@users.noreply.github.com>

* move that suppression of the maybe-uninitialized warning to BoostStartInclude.h

Co-authored-by: Brian Kelley <fustigator@gmail.com>
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
2020-04-17 14:34:23 +02:00
Greg Landrum
a75018fe38 Cleanups and additional tests to improve test coverage (#2852)
* disable builds of the StructChecker code by default

* operator"" _smarts() doesn't need to catch sanitization errors

* remove unused function

* turn back on some tests that shouldn't have been disabled

* Remove unused code from SMARTS parser and simplify a bit

SmilesParseOps::AddFragToMol is now used only from the SMARTS parser, so we can simplify the API

* Removes obsolete special case code for SMARTS

This was relevant when organic atoms in SMARTS queries were stored as two-part queries.

* improve SMARTS testing

make sure we can generate SMARTS from all the examples and then parse that again.

* Fixes #2814

* Fixes #2815

* some additional smarts tests to improve coverage

* test copy ctor and getPos

* remove obsolete test_list files

* include tests for the morgan invariant generators

* more cleanups and coverage improvements

* remove files that were mistakenly added
2020-01-09 16:07:55 -05:00
Eisuke Kawashima
5cd27a242f Fix typo (#2862)
* Fix typo

* Reflect the comments

* Fix more typos
2019-12-31 06:43:27 +01:00
Eisuke Kawashima
dc7cc84a0c Fix typo [ci skip] 2019-10-17 17:45:50 +09:00
Greg Landrum
7e6600f3be Fixes #2516 (#2519)
* RDStreams now installed properly

* skip Wrap directories if RDK_BUILD_PYTHON_WRAPPERS is not set

Fixes #2516
2019-06-28 09:57:00 -04:00
Greg Landrum
ec31bea97b clang-tidy-7 pass (#2408) 2019-04-16 12:05:47 -04:00
Greg Landrum
24f1737839 Remove a bunch of Python2-related warts (#2315)
* remove all of the "from __future__" imports

* remove the first batch of rdkit.six imports/uses

* next step of rdkit.six removal

* removing xrange, range, and some maps

* next round of removals

* next round of cleanups

* fix inchi test

* last bits of "from rdkit.six" are gone

* and the last of the six stuff is gone

* strange importlib problem
2019-03-06 20:43:49 -05:00
Brian Kelley
373a89021e Change boost int types to std types (#2233) 2019-01-22 17:45:03 +01:00
Paolo Tosco
f7c888844d moved test.h from RDBoost to RDGeneral for consistency with export.h (#2074) 2018-10-11 17:35:23 -04:00
Greg Landrum
2738c35178 Fixes #1903 (#1971)
* Fixes #1903

* update SWIG bindings too
2018-07-25 09:14:17 +02:00
Paolo Tosco
c08ea49bda - enable building DLLs on Windows (#1861)
* - enable building DLLs on Windows

* - export.h and test.h are now auto-generated by CMake
2018-05-16 08:42:41 +02:00
Greg Landrum
636a0f6e69 Cleanup a bunch of compiler warnings (#1697)
* remove a bunch of compiler warnings

* remove some more warnings on windows (there are still plenty to go...)
2017-12-22 12:59:52 +01:00
gedeck
e9af48ffd7 Issue1071/yapf (#1078)
* Issue #1071: add yapf configuration file

* yapf formatting of Code directory

* yapf formatting of Contrib directory

* yapf formatting of Data directory

* yapf formatting of Docs directory

* yapf formatting of External directory

* yapf formatting of Projects directory

* yapf formatting of Regress directory

* yapf formatting of Scripts directory

* yapf formatting of Web directory

* yapf formatting of rdkit directory
2016-09-23 04:58:46 +02:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
fc0bab810f API CHANGE — remove meaningless const qualifier from const int 2015-10-18 16:51:56 -04:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Brian Kelley
6ebbeb3bd3 Major conversion of std::string API to const std::string & 2015-09-25 15:15:59 -04:00
Paolo Tosco
4f7482139f - fixed tests failing on Windows when retrieving sources through the
Windows git client, which converts line terminators to CR+LF
- added a conditional compilation clause to Code/RDBoost/import_array.h
  to avoid a compilation error on Windows with Python3
2015-02-22 21:49:40 +00:00
Riccardo Vianello
609009b1ec additional changes related to pickling.
- fixed dependency from ordering of dict keys in a doctest
- replaced import of cPickle from the python2 lib w/ rdkit.six.moves.cPickle
- fixed a few more tests
- support pickle load/loads kw arguments with a portable interface
2014-07-06 09:13:38 +02:00
Greg Landrum
5c618ec6e5 <sigh> 2014-06-25 06:18:41 +02:00
Greg Landrum
abe4f58666 fix a backwards compatibility problem 2014-06-25 03:57:33 +02:00
Greg Landrum
dde589955e fix FreeChemicalFeatures pickling and some syntax problems in testFeatures.py 2014-06-24 05:24:28 +02:00
Riccardo Vianello
3358ec5925 initial set of changes introducing python3 support 2014-06-17 18:26:41 +02:00
Greg Landrum
45a0d50278 add (optional) ids to ChemicalFeatures; contributed by JP Ebejer 2012-04-21 03:41:53 +00:00
Greg Landrum
b993f89afe remove the bjam-based build system 2010-09-27 03:54:07 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
cb6cdb99b3 merge in a set of changes from Riccardo V. to install .h files as well;
this needs more testing.
2010-09-04 14:07:22 +00:00
Greg Landrum
9727cffa61 make python wrappers and tests optional 2010-01-22 11:22:58 +00:00
Greg Landrum
c346a41951 get the tests working on windows. 2010-01-19 06:34:58 +00:00
Greg Landrum
7f0c2c05fc remove lapack from the jamfiles 2009-10-31 06:09:20 +00:00
Greg Landrum
6caabd787e move these changes over to the windows side and try again there 2009-10-01 08:24:43 +00:00
Greg Landrum
76297b0fff builds and passes tests on linux 2009-09-28 11:02:18 +00:00
Greg Landrum
f0b288cfed big changes again (repeat the 979, 980 disaster on the correct branch) 2009-02-04 20:13:44 +00:00
Greg Landrum
8bf7a4c187 now all tests pass here as well 2009-02-03 05:26:10 +00:00
Greg Landrum
54843d4f1d update the link requirements here 2009-01-05 14:33:27 +00:00
Greg Landrum
2580fbaaa2 this is probably a ways from done, but now at least we can run bjam under mingw without it immediately erroring out 2008-11-15 17:14:13 +00:00