spiff-arena/spiffworkflow-backend/pyproject.toml

248 lines
7.6 KiB
TOML
Raw Normal View History

[tool.poetry]
name = "spiffworkflow-backend"
version = "0.0.0"
description = "Spiffworkflow Backend"
authors = ["Sartography <sartography@users.noreply.github.com>"]
license = "LGPL-2.1"
readme = "README.rst"
homepage = "https://spiffworkflow.org"
repository = "https://github.com/sartography/spiff-arena"
documentation = "https://spiff-arena.readthedocs.io"
classifiers = [
"Development Status :: 4 - Beta",
]
[tool.poetry.urls]
Changelog = "https://github.com/orgs/sartography/packages?repo_name=spiff-arena"
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
flask = "2.2.5"
flask-admin = "*"
flask-bcrypt = "*"
flask-cors = "*"
2023-05-27 22:17:51 +00:00
flask-jwt-extended = "^4.4.4"
flask-mail = "*"
flask-marshmallow = "*"
flask-migrate = "*"
flask-restful = "*"
SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"}
# SpiffWorkflow = {develop = true, path = "../../spiffworkflow/" }
Feature/interstitial summary part 3 (#367) * throw an error if backend gives a 500 from interstitial page w/ burnettk * turn unexpected errors for the interstitial page into event stream responses to avoid error misdirection * pyl * raise the api_error from the original and make the render_data method private * Feature/interstitial summary (#337) * * Process instance logs and messages are now components rather than pages, and are included within tabs on the process instance page, along with the diagram. * Removed the Zoom and Move modules when showing the readonly Diagram. Assured this readonly view is resized to fit the space when possible. * Checkbox Widget no longer displays a duplicate label. * CSS Tweaks * All pages are limited to a max display width of 1440, with auto margins to center the main content on the page. * "Show" pages, like ProcessInstanceShow, TaskShow have the primary content limited to 1000, also with auto-margins. * Paragraphs, headings, blockquotes, list items are limited to a width of 640. * Reduced margin bottom on all breadcrumbs. * Slightly reduced the width and margin of tiles * ordered lists and unordered lists show numbers and bullets now. * End user Instructions component can, optionally, auto-collapse, so that only a portion is displayed, along with a toggle. This is how it is set up for the ProcessInstanceShow page. * Greatly reduced the lag in the interstitial page when doing a re-direct. * run_pyl * kill console * wait for permissionsLoaded too since we are using ability.can * Previous change removed the top level Messages page - this re-adds it. * I am always, ALWAYS shocked at how I can not wrap my head around when and where to use "useEffect". This should cause the show/hide Instructions toggle to only show when useful. * Minor cleanup on the process instance properties display. * linting --------- Co-authored-by: burnettk <burnettk@users.noreply.github.com> * Fix a linting error. * minor permissions related fixes for the new ui. * Revert "Revert "Feature/better subworkflow management (#331)"" This reverts commit 48dcde8faf00241201c515b54444fe9fb373c7f4. * do not execute tasks from the process instance show page w/ burnettk * pyl w/ burnettk * Very minor UI tweak to resolve a number of issues mentioned in SPIFF-316 Notion Ticket: * Markdown links now open in a new window * Tables on the home pages are now contained within Grids to better align them with the other content that is in a grid. * Right aligned the "process instance list link" button to it is flush right with the table underneath * Gave a little more breathing room the content on the info/metadata in the process instance view . * updated docker image build action to contain the appropriate version info w/ burnettk * properly resize to the available columns depending on s/m/l --------- Co-authored-by: jasquat <jasquat@users.noreply.github.com> Co-authored-by: Dan Funk <daniel.h.funk@gmail.com> Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-07-03 05:24:54 +00:00
# SpiffWorkflow = {develop = true, path = "../../SpiffWorkflow/" }
sentry-sdk = "^1.10"
# sphinx-autoapi = "^2.0"
psycopg2 = "^2.9.3"
Squashed 'spiffworkflow-backend/' changes from 03bf7a61..10c443a2 10c443a2 Merge pull request #130 from sartography/feature/data 71c803aa allow passing in the log level into the app w/ burnettk daeb82d9 Merge pull request #126 from sartography/dependabot/pip/typing-extensions-4.4.0 14c8f52c Merge pull request #123 from sartography/dependabot/pip/dot-github/workflows/poetry-1.2.2 92d204e6 Merge remote-tracking branch 'origin/main' into feature/data 1cb77901 run the save all bpmn script on server boot w/ burnettk 16a6f476 Bump typing-extensions from 4.3.0 to 4.4.0 d8ac61fc Bump poetry from 1.2.1 to 1.2.2 in /.github/workflows 3be27786 Merge pull request #131 from sartography/feature/permissions2 1fd8fc78 Merge remote-tracking branch 'origin/main' into feature/permissions2 d29621ae data setup on app boot 0b21a5d4 refactor bin/save_all_bpmn.py into service code 02fb9d61 lint c95db461 refactor scripts 98628fc2 This caused a problem with scopes when token timed out. d8b2323b merged in main and resolved conflicts d01b4fc7 updated sentry-sdk to resolve deprecation warnings 5851ddf5 update for mypy in python 3.9 508f9900 merged in main and resolved conflicts 68d69978 precommit w/ burnettk 85a4ee16 removed debug print statements w/ burnettk 93eb91f4 added keycloak configs and user perms for staging w/ burnettk e4ded8fc added method to import permissions from yml file w/ burnettk 22ba89ae use percents instead of asterisks to better support db syntax w/ burnettk 0c116ae8 postgres does not use backticks w/ burnettk 621ad3ef attempting to see if sql like statement works in other dbs as well w/ burnettk git-subtree-dir: spiffworkflow-backend git-subtree-split: 10c443a2d82752e8ed9d1679afe6409d81029006
2022-10-12 19:28:52 +00:00
typing-extensions = "^4.4.0"
Tcoz openai assist (#1138) * Update README.md Some notes for people that might want to run full-on native, with detail about how Mac hijacks port 7000 and how to get around it. * Revert "Update README.md" This reverts commit 096887c26d591f93a836ef808c148af09767f2d2. * README update and native code patch Some details for user that might be running Python3, Mac, and want to run everything locally/natively. * Implement basic tooltips Uses MUI tooltip, as it behaves more predictably with existing styling, and enables top-level theme config. Top-level configuration for all MUI components can be controlled via overriding the existing theme. See index.tsx. This could be done per user for customization, etc. Enabling JSON module imports in tsconfig.json seemed to fix the error in ReactDiagramEditor * Naive AI code editor implementation A working starting point. * Implement API to return if script assist should be enabled Along with route and function, api config, etc. * UI calls backend to see if script assist is enabled. If it is, loads the related UI, otherwise it doesn't appear. * Moving forward with service for message processing. * Services scaffolded * Open API called, prompt-engineered to get script only. * Little cleanup work * Enabled + process message working. Had to find all the places permissions are enabled, etc. * Cleanup, comments, etc. * Env vars, styling, error cases, conditional display of script assist Finishing touches for the most part. REQUIRES TWO ENV VARS BE SET. SPIFFWORKFLOW_SCRIPT_ASSIST_ENABLED=["True" | "true" | 1] (anything else is false) SECRET_KEY_OPENAI_API=[thekey] The are retrieved in default.py. I run the app locally, so I just set them in the terminal. NEW INSTALL: @carbon/colors (so we consistently use carbon palette etc.) * Fix tooltips, clean up some styling. Finishing it off. * Add loader and error message Complete UX stuff * Update useScriptAssistEnabled.tsx Remove log * Update script_assist_controller.py Add this tweak to avoid TMI. * Some reasonable changes suggested by the build process * Comments from PR. * Update ProcessModelEditDiagram.tsx Should (but I don't know how to tell yet) call the change handler that wasn't firing before. * updated the permissions setting in authorization service w/ burnettk * precommit now passes. tests are failing w/ burnettk * pinned SpiffWorkflow to known working version and fixed tests. we will update spiff in a later pr w/ burnettk * made changes based on coderabbi suggestions * updated the error handling to be more inline with how we have handled other errors and some ui tweaks * removed pymysql package w/ burnettk * forgot to remove pymysql from lock file w/ burnettk --------- Co-authored-by: Tim Consolazio <tcoz@tcoz.com> Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com> Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 15:42:27 +00:00
openai = "^1.1.0"
spiffworkflow-connector-command = {git = "https://github.com/sartography/spiffworkflow-connector-command.git", rev = "main"}
# pinned to higher than 65.5.0 because of a vulnerability
# and to lower than 67 because i didn't feel like addressing
# new deprecation warnings. we don't need this library explicitly,
# but at one time it was pulled in by various libs we depend on.
setuptools = "^65.5.1"
# we cannot upgrade werkzeug due to connexion. See comment in .snyk file
werkzeug = "^2.3"
connexion = {extras = [ "swagger-ui",], version = "^2"}
lxml = "^4.9.1"
marshmallow-enum = "^1.5.1"
PyJWT = "^2.6.0"
gunicorn = "^21.0.0"
2022-11-22 02:15:48 +00:00
APScheduler = "*"
Jinja2 = "^3.1.3"
RestrictedPython = "^7.0"
Flask-SQLAlchemy = "^3"
Squashed 'spiffworkflow-backend/' changes from 5225a8b4..1e831706 1e831706 Merge pull request #146 from sartography/test_arena_push df95dccf fixed conflicts and updated usage of active task status w/ burnettk 33b81894 Merge pull request #145 from sartography/feature/remove-task-data-from-active-task 7e1ce35c remove task_data column b9cd1c06 Merge pull request #144 from sartography/feature/lib-updates-and-mypy 5e09e28d fix mypy 68485ab4 use fork of sqlalchemy-stubs 872480db Merge remote-tracking branch 'origin/main' into feature/lib-updates-and-mypy 18a892f6 work in progress 84344d53 Pause/resume process instances (#2) 53652cff Merge commit '4a48d9cccd1ca8619b3dbef3c10bcce667c9d9e0' 9ea3def2 lint c05b5181 Merge remote-tracking branch 'origin/main' into feature/lib-updates-and-mypy b2a75f60 Merge commit 'c661100e03eef762cb51b02be1b309ec47be7002' 3ddaa5d0 lib updates and mypy 30d04282 Merge commit '4fdb0f3ec4b3b6a68cc2e56ed84ffb6dc2743068' a961b2a1 Merge commit '81746ee508f6ab0ffe757856d9a3d5d855db2560' 10651984 Merge commit '8f8b4717990eb86c6bfd2f309ef064152c51b452' 59b90fba Merge branch 'main' of github.com:sartography/spiff-arena 577e0fe3 Merge commit 'a166df83031cb88d223e5c75ae8db8c896622821' 11d40241 Merge commit '106e2ca7214aec4dba965ccb3f94b0658acaa2b2' 1fcc935e Merge commit '9781908243408ed221f2b0131a00b8a9612f81f3' e9734bff Merge commit '64e7049c9a0a4360101a155a41ce64ae692acd3c' 28239aa4 Merge commit 'aa22f4b397a899fa06d06c2e9127ca98d9eb909a' 8b184a5c Merge commit '4f0f5b1ece069ec56f8eb4154d61334a321749a1' bd1effc6 Merge commit 'b4975660431c275ce736e0431b98c39548200af1' eafa4f61 Merge commit 'c9bd62250452403550ae1bf1d27547d4796dd316' 50d9a0c3 Merge commit '9be0517531543655a35023af17b76dbb41eab93e' 34e98b77 Merge commit 'a1a01ad25a1ef60b879dede6f037f0fff3381ae4' c8d0cb8a Merge commit 'bee232a55a82054e629f48f0333495b61a7da7d1' 00478271 Merge commit '71e189afbc127b574cca8d02fc31b2e65aff0d52' 657fbad9 Merge commit 'f21d0ef3a98458deb347fb2a51fab0b5b41f7fe2' c91c279e Merge commit '93dbce681ec89bc45479748aaae06ddd92b64da4' b95a1af9 Merge commit '48918b00428e777ea29d351662467c0ac4e34a36' afea9254 pre-commit updates e3bc3b76 Merge main, resolve conflicts 2e317da8 Updaging the jinja processing so it doesn't leave a bunch of blank lines in the markdown that has strong feelings about white space. Updating the front end to render markdown formatted instructions. And adding a little css love to tables that are generated in Markdown. git-subtree-dir: spiffworkflow-backend git-subtree-split: 1e831706a1f7ed841e343537cfe1dc05d5eedaca
2022-10-21 14:36:41 +00:00
# https://github.com/dropbox/sqlalchemy-stubs/pull/251
# someday get off github
# sqlalchemy-stubs = "^0.4"
# sqlalchemy-stubs = { git = "https://github.com/dropbox/sqlalchemy-stubs.git", rev = "master" }
# sqlalchemy-stubs = {develop = true, path = "/Users/kevin/projects/github/sqlalchemy-stubs"}
# for now use my fork
sqlalchemy-stubs = { git = "https://github.com/burnettk/sqlalchemy-stubs.git", rev = "scoped-session-delete" }
simplejson = "^3.17.6"
pytz = "^2023.3"
dateparser = "^1.2.0"
2024-02-01 19:02:49 +00:00
cryptography = "^42.0"
2023-03-23 02:40:56 +00:00
prometheus-flask-exporter = "^0.22.3"
Squashed 'spiffworkflow-backend/' changes from 5225a8b4..1e831706 1e831706 Merge pull request #146 from sartography/test_arena_push df95dccf fixed conflicts and updated usage of active task status w/ burnettk 33b81894 Merge pull request #145 from sartography/feature/remove-task-data-from-active-task 7e1ce35c remove task_data column b9cd1c06 Merge pull request #144 from sartography/feature/lib-updates-and-mypy 5e09e28d fix mypy 68485ab4 use fork of sqlalchemy-stubs 872480db Merge remote-tracking branch 'origin/main' into feature/lib-updates-and-mypy 18a892f6 work in progress 84344d53 Pause/resume process instances (#2) 53652cff Merge commit '4a48d9cccd1ca8619b3dbef3c10bcce667c9d9e0' 9ea3def2 lint c05b5181 Merge remote-tracking branch 'origin/main' into feature/lib-updates-and-mypy b2a75f60 Merge commit 'c661100e03eef762cb51b02be1b309ec47be7002' 3ddaa5d0 lib updates and mypy 30d04282 Merge commit '4fdb0f3ec4b3b6a68cc2e56ed84ffb6dc2743068' a961b2a1 Merge commit '81746ee508f6ab0ffe757856d9a3d5d855db2560' 10651984 Merge commit '8f8b4717990eb86c6bfd2f309ef064152c51b452' 59b90fba Merge branch 'main' of github.com:sartography/spiff-arena 577e0fe3 Merge commit 'a166df83031cb88d223e5c75ae8db8c896622821' 11d40241 Merge commit '106e2ca7214aec4dba965ccb3f94b0658acaa2b2' 1fcc935e Merge commit '9781908243408ed221f2b0131a00b8a9612f81f3' e9734bff Merge commit '64e7049c9a0a4360101a155a41ce64ae692acd3c' 28239aa4 Merge commit 'aa22f4b397a899fa06d06c2e9127ca98d9eb909a' 8b184a5c Merge commit '4f0f5b1ece069ec56f8eb4154d61334a321749a1' bd1effc6 Merge commit 'b4975660431c275ce736e0431b98c39548200af1' eafa4f61 Merge commit 'c9bd62250452403550ae1bf1d27547d4796dd316' 50d9a0c3 Merge commit '9be0517531543655a35023af17b76dbb41eab93e' 34e98b77 Merge commit 'a1a01ad25a1ef60b879dede6f037f0fff3381ae4' c8d0cb8a Merge commit 'bee232a55a82054e629f48f0333495b61a7da7d1' 00478271 Merge commit '71e189afbc127b574cca8d02fc31b2e65aff0d52' 657fbad9 Merge commit 'f21d0ef3a98458deb347fb2a51fab0b5b41f7fe2' c91c279e Merge commit '93dbce681ec89bc45479748aaae06ddd92b64da4' b95a1af9 Merge commit '48918b00428e777ea29d351662467c0ac4e34a36' afea9254 pre-commit updates e3bc3b76 Merge main, resolve conflicts 2e317da8 Updaging the jinja processing so it doesn't leave a bunch of blank lines in the markdown that has strong feelings about white space. Updating the front end to render markdown formatted instructions. And adding a little css love to tables that are generated in Markdown. git-subtree-dir: spiffworkflow-backend git-subtree-split: 1e831706a1f7ed841e343537cfe1dc05d5eedaca
2022-10-21 14:36:41 +00:00
sqlalchemy = "^2.0.7"
marshmallow-sqlalchemy = "^1.0.0"
spiff-element-units = "^0.3.1"
# mysqlclient lib is deemed better than the mysql-connector-python lib by sqlalchemy
# https://docs.sqlalchemy.org/en/20/dialects/mysql.html#module-sqlalchemy.dialects.mysql.mysqlconnector
Tcoz openai assist (#1138) * Update README.md Some notes for people that might want to run full-on native, with detail about how Mac hijacks port 7000 and how to get around it. * Revert "Update README.md" This reverts commit 096887c26d591f93a836ef808c148af09767f2d2. * README update and native code patch Some details for user that might be running Python3, Mac, and want to run everything locally/natively. * Implement basic tooltips Uses MUI tooltip, as it behaves more predictably with existing styling, and enables top-level theme config. Top-level configuration for all MUI components can be controlled via overriding the existing theme. See index.tsx. This could be done per user for customization, etc. Enabling JSON module imports in tsconfig.json seemed to fix the error in ReactDiagramEditor * Naive AI code editor implementation A working starting point. * Implement API to return if script assist should be enabled Along with route and function, api config, etc. * UI calls backend to see if script assist is enabled. If it is, loads the related UI, otherwise it doesn't appear. * Moving forward with service for message processing. * Services scaffolded * Open API called, prompt-engineered to get script only. * Little cleanup work * Enabled + process message working. Had to find all the places permissions are enabled, etc. * Cleanup, comments, etc. * Env vars, styling, error cases, conditional display of script assist Finishing touches for the most part. REQUIRES TWO ENV VARS BE SET. SPIFFWORKFLOW_SCRIPT_ASSIST_ENABLED=["True" | "true" | 1] (anything else is false) SECRET_KEY_OPENAI_API=[thekey] The are retrieved in default.py. I run the app locally, so I just set them in the terminal. NEW INSTALL: @carbon/colors (so we consistently use carbon palette etc.) * Fix tooltips, clean up some styling. Finishing it off. * Add loader and error message Complete UX stuff * Update useScriptAssistEnabled.tsx Remove log * Update script_assist_controller.py Add this tweak to avoid TMI. * Some reasonable changes suggested by the build process * Comments from PR. * Update ProcessModelEditDiagram.tsx Should (but I don't know how to tell yet) call the change handler that wasn't firing before. * updated the permissions setting in authorization service w/ burnettk * precommit now passes. tests are failing w/ burnettk * pinned SpiffWorkflow to known working version and fixed tests. we will update spiff in a later pr w/ burnettk * made changes based on coderabbi suggestions * updated the error handling to be more inline with how we have handled other errors and some ui tweaks * removed pymysql package w/ burnettk * forgot to remove pymysql from lock file w/ burnettk --------- Co-authored-by: Tim Consolazio <tcoz@tcoz.com> Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com> Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 15:42:27 +00:00
mysqlclient = "^2.2.3"
flask-session = "^0.5.0"
flask-oauthlib = "^0.9.6"
Feature/background proc with celery (#788) * WIP: some initial test code to test out celery w/ burnettk * some cleanup for celery and added base model to put tasks waiting on timers * removed dup bpmn file * some more cleanup and added strategy to queue instructions * some minor code changes w/ burnettk * remove the unused next_task key from api calls since nobody uses it w/ burnettk essweine * added migration for future tasks and added test to make sure we are inserting into it w/ burnettk essweine * ensure future task run at time can be updated w/ burnettk * added table to queue instructions for end user in w/ burnettk * added test to ensure we are storing instructions for end users w/ burnettk * added progress page to display new instructions to user * ignore dup instructions on db insert w/ burnettk * some more updates for celery w/ burnettk * some pyl and test fixes w/ burnettk * fixed tests w/ burnettk * WIP: added in page to show instructions on pi show page w/ burnettk * pi show page is fully using not interstitial now w/ burnettk * fixed broken test w/ burnettk * moved background processing items to own module w/ burnettk * fixed apscheduler start script * updated celery task queue to handle future tasks and upgraded black and set its line-length to match ruff w/ burnettk * added support to run future tasks using countdown w/ burnettk * build image for celery branch w/ burnettk * poet does not exist in the image w/ burnettk * start blocking scheduler should always start the scheduler w/ burnettk * add init and stuff for this branch * make this work not just on my mac * send other args to only * added running status for process instance and use that on fe to go to show page and added additional identifier to locking system to isolate celery workers better w/ burnettk * fixed typing error that typeguard found, not sure why mypy did not w/ burnettk * do not check for no instructions on interstitial page for cypress tests on frontend w/ burnettk * do not queue process instances twice w/ burnettk * removed bad file w/ burnettk * queue tasks using strings to avoid circular imports when attmepting to queue w/ burnettk * only queue imminent new timer events and mock celery * some keyboard shortcut support on frontend and added ability to force run a process instance over the api w/ burnettk * some styles added for the shortcut menu w/ burnettk * pyl w/ burnettk * fixed test w/ burnettk * removed temporary celery script and added support for celery worker in run server locally w/ burnettk * cleaned up migrations w/ burnettk * created new migration to clean up old migrations --------- Co-authored-by: jasquat <jasquat@users.noreply.github.com> Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-12-05 16:41:59 +00:00
celery = {extras = ["redis"], version = "^5.3.5"}
celery-stubs = "^0.1.3"
jsonschema = "^4.20.0"
chardet = "^5.2.0"
[tool.poetry.scripts]
spiffworkflow-backend = "spiffworkflow_backend.__main__:main"
[tool.poetry.group.dev.dependencies]
2023-03-06 15:12:54 +00:00
pytest = "^7.1.2"
coverage = {extras = ["toml"], version = "^7.4"}
2023-05-27 22:17:51 +00:00
safety = "^2.3.5"
mypy = ">=0.961"
2023-11-24 18:27:46 +00:00
typeguard = "^4"
xdoctest = {extras = ["colors"], version = "^1.1.3"}
pre-commit = "^2.20.0"
black = ">=21.10b0"
2023-12-06 00:43:41 +00:00
ruff = "^0.1.7"
pytest-random-order = "^1.1.0"
pytest-flask = "^1.2.0"
pytest-flask-sqlalchemy = "^1.1.0"
# 3.4+ broke existfirst option which we use
# https://stackoverflow.com/questions/77667559/pytest-xdist-3-40-and-higher-not-honoring-exitfirst
# https://github.com/pytest-dev/pytest-xdist/issues/1034
pytest-xdist = "3.3.1"
# 1.7.3 broke us. https://github.com/PyCQA/bandit/issues/841
bandit = "1.7.7"
# flask-sqlalchemy-stubs = "^0.2"
pre-commit-hooks = "^4.0.1"
Pygments = "^2.10.0"
# type hinting stuff
types-dateparser = "^1.1.4.1"
types-Werkzeug = "^1.0.9"
types-PyYAML = "^6.0.12"
types-Flask = "^1.1.6"
types-requests = "^2.28.6"
types-pytz = "^2022.1.1"
[tool.pytest.ini_options]
# ignore deprecation warnings from various packages that we don't control
filterwarnings = [
# note the use of single quote below to denote "raw" strings in TOML
# kombu/utils/compat.py:82
'ignore:SelectableGroups dict interface is deprecated. Use select.',
# flask_marshmallow/__init__.py:34
# marshmallow_sqlalchemy/convert.py:17
'ignore:distutils Version classes are deprecated. Use packaging.version instead.',
# connexion/json_schema.py:17
'ignore:jsonschema.exceptions.RefResolutionError is deprecated as of version 4.18.0',
'ignore:jsonschema.RefResolver is deprecated as of v4.18.0',
# connexion/spec.py:50
'ignore:Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release',
# connexion/decorators/validation.py:16
'ignore:Accessing jsonschema.draft4_format_checker is deprecated and will be removed in a future release.',
# connexion/apis/flask_api.py:236
"ignore:'_request_ctx_stack' is deprecated and will be removed in Flask 2.3",
"ignore:Setting 'json_encoder' on the app or a blueprint is deprecated and will be removed in Flask 2.3",
"ignore:'JSONEncoder' is deprecated and will be removed in Flask 2.3",
2023-03-17 02:42:35 +00:00
"ignore:'app.json_encoder' is deprecated and will be removed in Flask 2.3",
# SpiffWorkflow/bpmn/PythonScriptEngineEnvironment.py
'ignore:The usage of Box has been deprecated',
# dateutil/tz/tz.py:37
'ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated:DeprecationWarning',
]
[tool.coverage.paths]
source = ["src", "*/site-packages"]
tests = ["tests", "*/tests"]
[tool.coverage.run]
branch = true
source = ["spiffworkflow_backend", "tests"]
[tool.coverage.report]
show_missing = true
fail_under = 50
[tool.mypy]
strict = true
disallow_any_generics = false
warn_unreachable = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
plugins = "sqlmypy"
# We get 'error: Module has no attribute "set_context"' for sentry-sdk without this option
implicit_reexport = true
# allow for subdirs to NOT require __init__.py
namespace_packages = true
explicit_package_bases = false
# [tool.pyright]
# Pyright: Import "flask" could not be resolved
# ultimately resolved by creating a pyrightconfig.json file with venv and venvPath
# Pyright: "hey" is not accessed
# See: https://github.com/microsoft/pyright/discussions/3929#discussioncomment-5434231
# "Those are not warnings" and cannot be turned off like this:
# reportUnusedVariable = false
# solution was https://www.reddit.com/r/neovim/comments/11k5but/comment/jbjwwtf in vim settings
2023-05-28 02:33:53 +00:00
[tool.ruff]
lint.select = [
2023-12-06 00:43:41 +00:00
# "ANN", # flake8-annotations
"ASYNC", # flake8-async
2023-05-27 22:17:51 +00:00
"B", # flake8-bugbear
2023-12-06 00:43:41 +00:00
# "BLE", # flake8-blind-except
"C", # mccabe
2023-12-06 00:43:41 +00:00
# "D", # pydocstyle
2023-05-27 22:17:51 +00:00
"E", # pycodestyle error
# "ERA", # eradicate
2023-05-27 18:59:52 +00:00
"F", # pyflakes
2023-12-06 00:43:41 +00:00
# "FBT", # flake8-boolean-trap
"N", # pep8-naming
2023-05-30 23:39:15 +00:00
"PL", # pylint
"S", # flake8-bandit
"T", # flake8-print
2023-05-27 18:59:52 +00:00
"UP", # pyupgrade
2023-05-27 22:17:51 +00:00
"W", # pycodestyle warning
2023-12-06 00:43:41 +00:00
"I", # isort
"YTT", # flake8-2020
]
2023-05-30 23:39:15 +00:00
lint.ignore = [
"C901", # "complexity" category
2023-05-30 23:39:15 +00:00
"PLR", # "refactoring" category has "too many lines in method" type stuff
"PLC1901",
"PLE1205" # saw this Too many arguments for `logging` format string give a false positive once
]
line-length = 130
2023-05-27 22:17:51 +00:00
# target python 3.10
target-version = "py310"
exclude = [
"migrations"
]
[tool.ruff.lint.per-file-ignores]
"migrations/versions/*.py" = ["E501"]
"tests/**/*.py" = ["PLR2004", "S101"] # PLR2004 is about magic vars, S101 allows assert
"bin/*.py" = ["T"] # it's ok to print things in scripts
[tool.ruff.lint.isort]
force-single-line = true
2023-11-20 16:04:33 +00:00
# pip install fixit && fixit fix -a src
[tool.fixit]
disable = [
"fixit.rules:CompareSingletonPrimitivesByIs",
]
[tool.black]
line-length = 130
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"