diff --git a/docs/conf.py b/docs/conf.py index 323e70f1..7eb29fc7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -168,15 +168,9 @@ # 2. Existing project with latest copier template, switcher exists and works # 3. Existing project with old copier template that makes broken switcher, # switcher exists but is broken -<<<<<<< before updating -# Point 3 makes checking switcher difficult, because the updated skeleton -# will fix the switcher at the end of the docs workflow, but never gets a -# chance to complete as the docs build warns and fails. -======= # Point 3 makes checking switcher difficult, because the updated copier template # will fix the switcher at the end of the docs workflow, but never gets a chance # to complete as the docs build warns and fails. ->>>>>>> after updating html_theme_options = { "logo": { "text": project, diff --git a/docs/tutorials/installation.md b/docs/tutorials/installation.md index 188d5751..7d337e3b 100644 --- a/docs/tutorials/installation.md +++ b/docs/tutorials/installation.md @@ -2,15 +2,10 @@ ## Check your version of python -<<<<<<< before updating -You will need python 3.7 or later. You can check your version of python by -======= -You will need python 3.10 or later. You can check your version of python by ->>>>>>> after updating -typing into a terminal: +You will need python 3.9 or later. You can check your version of python by typing into a terminal: ``` -$ python3 --version +python3 --version ``` ## Create a virtual environment @@ -19,8 +14,8 @@ It is recommended that you install into a “virtual environment” so this installation will not interfere with any existing Python software: ``` -$ python3 -m venv /path/to/venv -$ source /path/to/venv/bin/activate +python3 -m venv /path/to/venv +source /path/to/venv/bin/activate ``` ## Installing the library @@ -28,25 +23,25 @@ $ source /path/to/venv/bin/activate You can now use `pip` to install the library and its dependencies: ``` -$ python3 -m pip install pandablocks +python3 -m pip install pandablocks ``` If you need to write HDF files you should install the hdf5 extra: ``` -$ python3 -m pip install pandablocks[hdf5] +python3 -m pip install pandablocks[hdf5] ``` If you require a feature that is not currently released you can also install from github: ``` -$ python3 -m pip install git+https://github.com/PandABlocks/PandABlocks-client.git +python3 -m pip install git+https://github.com/PandABlocks/PandABlocks-client.git ``` The library should now be installed and the commandline interface on your path. You can check the version that has been installed by typing: ``` -$ PandABlocks-client --version +PandABlocks-client --version ``` diff --git a/pyproject.toml b/pyproject.toml index c50a905c..fda45abc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,54 +3,48 @@ requires = ["setuptools>=64", "setuptools_scm[toml]>=8"] build-backend = "setuptools.build_meta" [project] -name = "pandablocks" classifiers = [ - "Development Status :: 5 - Production/Stable", - "License :: OSI Approved :: Apache Software License", -<<<<<<< before updating - "Programming Language :: Python :: 3.9", -======= ->>>>>>> after updating - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] + +name = "pandablocks" description = "A Python client to control and data ports of the PandABlocks TCP server" dependencies = ["typing-extensions;python_version<'3.8'", "numpy", "click"] dynamic = ["version"] license.file = "LICENSE" readme = "README.md" -<<<<<<< before updating requires-python = ">=3.9" -======= -requires-python = ">=3.10" ->>>>>>> after updating [project.optional-dependencies] h5py = ["h5py", "matplotlib"] dev = [ - # A dev install will require [h5py] packages too - "pandablocks[h5py]", - "mypy", - "mock", - "types-mock", - "atomicwrites", - "typed-ast", - "copier", - "mypy", - "myst-parser", - "pipdeptree", - "pre-commit", - "pydata-sphinx-theme>=0.12", - "pytest", - "pytest-cov", - "pytest-asyncio", - "ruff", - "sphinx-autobuild", - "sphinx-copybutton", - "sphinx-design", - "tox-direct", - "types-mock", + # A dev install will require [h5py] packages too + "pandablocks[h5py]", + "mypy", + "mock", + "types-mock", + "atomicwrites", + "typed-ast", + "copier", + "mypy", + "myst-parser", + "pipdeptree", + "pre-commit", + "pydata-sphinx-theme>=0.12", + "pytest", + "pytest-cov", + "pytest-asyncio", + "ruff", + "sphinx-autobuild", + "sphinx-copybutton", + "sphinx-design", + "tox-direct", + "types-mock", ] [project.scripts] @@ -104,11 +98,6 @@ allowlist_externals = sphinx-build sphinx-autobuild commands = -<<<<<<< before updating - pytest: pytest --cov=src/pandablocks --cov-report term --cov-report xml:cov.xml {posargs} - mypy: mypy src tests {posargs} -======= ->>>>>>> after updating pre-commit: pre-commit run --all-files --show-diff-on-failure {posargs} type-checking: mypy src tests {posargs} tests: pytest --cov=pandablocks --cov-report term --cov-report xml:cov.xml {posargs} @@ -119,14 +108,14 @@ commands = src = ["src", "tests"] line-length = 88 lint.select = [ - "B", # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b - "C4", # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4 - "E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e - "F", # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f - "W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w - "I", # isort - https://docs.astral.sh/ruff/rules/#isort-i - "UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up - "SLF", # self - https://docs.astral.sh/ruff/settings/#lintflake8-self + "B", # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b + "C4", # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4 + "E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e + "F", # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f + "W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w + "I", # isort - https://docs.astral.sh/ruff/rules/#isort-i + "UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up + "SLF", # self - https://docs.astral.sh/ruff/settings/#lintflake8-self ] [tool.ruff.lint.per-file-ignores] diff --git a/src/pandablocks/__main__.py b/src/pandablocks/__main__.py index 79d8e229..6e7e499f 100644 --- a/src/pandablocks/__main__.py +++ b/src/pandablocks/__main__.py @@ -1,9 +1,6 @@ -<<<<<<< before updating -from pandablocks.cli import cli # test with: # pipenv run python -m pandablocks -======= """Interface for ``python -m pandablocks``.""" from argparse import ArgumentParser @@ -24,8 +21,3 @@ def main(args: Sequence[str] | None = None) -> None: version=__version__, ) parser.parse_args(args) - - ->>>>>>> after updating -if __name__ == "__main__": - cli() diff --git a/tests/conftest.py b/tests/conftest.py index 9e0edbd3..b9e894f7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,14 +1,10 @@ import asyncio import os -<<<<<<< before updating import threading from collections import deque from collections.abc import Iterable, Iterator from io import BufferedReader from pathlib import Path -======= -from typing import Any ->>>>>>> after updating import numpy as np import pytest @@ -24,7 +20,6 @@ StartData, ) -<<<<<<< before updating def chunked_read(f: BufferedReader, size: int) -> Iterator[bytes]: data = f.read(size) @@ -399,17 +394,3 @@ def dummy_server_in_thread(): "multimetadata2", "", ] -======= - @pytest.hookimpl(tryfirst=True) - def pytest_exception_interact(call: pytest.CallInfo[Any]): - if call.excinfo is not None: - raise call.excinfo.value - else: - raise RuntimeError( - f"{call} has no exception data, an unknown error has occurred" - ) - - @pytest.hookimpl(tryfirst=True) - def pytest_internalerror(excinfo: pytest.ExceptionInfo[Any]): - raise excinfo.value ->>>>>>> after updating