Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Jan 23, 2025
1 parent bdd779d commit 84046c6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 95 deletions.
6 changes: 0 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
21 changes: 8 additions & 13 deletions docs/tutorials/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,34 +14,34 @@ 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

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
```
87 changes: 38 additions & 49 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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}
Expand All @@ -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]
Expand Down
8 changes: 0 additions & 8 deletions src/pandablocks/__main__.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -24,8 +21,3 @@ def main(args: Sequence[str] | None = None) -> None:
version=__version__,
)
parser.parse_args(args)


>>>>>>> after updating
if __name__ == "__main__":
cli()
19 changes: 0 additions & 19 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -24,7 +20,6 @@
StartData,
)

<<<<<<< before updating

def chunked_read(f: BufferedReader, size: int) -> Iterator[bytes]:
data = f.read(size)
Expand Down Expand Up @@ -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

0 comments on commit 84046c6

Please sign in to comment.