Skip to content

Commit

Permalink
get test/test.bash running again
Browse files Browse the repository at this point in the history
- pin rdkit to just before they started generating thier own stubs
- pin pyright to just before it started failing (future prs might update pyright)
- swap out setup.py for a poetry-based build
- update mypy and fix the small issue it detected in rdGeometry
  • Loading branch information
bddap committed Sep 11, 2024
1 parent 0a727ab commit 9ea01a8
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 262 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Pipfile
Pipfile.lock
build
rdkit_stubs.egg-info
dist/
__pycache__/

/poetry.lock
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[tool.poetry]
name = "rdkit-stubs"
version = "0.7"
description = "type stubs for rdkit"
authors = [
"Andrew Dirksen <[email protected]>",
"Ryan Rightmer <[email protected]>",
]
license = "MIT OR Apache-2.0"
readme = "README.md"
homepage = "https://github.com/postera-ai/rdkit-stubs"
keywords = ["stubs", "rdkit", "typing"]
classifiers = [
"Development Status :: 1 - Planning",
"Typing :: Stubs Only",
"Programming Language :: Python :: 3.10",
]
packages = [{ include = "rdkit-stubs" }]
include = ["rdkit-stubs/**/*.pyi"]

[tool.poetry.dependencies]
python = "^3.10"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
3 changes: 1 addition & 2 deletions rdkit-stubs/Geometry/rdGeometry.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ class PointND:
def __getinitargs__(cls, RDGeom) -> Any: ...
@classmethod
def __getitem__(cls, RDGeom, int) -> Any: ...
@classmethod
def __getstate__(cls, RDGeom) -> Any: ...
def __getstate__(self) -> Any: ...
@classmethod
def __iadd__(cls, boost, RDGeom) -> Any: ...
@classmethod
Expand Down
47 changes: 0 additions & 47 deletions setup.py

This file was deleted.

416 changes: 208 additions & 208 deletions test/poetry.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions test/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.10"
mypy = "^1.2.0"
mypy = "^1.11.2"
pyright = "^1.1.306"
rdkit = "^2023.3.1"
rdkit = "=2023.09.5"
numpy = "1.26.4"
pytest = "^7.3.1"
rdkit-stubs = { path = "..", develop = true }

Expand Down
2 changes: 2 additions & 0 deletions test/test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cd "$parent"

poetry install

export PYRIGHT_PYTHON_FORCE_VERSION="1.1.338"

# typecheck and run tests in this directory
poetry run pyright .
poetry run mypy .
Expand Down

0 comments on commit 9ea01a8

Please sign in to comment.