Commit Graph

111 Commits

Author SHA1 Message Date
Joshua Black
64f7a5456f Stop External/rapidjson-1.1.0 and Code/RDGeneral going to ${CMAKE_SOURCE_DIR} (#8810)
* set export.h and test.h to go to the correct places in RDKitUtils

* use cmake_source_dir so cmake files are picked up in list

* use cmake_current_source_dir in MolInterchange

* use rdkit variables to place rapidjson and headers in correct places
2025-09-25 14:05:35 +02:00
Kevin Keating
2a6307b0aa rdkit-targets.cmake now uses cmake package names for external libraries instead of absolute paths (#8552) 2025-05-24 07:27:03 +02:00
Paolo Tosco
73a7378ddb Avoid a large number of warnings when building MinimalLib with emscripten (#8545)
* - avoid a large number of warnings when building MinimalLib with emscripten, which does not support SHARED
- fix indentation in CoordGen CMakeLists.txt

* disable RDK_USE_BOOST_STACKTRACE on emscripten platform

* revert change done by mistake

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-05-22 05:08:01 +02:00
Greg Landrum
144c1f29f1 bump to InChI 1.07.3 (#8300) 2025-02-26 15:23:19 +01:00
Riccardo Vianello
560d5ad604 export the targets with a python dependency to a different config file (#7914)
* export the targets with a python dependency to a different config file

* add the forgotten file

* improve the dependency from boost components

* fix management of dependencies for RDKitPython

* fix install location for RdkitPython cmake config file

* fix finding boost components

* put libraries that depend on rdkit_py_base in the python component
2025-02-19 05:53:30 +01:00
Greg Landrum
4358693afa bump the inchi version to 1.07.2 (#8176)
* bump the inchi version
move to using the github distributions

* update cartridge behavior

* further fix

* typos!
2025-01-17 13:33:26 -05:00
Greg Landrum
67f507a15c Some cmake cleanup work (#7720)
* cmake modernization

- get rid of some warnings
- switch to what I hope is the correct way of doing things
- bump min cmake version to 3.16
- bump min boost version to 1.70

This builds on linux

* remove some usages of PYTHON_EXECUTABLE

* remove old-school python usage from coverage tests

* remove unused CI file

* bump boost version for windows builds to 1.84

* still trying to get the ci builds working

* typo

* eventually the CI will work

* robustify some tests
2024-08-16 17:11:31 +02:00
Hussein Faara
cba05a9b3a Update CMake modules for finding flex and bison(#7590) (#7591)
* Update CMake modules for finding flex and bison(#7590)

This will improve the executable finding procedures and allow us to
require minimum release versions. The current modules have been around
for about 15 years, and currently limits us from using newer flex
features.

* remove modules
2024-07-10 05:56:07 +02:00
Hussein Faara
7a9d807a48 Some Clang-specific build instructions skip some clang compilers on mac #6941 (#6942)
Updated compiler id comparisons to do a regex comparison against "Clang"
instead of doing a direct string comparison. This allows us to match
compiler ids like "AppleClang"
2023-11-29 17:25:36 +01:00
Hussein Faara
ab7b8dd2c6 Remove boost::regex support #6817 (#6913)
Made the following changes
        * removed RDK_USE_BOOST_REGEX cmake option and its references
        * removed usage of RDKIT_USE_BOOST_REGEX macro
        * removed install instructions related to boost regex
2023-11-21 07:58:29 +01:00
Greg Landrum
2957ab4576 switch to catch2 v3 (#6898)
* switch to catch2 v3
Fixes #6894

* fix a couple of problems noticed in the CI builds

* more warning cleanup

* changes in response to review
2023-11-15 06:45:42 +01:00
Greg Landrum
ab152a4ed1 Switch over to using pytest to run the python tests (#5916)
* misc adaptations/modernizations
plus a few changes to allow pytest discovery

* get the recap unittests running

* pytest config updates

* all tests pass

* integrate the pytest stuff into ctest

* integrate Projects dir
better cmake integration

* ci build env updates

* ignore more files

* remove six.py

* cleanup UnitTestPandasTools

* cleanup pytest

* remove obsolete use of rdkit.six from doctests

* update release notes

* mysterious CI fix

* add conftest to remove some tests

* remove the old python-based testing infrastructure

---------

Co-authored-by: Ric <ricrogz@gmail.com>
2023-11-03 14:39:24 +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
91074a0aa9 Fix invocation of pytest (#5703)
* Fixes #5702

* stop invoking pytest using a deprecated approach

* fix a typo

* set max jinja2 version
2022-10-28 12:54:24 +02:00
Greg Landrum
16b3e2dfb8 temporary inchi download location; (#5653)
add temporary inchi download location until the problems with their server are resolved.
2022-10-16 05:56:05 +02:00
Greg Landrum
594c58f86c make the catch tests build faster (#5284)
* reorg the catch tests
the goal here is to make the builds faster

* make that easier
2022-05-17 04:39:33 +02:00
Paolo Tosco
9ed1fecc3a Fixes #4681 and a few Windows PgSQL build problems (#4692)
* fixes #4681

* fixes a few Windows build problems

* added comments to adapter.cpp to explain the changes

* get PostgreSQL to build on Windows with both MSVC and MinGW compilers

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2021-11-20 04:28:49 +01:00
Ric
e0de7c9622 refactor static suffixing strategy (#4450) 2021-09-01 04:53:38 +02:00
Paolo Tosco
e8175cf29c Three more Windows build fixes (#4356)
* - fixes MinGW build
- make sure that supplier istream is opened in binary mode or istream::tellg() will
  report wrong offsets on MinGW builds (MSVC will make no difference)
- avoid that in MSVC conda DLL builds the libboost_*.lib static
  libraries are picked by cmake instead of the boost_*.lib import libraries
  by defining BOOST_ALL_DYN_LINK

* - make sure that C# wrappers build with MinGW compilers
- make sure that static builds work under Windows with both MSVC and
  MinGW

* - disable building static libraries on Windows also when using MinGW compilers
- fix the C# wrapper build on Windows under both MSVC and MinGW

* reverted -DSWIGWORDSIZE64 as it was originally

* reverted -DSWIGWORDSIZE64 definition

Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
2021-07-29 05:52:18 +02:00
Paolo Tosco
681f5c6256 - fixes MinGW build (#4347)
- make sure that supplier istream is opened in binary mode or istream::tellg() will
  report wrong offsets on MinGW builds (MSVC will make no difference)
- avoid that in MSVC conda DLL builds the libboost_*.lib static
  libraries are picked by cmake instead of the boost_*.lib import libraries
  by defining BOOST_ALL_DYN_LINK
2021-07-22 06:26:20 +02:00
Greg Landrum
633f3a9f44 switch to using InChI 1.06 (#4332)
Need to update one expected InChI here due to the version change.
I confirmed via direct use of the mol block that the new one is correct.
2021-07-13 15:47:14 +02:00
Paolo Tosco
106e9f7c37 Normalize line endings in source code files (#4104)
* set all source code files to have native line endings

* normalized all source code line endings

Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
2021-05-13 14:31:39 +02:00
Paolo Tosco
e911da94fd use https for Avalon and Inchi downloads (#3915)
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
2021-03-11 21:00:22 +01:00
Ric
c9199cf1da Address #2753 (#3750)
* add test export heder to gitignore

* define export macros in separate file

* install new header

* patch GA with the new macros

* fix struct declarations

* fix conformerparser exports

* fix MolSGroupParsing ParseV3000Array export

* fix java wrappers

* export exceptions

* remove duplicated exports

* Build RDGeneral exceptions into lib

* export queries, only for *nix

* fix RingDecomposerLib header manipulation

* fix CIP labeler test issues
2021-02-15 14:29:04 +01:00
Greg Landrum
52c83c45f0 Add some more comprehensive R-Group Decomposition tests (#3778)
* start to add some human-readable regression-test like examples for RGD

* small examples from JMedChem

* add helper viewer

* make that generate actual JSON

* use JSON of full output for tests
move JSON generation to RGroupUtils.h

* switch to using JSON from files

* add test notebook

* add jupyter testing to the code

* add nbval to linux test env

* add notebook tests to mac and windows too

* add toJSON for columns too
2021-02-05 10:35:32 +01:00
Eisuke Kawashima
e0b665bfe1 Clean up CMake files (#3417)
* Clean up CMake files

* bump CMake minimum required version to 3.7 to utilize
  [`VERSION_GREATER_EQUAL`](https://cmake.org/cmake/help/v3.7/release/3.7.html#index-0-command:if)
* improve catch-dependency
* fix conditionals
* use early return
* properly use CMake commands

* Apply suggestions from code review

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-11-28 08:00:39 +01:00
Paolo Tosco
2b592950c9 A couple of minor improvements to FindCairo (#3535)
* - allow defining a specific path to Cairo libraries and headers
- link against Xau library if needed

* changes in response to review

* removed the libXau bit as it is not needed
2020-11-19 09:09:48 +01:00
Paolo Tosco
947144ab6d Avoid really slow Windows conda builds (#3287)
* avoid that if CMAKE_BINARY_DIR==CMAKE_SOURCE_DIR (e.g., conda builds)
export.h is overwritten at each incremental build causing the whole
RDKit to be rebult every time

* use existing CMake function so we don't have to maintain our own
2020-07-13 14:47:29 +02:00
Riccardo Vianello
29ad06f099 fix a small inconsistency in the name of the inchi package (#3182)
with cmake 3.17.2 the original code produced the following warning:
"The package name passed to `find_package_handle_standard_args` (INCHI) does
not match the name of the calling package (Inchi).  This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern."
2020-05-25 09:08:17 +02:00
Ric
39bcee635e Mem checkup (#3083)
* clean up in testDatastructs

* avoid jump on unassigned mem in rxns

* set valgrind error exit code

* update suppressions

* clean up RDValue in testDict

* don't leak mol if parsing Maestro file fails

* don't leak mol if parsing PDB block fails

* cleanup leftover rxns in testReaction

* cleanup mol if CX extensions cannot be parsed

* cleanup leftover mols in smiTest1

* cleanup leftover mols in moldraw2DTest1

* cleanup leftover mols in testSubstructMatch

* make testEnumeration go easier on valgrind

* reduce R counts
2020-04-17 17:48: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
Ric
cc8e21864b Update Maeparser & Coordgen Dependencies (#3011)
* update

* remove references to templates.mae
2020-03-17 13:50:57 +01: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
06237a88c5 cleanup to make static builds work 2019-03-31 08:22:25 +02:00
Ric
be3170d0d5 Mem errors clean up (#2305)
* fix test leaks

* fix "invalid read" when casting Query to EqualityQuery

* fix error cleanup in SMILES/SMARTS parsers

* SMILES/SMARTS parser fix updated *.cmake

* fix error cleanup in SLN parser

* SLN parser updated *.cmake

* updated suppressions

* update loop in sln bison
2019-03-08 05:39:59 +01: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
Ric
3cc9206a48 Update build rules for coorgen & maeparser (#2184) 2019-01-06 06:28:00 +00:00
Greg Landrum
9ac981d60a Merge branch 'memcheck_on_tests' of https://github.com/ricrogz/rdkit into ricrogz-memcheck_on_tests 2018-10-31 05:25:56 +01:00
Ric
a6b26253ff Fix (most of) mem problems (#2123)
* do not use new on loggers

* del pointers in testDistGeom

* Update Dict hasNonPOD status on bulk update

* delete new Dicts in memtest1.cpp

* fixes in MolSuppliers and testFMCS

* PeriodicTable singleton as unique_ptr

* fix EEM_arrays leak

* fix leaks in testPBF

* fix ParamCollection leak in test UFF

* fix leaks in MMFF

* clear prop dict before read in in pickler

* fix leaks in testFreeSASA

* fix leaks in test3D

* modernize Dict.h & SmilesParse.cpp

* fix leaks in testQuery

* fix leaks in testCrystalFF

* fix leaks in cxsmilesTest

* fix leaks in Catalog & mol cat test

* fix leaks in ShapeUtils & tests

* fix leaks in testSubgraphs1

* fix leaks testFingerprintGenerators

* fix leaks in Catalog/FilterCatalog

* fix leaks in graphmolqueryTest

* these changes reduce bison parse leaks

* fixed leaks in testChirality.cpp

* fix leaks + 2 tests in testMolWriter

* fix 4m leaks in substructLibraryTest

* small improvements to molTautomerTest; still leaks

* fix leaks in testRGroupDecomp

* fix leaks in test; parser still leaks

* fix leaks in itertest

* fix 4m leaks in testDepictor

* fixes in smatest; still leaking due to parser

* fixes in testSLNParse; still leaking due to parser

* flex/bison: always add atoms with ownership; smarts error cleanup

* fix leaks in testReaction

* fix leaks in testSubstructMatch

* fix leaks in resMolSupplierTest

* fix leaks in testChemTransforms + bug in ChemTransforms

* fix leaks in testPickler

* fix leaks in testMolTransform

* fix leaks in testFragCatalog

* fix leak in testSLNParse. Still leaks due to Smiles

* fixed most leaks in testMolSupplier

* pre bison fix

* fix some atom & bond parse problems; others still fail

* bison smiles & smarts, atoms & bonds more or less fixed

* fix leaks in molopstest.cpp

* fix leaks in testFingerprints, MACCS.cpp & AtomPairs.cpp

* fix leaks in moldraw2Dtest1

* fix leaks in testDescriptors

* fix leaks in testInchi

* fix leaks in testUFFForceFieldHelpers

* fix leaks in hanoiTest & new_canon.h

* fix leaks in testMMFFForceField

* fix leaks in graphmolTest1

* fix leaks in testMMFFForceFieldHelpers

* fix leaks in testDistGeomHelpers

* fix leaks in testMolAlign

* initialize occupancy & temp facto with default values

* fix leak in TautomerTransform

* updated suppressions

* fix testStructChecker

* fix logging & py tests

* fix TautomerTransform class/struct issue

* remove misplaced delete in testSLNParse

* deinit in testAvalonLib1

* fix Avalon-triggered(?) bug in StructChecker/Pattern.cpp

* fix random testMolWriter/Supplier fails

- diversify output file names to avoid clashing.
- unify Writers close/destruct behavior.
- flushing/closing in tests.

* use reset in FFs Params.cpp

* comments on testMMFFForceField

* unrequired 'if's added to mol suppliers

* correct cast in FilterCatalog.h

* use unique_ptr in MACCS Patterns

* remove unrequred if in new_canon

* update & move suppressions
2018-10-29 14:33:26 +00:00
Ric
0ed583eb4f move valgrind suppressions into Code/cmake/ 2018-10-27 11:40:02 -04:00
Greg Landrum
7976c36b87 add explicit catch dependency for tests that use it (#2126) 2018-10-19 16:38:58 +02:00
Ric
4294921058 Enabled ctest memcheck to run on tests 2018-10-12 09:34:09 -04: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
223513a76e Start to use Catch2 for new tests (#1732)
* backup

* build works

* works

* builds on linux

* rename the test

* add another test to make sure that works
2018-09-04 10:32:17 -04:00
Greg Landrum
2738c35178 Fixes #1903 (#1971)
* Fixes #1903

* update SWIG bindings too
2018-07-25 09:14:17 +02:00
Paolo Tosco
1009511907 - fixes the absence of the RDKit prefix in .so/.dylib libraries (#1915) 2018-06-15 07:43:56 +01:00
Paolo Tosco
45499c7bca - allows coordgen and maeparser to be built as static libraries (#1909) 2018-06-14 05:43:59 +02:00
Dan N
5c919dbbdc Fix curl fallback for downloading files (#1904)
The curl file download fallback option was not saving files as
the correct filename. Instead, it used the -O option, which
saved the files using the remote's name for the file! This
was problematic for files downloaded using specification of git
sha.
2018-06-09 04:48:18 +02:00
Paolo Tosco
5ca9148ece - do not re-generate export.h and test.h if they have not changed (#1901) 2018-06-08 06:56:37 +02:00