Commit Graph

35 Commits

Author SHA1 Message Date
Paolo Tosco
ebccc05bc9 fix #8749 (#8835)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-10-31 13:35:36 +01:00
Paolo Tosco
614b365a5f Revert "fix #7221 (#7230)" (#7387)
This reverts commit 7a050b4b19.

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-04-28 06:21:31 +02:00
Paolo Tosco
7a050b4b19 fix #7221 (#7230)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-03-14 05:28:25 +01:00
Paolo Tosco
6e62d7e799 - avoid a warning during installation of Python packages into (#7191)
PYTHON_INSTDIR caused by backslash separators
- do not attempt to remove stdout, stderr files which are being written,
  and hence are locked, by the same process when building in the source
  directory (as happens for conda builds)
- raise an exception if an import fails, as it is almost certainly an
  error which should not be ignored
2024-02-25 17:55:51 +01:00
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
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
Eisuke Kawashima
b53ee20b49 Fix Flake8 erorrs (#4252)
* Fix PEP8 [E101](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E502](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E703](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E711](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E712](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E713](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E722](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [W605](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)
2022-03-10 06:55:18 +01:00
Francois Berenger
afd42b2d70 cairo support is needed to generate PNGs (#3250)
for 2D depiction of molecules
2020-06-27 15:38:22 +02:00
Francois Berenger
645642a9f5 added Scripts/test.sh (#2243)
* added Scripts/test.sh

* added optional build dir parameter
2019-03-22 15:58:29 +01:00
Francois Berenger
263f8f9fe4 update to python3 (#2350)
update debian build script to python3
2019-03-14 08:10:10 +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
UnixJunkie
3ab21b7456 added Scripts/create_deb_packages.sh (#1655)
* added Scripts/create_deb_packages.sh

* better comment

* more cmake options

* rm ignored rdkitversion cmake flag

because it is overwritten by what is found in CMakeLists.txt:
```
set(RDKit_Year "2018")
set(RDKit_Month "05")
```

* this deps list is for Ubuntu

* rm -Wno-dev cmake option

* updated dependencies in comments
2018-06-07 16:12:23 +02:00
Greg Landrum
0d0cce3122 Allow installation of Python tests to facilitate testing installations (#1724)
* first pass at adding an installation option for running the python tests

* only install the run_python_tests script if the tests themselves are installed
2018-02-05 08:23:49 -05:00
Greg Landrum
95498dcc4c remove some vestigial scripts (#1440) 2017-07-02 10:27:32 +02:00
gedeck
8a5403f176 Refactor FeatFinderCLI and add unittests (#1299)
* 1194: Review assignments of range in Python code 

Task-Url: https://github.com/rdkit/rdkit/issues/1194
Either wrapped the range expression into a list or made sure that the
code is working with a range object.

* Refactored FeatFinderCLI script

* Add unit test file for CLI apps in rdkit.Chem

Add tests for FeatFinderCLI

* Renamed the unit test file

* Slight improvement to test coverage

* Address comments from review

* Add script to Scripts folder #1305
2017-02-10 08:03:59 +01:00
Greg Landrum
304fbf593e merge 2016-10-30 10:16:14 +01:00
gedeck
0845573a45 Script PythonFormat uses yapf to check the formatting of Python files 2016-10-29 17:13:13 -04:00
gedeck
4580160e37 Replace has_key use in Python (#issue1042) (#1132)
* Replaced all uses of dict.has_key(key) in Python code - part 1

* Replaced all uses of dict.has_key(key) in Python code - part 1

* Replaced all uses of dict.has_key(key) in Python code - part 2 (sping)
2016-10-29 04:41:57 +02: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
Riccardo Vianello
95f60d21bc python3 portability fixes for pandas and the ipython notebook 2014-09-11 23:49:45 +02:00
Greg Landrum
33e7be513d we're going to call the package rdkit, not pyRDKit 2009-01-26 20:08:53 +00:00
Greg Landrum
67d172640a make test directory naming consistent 2009-01-23 17:14:03 +00:00
Greg Landrum
0af0d03f95 update the way tests are run here 2009-01-21 19:31:34 +00:00
Greg Landrum
278a1cb282 update for next release 2008-02-20 17:09:24 +00:00
Greg Landrum
a1951b8d34 use new build system 2007-11-27 07:18:15 +00:00
Greg Landrum
807588b011 add epydoc 2007-11-21 20:32:11 +00:00
Greg Landrum
bedfd5fa31 pull and test Projects; cleanups 2007-10-05 05:34:06 +00:00
Greg Landrum
2431d14c71 build test databases here;
other minor updates
2007-09-26 03:52:08 +00:00
Greg Landrum
967502fe9b generalize the MailResults script 2007-09-26 03:51:18 +00:00
Greg Landrum
1639fcb6e9 create a version that actually works (for me). Other users will need to change the SMTP hostname 2006-05-11 18:21:52 +00:00
Greg Landrum
8853a347f5 seems to be working now 2006-05-08 22:21:01 +00:00
Greg Landrum
47695fa0d2 script cleanup 2006-05-08 19:53:40 +00:00
Greg Landrum
f3b0791b95 script cleanup 2006-05-08 19:51:32 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00