Skip to content

Commit

Permalink
Merge branch 'main' into 11_I24-exercise-motors
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina committed May 31, 2023
2 parents e8d08e1 + 967979e commit d2ea514
Show file tree
Hide file tree
Showing 43 changed files with 39,209 additions and 13 deletions.
45 changes: 34 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,41 @@ repos:
- id: check-yaml
- id: check-merge-conflict

- repo: local
# Automatic source code formatting
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
name: Run black
stages: [commit]
language: system
entry: black --check --diff
types: [python]
args: [--safe, --quiet]
files: \.pyi?
types: [file]

# Sort imports
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args:
[
"--profile=black",
'--add_imports="from __future__ import annotations',
]

# Linting
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
name: Run flake8
stages: [commit]
language: system
entry: flake8
types: [python]
additional_dependencies:
["flake8-comprehensions==3.8.0", "Flake8-pyproject"]
args: ["--max-line-length=88", "--ignore=E203,F811,F722,E501,W503,C408"]

# Type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
files: 'src/.*\.py$'
additional_dependencies: [types-requests]
args: ["--ignore-missing-imports", "--no-strict-optional"]
15 changes: 13 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]
description = "Bluesky tools for MX Beamlines"
dependencies = ["bluesky", "ophyd", "pyepics", "jupyterlab", "matplotlib"]
dependencies = [
"bluesky",
"ophyd",
"pyepics",
"jupyterlab",
"matplotlib",
"requests",
"opencv-python",
]
dynamic = ["version"]
license.file = "LICENSE"
readme = "README.rst"
Expand All @@ -34,6 +42,7 @@ dev = [
"sphinx-design",
"tox-direct",
"types-mock",
"types-requests",
]

[project.scripts]
Expand All @@ -46,6 +55,8 @@ GitHub = "https://github.com/DiamondLightSource/mx_bluesky"
email = "dominic.oram@diamond.ac.uk"
name = "Dominic Oram"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools_scm]
write_to = "src/mx_bluesky/_version.py"
Expand Down Expand Up @@ -104,7 +115,7 @@ allowlist_externals =
sphinx-autobuild
commands =
pytest: pytest {posargs}
mypy: mypy src tests {posargs}
mypy: mypy src tests {posargs} --ignore-missing-imports --no-strict-optional {posargs}
pre-commit: pre-commit run --all-files {posargs}
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
"""
Empty file.
Loading

0 comments on commit d2ea514

Please sign in to comment.