add new endpoint to select OH equipment
parent
a110836242
commit
95b1928f56
@ -0,0 +1,17 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = false
|
||||
@ -0,0 +1,6 @@
|
||||
# Set the default behavior for all files.
|
||||
* text=auto eol=lf
|
||||
|
||||
# Normalized and converts to native line endings on checkout.
|
||||
*.py text
|
||||
*.pyx text
|
||||
@ -1,44 +1,42 @@
|
||||
# Quick Start:
|
||||
#
|
||||
# pip install pre-commit
|
||||
# pre-commit install && pre-commit install -t pre-push
|
||||
# pre-commit run --all-files
|
||||
#
|
||||
# To Skip Checks:
|
||||
#
|
||||
# git commit --no-verify
|
||||
fail_fast: false
|
||||
|
||||
default_language_version:
|
||||
python: python3.11.2
|
||||
|
||||
python: python3
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# ruff version.
|
||||
rev: v0.7.0
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: check-ast
|
||||
- id: check-builtin-literals
|
||||
- id: check-merge-conflict
|
||||
- id: check-yaml
|
||||
- id: check-toml
|
||||
|
||||
- repo: https://github.com/nbQA-dev/nbQA
|
||||
rev: 1.7.1
|
||||
hooks:
|
||||
- id: nbqa-isort
|
||||
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.13.2
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.2.1
|
||||
hooks:
|
||||
# Run the linter.
|
||||
#
|
||||
# When running with --fix, Ruff's lint hook should be placed before Ruff's formatter hook,
|
||||
# and before Black, isort, and other formatting tools, as Ruff's fix behavior can output code changes that require reformatting.
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
# Run the formatter.
|
||||
- id: ruff-format
|
||||
- id: ruff-format
|
||||
types_or: [python, pyi, jupyter]
|
||||
|
||||
# Typos
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.26.1
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: 'v0.2.0'
|
||||
hooks:
|
||||
- id: typos
|
||||
exclude: ^(data/dispatch-sample-data.dump|src/dispatch/static/dispatch/src/|src/dispatch/database/revisions/)
|
||||
- id: ruff
|
||||
types_or: [python, pyi, jupyter]
|
||||
args: [ --fix, --exit-non-zero-on-fix ]
|
||||
|
||||
# Pytest
|
||||
- repo: local
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.8.0
|
||||
hooks:
|
||||
- id: tests
|
||||
name: run tests
|
||||
entry: pytest -v tests/
|
||||
- id: mypy
|
||||
language: system
|
||||
types: [python]
|
||||
stages: [push]
|
||||
pass_filenames: false
|
||||
args: ['.']
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "PyDebug: Current File",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal",
|
||||
"args": [],
|
||||
"justMyCode": true
|
||||
},
|
||||
{
|
||||
"name": "PyDebug: Main File",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/main.py",
|
||||
"console": "integratedTerminal",
|
||||
"args": [],
|
||||
"justMyCode": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,152 @@
|
||||
{
|
||||
"editor.tabSize": 4,
|
||||
"editor.rulers": [
|
||||
120
|
||||
],
|
||||
"editor.renderWhitespace": "trailing",
|
||||
"editor.suggestSelection": "first",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.stickyScroll.enabled": false,
|
||||
"editor.bracketPairColorization.enabled": false,
|
||||
"editor.cursorSmoothCaretAnimation": "on",
|
||||
"editor.suggest.preview": true,
|
||||
"terminal.integrated.defaultProfile.windows": "Command Prompt",
|
||||
"debug.onTaskErrors": "debugAnyway",
|
||||
"explorer.compactFolders": false,
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
"explorer.confirmDelete": false,
|
||||
"explorer.copyRelativePathSeparator": "/",
|
||||
"files.autoSave": "onFocusChange",
|
||||
"files.exclude": {
|
||||
"node_modules/**/*": true,
|
||||
"**/.classpath": true,
|
||||
"**/.project": true,
|
||||
"**/.settings": true,
|
||||
"**/.factorypath": true
|
||||
},
|
||||
"files.associations": {
|
||||
"*.pyx": "cython",
|
||||
".clang*": "yaml",
|
||||
"*.gpj": "jsonc",
|
||||
"*.gvw": "jsonc",
|
||||
"*.hpp.in": "cpp"
|
||||
},
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimFinalNewlines": true,
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"workbench.startupEditor": "none",
|
||||
"workbench.editorAssociations": {
|
||||
"*.ipynb": "jupyter-notebook",
|
||||
"*.md": "vscode.markdown.preview.editor",
|
||||
"*.svg": "svgPreviewer.customEditor"
|
||||
},
|
||||
"workbench.colorTheme": "Dracula Theme Soft",
|
||||
"git.enableSmartCommit": true,
|
||||
"git.autofetch": true,
|
||||
"git.confirmSync": false,
|
||||
"git.openRepositoryInParentFolders": "always",
|
||||
"partialDiff.enableTelemetry": false,
|
||||
"prettier.tabWidth": 4,
|
||||
"prettier.singleQuote": true,
|
||||
"prettier.jsxSingleQuote": true,
|
||||
"prettier.trailingComma": "all",
|
||||
"prettier.useEditorConfig": true,
|
||||
"prettier.bracketSpacing": false,
|
||||
"markdown.validate.enabled": true,
|
||||
"[markdown]": {
|
||||
"files.trimTrailingWhitespace": false,
|
||||
"editor.formatOnSave": false,
|
||||
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
|
||||
"editor.wordWrap": "wordWrapColumn",
|
||||
"editor.wordWrapColumn": 80
|
||||
},
|
||||
"[yaml]": {
|
||||
"editor.formatOnSave": false,
|
||||
"editor.defaultFormatter": "redhat.vscode-yaml",
|
||||
"editor.wordWrap": "wordWrapColumn",
|
||||
"editor.wordWrapColumn": 80
|
||||
},
|
||||
"[json]": {
|
||||
"editor.formatOnSave": false,
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.formatOnSave": false
|
||||
},
|
||||
"[plaintext]": {
|
||||
"editor.wordWrap": "wordWrapColumn",
|
||||
"editor.wordWrapColumn": 120
|
||||
},
|
||||
"[toml]": {
|
||||
"editor.wordWrap": "wordWrapColumn",
|
||||
"editor.wordWrapColumn": 80,
|
||||
"editor.defaultFormatter": "tamasfe.even-better-toml",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"better-comments.tags": [
|
||||
{
|
||||
"tag": "XXX",
|
||||
"color": "#F8C471"
|
||||
},
|
||||
{
|
||||
"tag": "WARN",
|
||||
"color": "#FF6961"
|
||||
},
|
||||
{
|
||||
"tag": "NOTE",
|
||||
"color": "#3498DB"
|
||||
},
|
||||
{
|
||||
"tag": "TODO",
|
||||
"color": "#77C3EC"
|
||||
}
|
||||
],
|
||||
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
|
||||
"codesnap.showWindowControls": false,
|
||||
"codesnap.shutterAction": "copy",
|
||||
"Workspace_Formatter.excludePattern": [
|
||||
"**/build",
|
||||
"**/.*",
|
||||
"**/.vscode",
|
||||
"**/html"
|
||||
],
|
||||
"svg.preview.autoOpen": true,
|
||||
"remote.WSL.fileWatcher.polling": true,
|
||||
"errorLens.delay": 1000,
|
||||
"errorLens.enabledDiagnosticLevels": [
|
||||
"error",
|
||||
"warning"
|
||||
],
|
||||
"errorLens.enabled": false,
|
||||
"[python]": {
|
||||
"editor.formatOnSave": false,
|
||||
"editor.defaultFormatter": "charliermarsh.ruff",
|
||||
"editor.formatOnType": false
|
||||
},
|
||||
"python.languageServer": "Jedi",
|
||||
"python.analysis.addImport.exactMatchOnly": true,
|
||||
"python.analysis.autoImportCompletions": false,
|
||||
"python.analysis.completeFunctionParens": false,
|
||||
"python.analysis.autoFormatStrings": true,
|
||||
"python.analysis.logLevel": "Error",
|
||||
"python.createEnvironment.contentButton": "show",
|
||||
"python.missingPackage.severity": "Error",
|
||||
"mypy-type-checker.importStrategy": "fromEnvironment",
|
||||
"black-formatter.importStrategy": "fromEnvironment",
|
||||
"isort.check": true,
|
||||
"isort.importStrategy": "fromEnvironment",
|
||||
"ruff.organizeImports": false,
|
||||
"ruff.fixAll": false,
|
||||
"autoDocstring.generateDocstringOnEnter": true,
|
||||
"autoDocstring.quoteStyle": "'''",
|
||||
"jupyter.interactiveWindow.creationMode": "perFile",
|
||||
"jupyter.askForKernelRestart": false,
|
||||
"jupyter.themeMatplotlibPlots": true,
|
||||
"jupyter.logging.level": "error",
|
||||
"notebook.formatOnSave.enabled": false,
|
||||
"notebook.output.textLineLimit": 20,
|
||||
"notebook.compactView": false,
|
||||
"notebook.diff.ignoreMetadata": true,
|
||||
"notebook.diff.ignoreOutputs": true
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Python: Current File",
|
||||
"type": "shell",
|
||||
"command": "${command:python.interpreterPath} ${file}",
|
||||
"args": [],
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"label": "Python: Main File",
|
||||
"type": "shell",
|
||||
"command": "${command:python.interpreterPath} ${workspaceFolder}/main.py",
|
||||
"args": [],
|
||||
"group": "build"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,32 +1,153 @@
|
||||
[tool.poetry]
|
||||
name = "optimumohservice"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["Cizz22 <cisatraa@gmail.com>"]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
fastapi = {extras = ["standard"], version = "^0.115.4"}
|
||||
sqlalchemy = "^2.0.36"
|
||||
httpx = "^0.27.2"
|
||||
pytest = "^8.3.3"
|
||||
faker = "^30.8.2"
|
||||
factory-boy = "^3.3.1"
|
||||
sqlalchemy-utils = "^0.41.2"
|
||||
slowapi = "^0.1.9"
|
||||
uvicorn = "^0.32.0"
|
||||
pytz = "^2024.2"
|
||||
sqlalchemy-filters = "^0.13.0"
|
||||
asyncpg = "^0.30.0"
|
||||
requests = "^2.32.3"
|
||||
pydantic = "^2.10.2"
|
||||
temporalio = "^1.8.0"
|
||||
pandas = "^2.2.3"
|
||||
psycopg2-binary = "^2.9.10"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
[tool.black]
|
||||
target-version = ['py310']
|
||||
line-length = 120
|
||||
skip-string-normalization = true
|
||||
skip-magic-trailing-comma = true
|
||||
force-exclude = '''
|
||||
/(
|
||||
| docs
|
||||
| setup.py
|
||||
)/
|
||||
'''
|
||||
|
||||
[tool.isort]
|
||||
py_version = 310
|
||||
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
||||
default_section = "THIRDPARTY"
|
||||
known_third_party = []
|
||||
known_first_party = []
|
||||
known_local_folder = []
|
||||
# style: black
|
||||
multi_line_output = 3
|
||||
include_trailing_comma = true
|
||||
force_grid_wrap = 0
|
||||
use_parentheses = true
|
||||
ensure_newline_before_comments = true
|
||||
line_length = 120
|
||||
split_on_trailing_comma = true
|
||||
lines_after_imports = 2
|
||||
force_single_line = true
|
||||
skip_glob = ["docs/*", "setup.py"]
|
||||
filter_files = true
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py310"
|
||||
line-length = 120
|
||||
indent-width = 4
|
||||
extend-exclude = ["docs", "test", "tests"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["F", "E"]
|
||||
extend-select = ["W", "C90", "I", "N", "B", "A", "C4", "PERF", "RUF"]
|
||||
ignore = []
|
||||
fixable = ["ALL"]
|
||||
unfixable = []
|
||||
preview = true
|
||||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
force-single-line = true
|
||||
force-sort-within-sections = false
|
||||
lines-after-imports = 2
|
||||
known-first-party = []
|
||||
known-local-folder = []
|
||||
known-third-party = []
|
||||
section-order = [
|
||||
"future",
|
||||
"standard-library",
|
||||
"third-party",
|
||||
"first-party",
|
||||
"local-folder",
|
||||
]
|
||||
|
||||
[tool.ruff.lint.mccabe]
|
||||
max-complexity = 24
|
||||
|
||||
[tool.ruff.lint.pycodestyle]
|
||||
ignore-overlong-task-comments = true
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "numpy"
|
||||
|
||||
[tool.ruff.lint.flake8-annotations]
|
||||
allow-star-arg-any = true
|
||||
ignore-fully-untyped = true
|
||||
|
||||
[tool.ruff.lint.pylint]
|
||||
max-args = 5
|
||||
max-branches = 12
|
||||
max-locals = 15
|
||||
max-statements = 50
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "double"
|
||||
indent-style = "space"
|
||||
skip-magic-trailing-comma = false
|
||||
line-ending = "auto"
|
||||
preview = false
|
||||
docstring-code-format = true
|
||||
|
||||
[tool.mypy]
|
||||
# Platform configuration
|
||||
python_version = "3.10"
|
||||
# imports related
|
||||
ignore_missing_imports = true
|
||||
follow_imports = "silent"
|
||||
# None and Optional handling
|
||||
no_implicit_optional = false
|
||||
strict_optional = false
|
||||
# Configuring warnings
|
||||
warn_unused_configs = true
|
||||
warn_redundant_casts = true
|
||||
warn_unused_ignores = true
|
||||
warn_no_return = true
|
||||
warn_unreachable = true
|
||||
warn_return_any = false
|
||||
# Untyped definitions and calls
|
||||
check_untyped_defs = false
|
||||
disallow_untyped_calls = false
|
||||
disallow_untyped_defs = false
|
||||
disallow_incomplete_defs = false
|
||||
disallow_untyped_decorators = false
|
||||
# Disallow dynamic typing
|
||||
disallow_subclassing_any = false
|
||||
disallow_any_unimported = false
|
||||
disallow_any_expr = false
|
||||
disallow_any_decorated = false
|
||||
disallow_any_explicit = false
|
||||
disallow_any_generics = false
|
||||
# Miscellaneous strictness flags
|
||||
allow_untyped_globals = true
|
||||
allow_redefinition = true
|
||||
local_partial_types = false
|
||||
implicit_reexport = true
|
||||
strict_equality = true
|
||||
# Configuring error messages
|
||||
show_error_context = false
|
||||
show_column_numbers = false
|
||||
show_error_codes = true
|
||||
exclude = ["docs", "test", "tests"]
|
||||
|
||||
[tool.pyright]
|
||||
pythonVersion = "3.10"
|
||||
typeCheckingMode = "basic"
|
||||
# enable subset of "strict"
|
||||
reportDuplicateImport = true
|
||||
reportInvalidStubStatement = true
|
||||
reportOverlappingOverload = true
|
||||
reportPropertyTypeMismatch = true
|
||||
reportUntypedClassDecorator = false
|
||||
reportUntypedFunctionDecorator = false
|
||||
reportUntypedNamedTuple = false
|
||||
reportUnusedImport = true
|
||||
# disable subset of "basic"
|
||||
reportGeneralTypeIssues = false
|
||||
reportMissingModuleSource = false
|
||||
reportOptionalCall = false
|
||||
reportOptionalIterable = false
|
||||
reportOptionalMemberAccess = false
|
||||
reportOptionalOperand = false
|
||||
reportOptionalSubscript = false
|
||||
reportPrivateImportUsage = false
|
||||
reportUnboundVariable = false
|
||||
exclude = ["docs", "setup.py"]
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
# Packaging
|
||||
# python -m pip install -U pip
|
||||
build>=1.0.3
|
||||
twine>=5.0.0
|
||||
setuptools>=69.1.0
|
||||
|
||||
# Jupyter
|
||||
ipython>=8.21.0
|
||||
ipykernel>=6.29.2
|
||||
|
||||
# Linting/Formatting
|
||||
ruff>=0.2.1
|
||||
black>=24.2.0
|
||||
isort>=5.13.2
|
||||
|
||||
# Tooling
|
||||
pre-commit>=3.6.1
|
||||
|
||||
# Type Checker
|
||||
mypy>=1.8.0
|
||||
mypy-extensions>=1.0.0
|
||||
pyright>=1.1.350
|
||||
|
||||
# Testing
|
||||
pytest>=8.0.0
|
||||
pytest-cov>=4.1.0
|
||||
pytest-benchmark>=4.0.0
|
||||
codecov>=2.1.13
|
||||
tox>=4.12.1
|
||||
|
||||
# Documentation
|
||||
mkdocs>=1.5.3
|
||||
mkdocstrings>=0.24.0
|
||||
mkdocs-material>=9.5.9
|
||||
mkdocstrings-python>=1.8.0
|
||||
Pygments>=2.17.2
|
||||
@ -0,0 +1 @@
|
||||
-r requirements-dev.txt
|
||||
Loading…
Reference in New Issue