content: [build-system]
  requires = [
      "setuptools >= 77.0.0",
      "versioningit >= 2.2.1",
  ]
  build-backend = 'setuptools.build_meta'
  
  [project]
  name = "qcodes"
  maintainers = [{name = "QCoDeS Core Developers", email = "qcodes-support@microsoft.com"}]
  description = "Python-based data acquisition framework developed by the Copenhagen / Delft / Sydney / Microsoft quantum computing consortium"
  classifiers = [
      "Development Status :: 3 - Alpha",
      "Intended Audience :: Science/Research",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Programming Language :: Python :: 3.13",
      "Topic :: Scientific/Engineering",
  ]
  license = "MIT"
  readme = "README.rst"
  requires-python = ">=3.11"
  dependencies = [
      "broadbean>=0.11.0",
      "h5netcdf>=0.14.1",
      "h5py>=3.8.0",
      "ipywidgets>=8.0.0,<9.0.0",
      "ipykernel>=6.12.0", # implicitly required by ipywidgets >=8.0.5
      "jsonschema>=4.9.0",
      "matplotlib>=3.6.0",
      "networkx>=3.1",
      "numpy>=1.22.4",
      "packaging>=20.0",
      "pandas>=1.5.0",
      "pyarrow>=11.0.0", # will become a requirement of pandas. Installing explicitly silences a warning
      "pyvisa>=1.11.0, <1.16.0",
      "ruamel.yaml>=0.16.0,!=0.16.6",
      "tabulate>=0.9.0",
      "typing_extensions>=4.6.0",
      "tqdm>=4.59.0",
      "uncertainties>=3.2.0",
      "versioningit>=2.2.1",
      "websockets>=11.0",
      "xarray>=2023.08.0",
      "cf_xarray>=0.8.4",
      "opentelemetry-api>=1.17.0",
      "pillow>=9.2.0",
      "dask>=2022.1.0", # we are making use of xarray features that requires dask implicitly
  ]
  
  dynamic = ["version"]
  
  [project.urls]
  Homepage = "https://github.com/microsoft/Qcodes"
  Documentation = "https://microsoft.github.io/Qcodes/"
  Source = "https://github.com/microsoft/qcodes"
  Tracker = "https://github.com/microsoft/Qcodes/issues"
  Changelog = "https://microsoft.github.io/Qcodes/changes/index.html"
  
  [project.optional-dependencies]
  zurichinstruments = ["zhinst-qcodes>=0.3"]
  loop = ["qcodes_loop>=0.1.2"]
  test = [
      "coverage[toml]>=7.10.5",
      "deepdiff>=8.6.1",
      "hypothesis>=6.130.0",
      "lxml>=4.9.4",
      "lxml-stubs>=0.4.0",
      "mypy>=1.16.0",
      "pandas-stubs>=1.2.0.1",
      "pytest>=8.2.0",
      "pytest-asyncio>=0.24.0",
      "pytest-cov>=5.0.0",
      "pytest-mock>=3.13.0",
      "pytest-rerunfailures>=14.0",
      "pytest-xdist>=3.6.1",
      "PyVisa-sim>=0.6.0",
      "sphinx>=4.5.0",  # sphinx extension tests
      "types-jsonschema>=4.16.0",
      "types-networkx >= 3.1", # Version should match the networkx requirment
      "types_requests>=0.1.8",
      "types-tabulate>=0.1.0",
      "types-tqdm>=4.64.6",
      "types_pywin32>=305.0.0.7",
      "qcodes_loop>=0.1.1",
      "zhinst.qcodes>=0.5", # typecheck zhinst driver alias
      "libcst>=1.2.0", # refactor tests
  ]
  docs = [
      "autodocsumm>=0.2.9",
      "nbsphinx>=0.8.9",
      "PyVisa-sim>=0.6.0",
      "sphinx>=7.3.5",
      "sphinx-favicon>=1.0",
      "sphinx-issues>=3.0.1",
      "sphinx-jsonschema>=1.19.1",
      "furo>=2024.8.6",
      "sphinxcontrib-towncrier>=0.5.0a0",
      "towncrier>=24.8.0,<26.0.0", #  sphinxcontrib-towncrier is likely to break with new versions
      "scipy>=1.10.0", # examples using scipy
      "qcodes_loop>=0.1.1", # legacy dataset import examples
  ]
  refactor = [
      "libcst>=1.2.0"
  ]
  
  [project.scripts]
  qcodes-monitor = "qcodes.monitor.monitor:main"
  qcodes-refactor = "qcodes.extensions._refactor:main"
  qcodes-dynacool-server = "qcodes.instrument_drivers.QuantumDesign.DynaCoolPPMS.private.server:run_server"
  
  [project.entry-points."qcodes.dataset.on_export"]
  log_exported_ds = "qcodes.extensions:log_dataset_export_info"
  
  [tool.coverage.run]
  source_pkgs = ["qcodes"]
  omit = [
      "src/qcodes/__init__.py",
      "*/__init__.py",
  ]
  disable_warnings = ["module-not-measured"]
  # this warning is triggered when pytest-cov is used together with pytest-xdist
  # https://github.com/pytest-dev/pytest-cov/issues/693
  # coverage however, still seems to work fine.
  
  [tool.mypy]
  strict_optional = true
  show_column_numbers = true
  show_error_codes = true
  enable_error_code = "ignore-without-code"
  # strict confic. Eventually we would like to
  # turn all of these on. These are all setings
  # turned on by strict as of mypy 0.971
  warn_unused_configs = true
  # waiting for variadic generics so we
  # can type numpy array constructors
  disallow_any_generics = false
  # we subclass non typed classes (from ipython)
  disallow_subclassing_any = false
  # we are calling into untyped code from 3th parties
  disallow_untyped_calls = false
  disallow_untyped_defs = true
  disallow_incomplete_defs = true
  # triggers warnings in untyped code
  check_untyped_defs = false
  disallow_untyped_decorators = true
  no_implicit_optional = true
  warn_redundant_casts = true
  warn_unused_ignores = true
  # this triggers failures due to returning
  # values from untyped 3th party libs
  warn_return_any = false
  no_implicit_reexport = true
  strict_equality = true
  
  [[tool.mypy.overrides]]
  module = [
      "tests.*",
      "qcodes.instrument.mockers.ami430",
      "qcodes.instrument_drivers.Harvard.*",
      "qcodes.instrument_drivers.Keysight.keysightb1500.message_builder.*",
  ]
  disallow_untyped_defs = false
  disallow_incomplete_defs = false
  
  # these are packages that we import
  # but don't have installed by default
  [[tool.mypy.overrides]]
  module = [
      "clr",
      "gclib",
      "mcl_RF_Switch_Controller64",
      "mcl_RF_Switch_Controller_NET45",
      "pywinusb.*",
      "System.IO",
  ]
  ignore_missing_imports = true
  
  [tool.pyright]
  include = ["src","tests"]
  ignore = [
      "src/qcodes/instrument_drivers/Harvard/Decadac.py",
      ]
  reportMissingTypeStubs = true
  reportDeprecated = true
  
  typeCheckingMode = "strict"
  reportUnknownVariableType = "none"
  reportPrivateUsage = "none"
  reportUnknownMemberType = "none"
  reportUnknownParameterType = "none"
  reportMissingTypeArgument = "none"
  reportMissingParameterType = "none"
  reportUnknownArgumentType = "none"
  reportUnusedFunction = "none"
  reportUnusedImport = "none"
  reportUnknownLambdaType = "none"
  reportUnnecessaryIsInstance = "none"
  reportUntypedNamedTuple = "none"
  reportUnnecessaryComparison = "none"
  reportConstantRedefinition = "none"
  reportUnusedClass = "none"
  reportUnnecessaryCast = "none"  # mypy already checks this. If it fails for pyright its because mypy requires it
  reportUnnecessaryContains = "none"
  
  [tool.pytest.ini_options]
  minversion = "7.2"
  testpaths = "tests"
  addopts = "-n auto --dist=loadfile --cov-config=pyproject.toml"
  asyncio_default_fixture_loop_scope = "function"
  markers = "serial"
  
  # we ignore warnings
  # triggered by third party packages
  # and error on all other warnings
  filterwarnings = [
      'error',
      'ignore:open_binary is deprecated:DeprecationWarning', # pyvisa-sim deprecated in 3.11 un-deprecated in 3.12. Drop filter once we drop support for 3.11
      'ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning', # jupyter
      'ignore:unclosed database in:ResourceWarning', # internal should be fixed
      'ignore:unclosed\ <socket\.socket:ResourceWarning', # not clear from where this is coming
      'ignore:Model_336 is deprecated:qcodes.utils.deprecate.QCoDeSDeprecationWarning',  # remove once deprecated Lakeshore Model_336 and its tests has been removed
      "ignore:'mode' parameter is deprecated and will be removed in Pillow 13:DeprecationWarning",  # deprecation warning in pillow triggered by matplotlib should be fixed in mpl 3.10.4
  ]
  
  [tool.ruff]
  
  extend-include = ["*.ipynb"]
  # tests and docs are not packages so it's
  # fine that init is missing and we therefor
  # mark them as namespace packages
  namespace-packages = ["tests", "docs"]
  
  [tool.ruff.lint]
  
  preview = true
  explicit-preview-rules = true
  
  # Enable Pyflakes `E` and `F` codes by default.
  # UP pyupgrade
  # PT025 invalid use of pytest fixtures in other fixtures
  # RUF100 101 Unused and renamed noqa pragmas
  # RUF200 validate pyproject.toml
  # I isort
  # ISC flake8-implicit-str-concat
  # TID253 banned-module-level-imports
  # W pydocstyle
  # PLx pylint
  select = [
      "E", "F", "PT025", "UP", "RUF", "YTT", "INP",
      "I", "G", "ISC", "TID253", "NPY", "PLE",
      "PLR", "PLC", "PLW", "W",
      "D214", "D300", "D402", "D403", "D405", "D410", "D411", "D412", "D413", "D414", "D416", "D417", "D418", "D419",
      "TC", "PYI",
      "RUF027", "PYI059", # these are preview rules that are not yet stable but explicitly enabled.
      ]
  # G004 We have a lot of use of f strings in log messages
  # so disable that lint for now
  # NPY002 We have a lot of use of the legacy
  # random number generator. Eventually we should port this
  # code.
  # PLxxxx are pylint lints that generate a fair amount of warnings
  # it may be worth fixing some or these in the future
  # PYI036 disable until https://github.com/astral-sh/ruff/issues/9794 is fixed
  ignore = ["E501", "G004", "NPY002", "PLR2004", "PLR0913", "PLR0911", "PLR0912", "PLR0915", "PLW0602", "PLW0603", "PLW2901", "PYI036"]
  
  # we want to explicitly use the micro symbol
  # not the greek letter
  allowed-confusables = ["µ"]
  
  
  [tool.ruff.lint.isort]
  
  known-first-party = ["qcodes"]
  
  [tool.ruff.lint.per-file-ignores]
  # deprecated modules left
  # for backwards compatibility
  "src/qcodes/utils/command.py" = ["F401"]
  "src/qcodes/utils/dataset/__init__.py" = ["F401"]
  "src/qcodes/utils/dataset/doNd.py" = ["F401"]
  "src/qcodes/utils/installation.py" = ["F401"]
  "src/qcodes/utils/validators.py" = ["F401"]
  "src/qcodes/utils/threading.py" = ["F401"]
  "src/qcodes/utils/plotting.py" = ["F401"]
  "src/qcodes/utils/metadata.py" = ["F401"]
  "src/qcodes/utils/helpers.py" = ["F401"]
  "src/qcodes/instrument/base.py" = ["F401"]
  "src/qcodes/instrument/delegate/grouped_parameter.py" = ["F401"]
  "src/qcodes/instrument/function.py" = ["F401"]
  "src/qcodes/instrument/group_parameter.py" = ["F401"]
  "src/qcodes/instrument/parameter.py" = ["F401"]
  "src/qcodes/instrument/specialized_parameters.py" = ["F401"]
  "src/qcodes/instrument/sweep_values.py" = ["F401"]
  "src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py" = ["F401"]
  "src/qcodes/instrument_drivers/tektronix/Keithley_6500.py" = ["F401"]
  "src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py" = ["F401"]
  "src/qcodes/instrument_drivers/tektronix/Keithley_2450.py" = ["F401"]
  "src/qcodes/instrument_drivers/tektronix/keithley_7510.py" = ["F401"]
  "src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py" = ["F401"]
  "src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py" = ["F401"]
  "src/qcodes/instrument_drivers/rigol/DS4000.py" = ["F401"]
  "src/qcodes/instrument_drivers/rigol/DG4000.py" = ["F401"]
  "src/qcodes/instrument_drivers/rigol/DP832.py" = ["F401"]
  "src/qcodes/instrument_drivers/rigol/DP831.py" = ["F401"]
  "src/qcodes/instrument_drivers/rigol/DP821.py" = ["F401"]
  "src/qcodes/instrument_drivers/rigol/DS1074Z.py" = ["F401"]
  "src/qcodes/instrument_drivers/rigol/DG1062.py" = ["F401"]
  "src/qcodes/instrument_drivers/devices.py" = ["F401"]
  "src/qcodes/instrument_drivers/basel/sp983c_remote.py" = ["F401"]
  "src/qcodes/instrument_drivers/Lakeshore/Model_325.py" = ["F401"]
  "src/qcodes/instrument_drivers/Lakeshore/Model_336.py" = ["F401"]
  "src/qcodes/instrument_drivers/Lakeshore/Model_372.py" = ["F401"]
  "src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py" = ["F401"]
  "src/qcodes/instrument_drivers/HP/HP8133A.py" = ["F401"]
  "src/qcodes/instrument_drivers/HP/HP8753D.py" = ["F401"]
  "src/qcodes/instrument_drivers/Keysight/N9030B.py" = ["F401"]
  
  # TID253 these imports are fine at module level
  # in tests and examples
  "docs/*" = ["TID253"]
  "tests/*" = ["TID253"]
  
  [tool.ruff.lint.flake8-tidy-imports]
  # There modules are relatively slow to import
  # and only required in specific places so
  # don't import them at module level
  banned-module-level-imports = [
      "xarray", "cf_xarray","pandas", "opencensus", "tqdm.dask", "dask",
      "matplotlib", "IPython", "ruamel", "tabulate", "h5netcdf", "PIL", "qcodes_loop"]
  
  [tool.ruff.lint.pydocstyle]
  convention = "google"
  
  [tool.ruff.lint.flake8-type-checking]
  quote-annotations = true
  
  [tool.setuptools.cmdclass]
  sdist = "versioningit.cmdclass.sdist"
  build_py = "versioningit.cmdclass.build_py"
  
  [tool.towncrier]
  package = "qcodes"
  name = "QCoDeS"
  directory = "docs/changes/newsfragments"
  single_file = false
  filename = "docs/changes/{version}.rst"
  issue_format = ":pr:`{issue}`"
  
  [tool.towncrier.fragment.breaking]
  name = "Breaking Changes:"
  [tool.towncrier.fragment.new]
  name = "New:"
  [tool.towncrier.fragment.improved]
  name = "Improved:"
  [tool.towncrier.fragment.new_driver]
  name = "New Drivers:"
  [tool.towncrier.fragment.improved_driver]
  name = "Improved Drivers:"
  [tool.towncrier.fragment.underthehood]
  name = "Under the hood:"
  
  [tool.versioningit]
  # we hard code the default version to match a development version
  # due to
  # https://github.com/orgs/community/discussions/163397#discussioncomment-13888710
  default-version = "0.54.0dev+Unknown"
  
  
  [tool.versioningit.format]
  distance = "{next_version}.dev{distance}+{branch}.{vcs}{rev}"
  dirty = "{next_version}.dev{distance}+{branch}.{vcs}{rev}.dirty"
  distance-dirty = "{next_version}.dev{distance}+{branch}.{vcs}{rev}.dirty"
  
  [tool.versioningit.vcs]
  method = "git"
  match = ["v*"]
  
  [tool.versioningit.onbuild]
  source-file = "src/qcodes/_version.py"
  build-file = "qcodes/_version.py"
  