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 support for uv venvs #1367

Merged
merged 1 commit into from
Nov 3, 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
15 changes: 11 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
from os.path import abspath, dirname

# Make sure we get the version of this copy of cmd2
sys.path.insert(1, dirname(dirname(abspath(__file__))))
root_path = dirname(dirname(abspath(__file__)))
cmd2_ext_test_path = f'{root_path}/plugins/ext_test/'
sys.path.insert(1, root_path) # cmd2
sys.path.insert(2, cmd2_ext_test_path) # cmd2_ext_test

# Import for custom theme from Read the Docs
import sphinx_rtd_theme
import sphinx_rtd_theme # noqa E402

# -- General configuration -----------------------------------------------------

Expand Down Expand Up @@ -179,9 +182,13 @@
# Ignore nitpicky warnings from autodoc which are occurring for very new versions of Sphinx and autodoc
# They seem to be happening because autodoc is now trying to add hyperlinks to docs for typehint classes
nitpick_ignore = [
('py:class', 'cmd2.decorators.CommandParent'),
('py:obj', 'cmd2.decorators.CommandParent'),
('py:class', 'ArgparseCommandFunc'),
('py:class', 'argparse._SubParsersAction'),
('py:class', 'cmd2.decorators.CommandParent'),
('py:class', 'cmd2.utils._T'),
('py:class', 'CommandParent'),
('py:class', 'frame'),
('py:class', 'RawCommandFuncOptionalBoolReturn'),
('py:class', 'types.FrameType'),
('py:obj', 'cmd2.decorators.CommandParent'),
]
20 changes: 18 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ dev = [
"pytest-cov",
"pytest-mock",
"sphinx",
"sphinx-rtd-theme",
"sphinx-autobuild",
"sphinx-rtd-theme",
"ruff",
"twine",
]
docs = [
"setuptools",
"setuptools_scm",
"sphinx",
"sphinx-rtd-theme",
"sphinx-autobuild",
"sphinx-rtd-theme",
]
test = [
"codecov",
Expand Down Expand Up @@ -317,3 +317,19 @@ docstring-code-line-length = "dynamic"
packages = ["cmd2"]

[tool.setuptools_scm]

[tool.uv]
dev-dependencies = [
"codecov",
"doc8",
"invoke",
"mypy",
"pytest",
"pytest-cov",
"pytest-mock",
"sphinx",
"sphinx-autobuild",
"sphinx-rtd-theme",
"ruff",
"twine",
]
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ def test_proc_reader_send_sigint(pr_none):
assert pr_none._proc.poll() is None
pr_none.send_sigint()
pr_none.wait()

# Mac sure a SIGINT killed the process
ret_code = pr_none._proc.poll()

# Make sure a SIGINT killed the process
if sys.platform.startswith('win'):
assert ret_code is not None
else:
Expand Down
Loading