Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python stub files #74

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions python/install-stubs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# experimental script to install stubs for python packages
# this script is not yet integrated into the main build process

# install stubs for all packages in the current environment
# this is useful for IDEs that support type hinting

path=$(python3 -m site --user-site)
echo "Installing stubs in $path"
cp -r stubs/* $path
2 changes: 1 addition & 1 deletion python/pyWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ PYBIND11_MODULE(VIENNAPS_MODULE_NAME, module) {
.def("setMaxCoverageInitIterations",
&psProcess<T, D>::setMaxCoverageInitIterations,
"Set the number of iterations to initialize the coverages.")
.def(" setPrintTimeInterval ", &psProcess<T, D>::setPrintTimeInterval,
.def("setPrintTimeInterval ", &psProcess<T, D>::setPrintTimeInterval,
"Sets the minimum time between printing intermediate results during "
"the process. If this is set to a non-positive value, no "
"intermediate results are printed.")
Expand Down
3 changes: 3 additions & 0 deletions python/stubs/viennaps2d/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from ._viennaps2d import *

def ReadConfigFile(fileName: str): ...
Loading
Loading