[project] name = "openflexure-microscope-server" version = "3.0.0-alpha1" authors = [ { name="Richard Bowman", email="richard.bowman@cantab.net" }, { name="Joel Collins" }, { name="Julian Stirling" }, ] description = "Back-end code for the OpenFlexure Microscope" readme = "README.md" requires-python = ">=3.11" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", ] dependencies = [ "labthings-fastapi[server] == 0.0.9", "labthings-sangaboard", "camera-stage-mapping ~= 0.1.10", "opencv-python ~= 4.11.0", "openflexure-stitching[libvips]==0.1.0", "pillow ~= 10.4", "anyio ~= 4.0", "numpy ~= 2.2", "scipy ~=1.14", "piexif", "pydantic ~= 2.10.6", "simplejpeg >= 1.8.2", ] [project.optional-dependencies] dev = [ "labthings-fastapi[dev]", "ruff", "mypy[reports]", "mypy-gitlab-code-quality", # "pytest-gitlab-code-quality", # pytest version constraint clashes with labthings "pytest", "matplotlib~=3.10" ] pi = [ "picamera2~=0.3.27", ] [project.scripts] openflexure-microscope-server = "openflexure_microscope_server.server:serve_from_cli" [project.urls] "Homepage" = "https://openflexure.org/" "Bug Tracker" = "https://gitlab.com/openflexure/openflexure-microscope-server/-/issues" "Source" = "https://gitlab.com/openflexure/openflexure-microscope-server/" [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" # The [tool.poetry] metadata has been removed from this file, because # we have switched to Pipenv for dependency management and setuptools # for the build system. All metadata has been moved either to # Pipfile or setup.py. # The one key that doesn't map over nicely is the exclusion of # the node_modules folder, i.e. the line below: #exclude = ["**/node_modules/"] # I've tried to put this in the "packages" key but not sure it works. # I have left it here in case we ever switch back to Poetry, but I # don't believe it's critical at present, because we don't use # the Python package - we distribute a tarball directly. [tool.mypy] plugins = ["pydantic.mypy"] [tool.ruff] target-version = "py311" [tool.pytest.ini_options] addopts = [ "--import-mode=importlib", "--cov=openflexure_microscope_server", "--cov-report=term", "--cov-report=xml:coverage.xml", "--junitxml=report.xml", ] norecursedirs = [".git", "build", "node_modules"] pythonpath = ["."] testpaths = ["tests"] [tool.ruff.format] # Use native line endings for all files line-ending = "native" [tool.ruff.lint] # Slowly add linting rules from ruff-increased-checking.toml commented # out rules can be checked by running # ruff --config ruff-increased-checking.toml check select = [ "E", # pycodestyle errors "W", #pycodestyle warnings "F", # PyFlakes # "PL", # Pylint (a subset of, catches far less than pylint does) # "B", # Flake8 bugbear "A", # Flake8 builtins checker "C", # Flake8 comprehensions # "FIX", #TODO/FIXME's in code. These should be added during develoment for ongoing tasks. # If they are not fixed before merge they should be converted to GitLab issues # "LOG", # Flake8 logging issues (pedantic logger formatting issues can be added with "G") # "T20", # Warns for print statments, production code should log # "PT", # pytest linting "RET", # Consistent clear return statements "RSE", # Raise parentheses # "SIM", # Simplifications detected "ARG", # unused arguments "C90", # McCabe complexity! "NPY", # Numpy linting "N", # PEP8 naming # "D", # Docstring checks these may need to be added gradually "ERA001", # Commented out code! ] ignore = [ "E501" # Ignore long lines for now ]