mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-21 22:18:21 +00:00
0bfe4400f Merge branch 'main' of github.com:sartography/spiff-arena into main fbe97dd90 Point to the latest spiffworkflow 805400312 fixed conflict with db migrations w/ burnettk 6e48c8205 Merge remote-tracking branch 'origin/main' into feature/script_get_last_user_completing_task 3a6cc9c2b added script to get process initiator w/ burnettk 37770dbca run_pyl 8a068cdb2 Merging main bf25c1cef run_pyl 4ca6e3f27 Needed an additional check for empty correlation keys - which on a RECEIVE message, should always match anything. 0fb88c50d remove unwanted test files w/ burnettk 89d92687d script to get last user completing a task is working w/ burnettk 98f056e5c Merge remote-tracking branch 'origin/main' into feature/script_get_last_user_completing_task 46af55a60 poetry remove orjson 28a0db097 wip for get_last_user_completing_task script task 2596cfeb1 postgres really will just order however it wants if you do not specify an order_by clause 5e339b2fb add ppg.ba4.sme and ba5 873cfdfc1 fix postgres db name and comment out debug job f54d6ae4d removed some unused code from task and fixed the logs table a bit w/ burnettk 7c74e216a run_pyl f53c85924 skip failing test if postgres and added comment about cause w/ burnettk fbe2237f1 # SpiffWorkflow: 1) Type Safe checking on correlation properties (no more str()) 2) A running workflows Correlations are once again at the key level. 2677736c2 look users up by service and username instead of service_id since usernames have to be unique anyway w/ burnettk 22d1f8bbb avoid using task-data endpoint for task data and only use it to get tasks based on spiff step instead 698fb5d5c put back the task data code when getting tasks b52f97453 Merge remote-tracking branch 'origin/main' into feature/task_data_api_refactor 9c4a17c93 removed commented out code w/ burnettk 3357fbef4 removed task-data endpoints since we no longer need them w/ burnettk 3b64afb65 turn off profiling again fcbcfd0ae add two users and update one 2ee7cba09 BPMN Parser was returning all retrieval expressions, rather than the ones specific to a correlation property, as was intended. Adding a correlation cache - so we have a reference of all the messages and properties (though still lacking a description of keys) Adding yet another migration, maybe should squash em. 6658e26bb added api to get task data and do not return from task data list anymore w/ burnettk 1fd3261d7 run_pyl (part 2) f6c63eb1c Merge branch 'main' of github.com:sartography/spiff-arena 5c5262a31 added comment about refactoring getting task data w/ burnettk jbirddog 6d4aa9043 lint e4c0ed7e1 add test users adfb0644f Adding Migration. ec36290f2 remove task size check since it can take a long time to run and we do not do anything with it w/ burnettk jbirddog 9b0b95f95 Merge remote-tracking branch 'origin/main' into feature/message_fixes f3d124a70 run_pyl be6ac8743 BPMN.io -- Just show the message names not the ids - to assure we are only exposing the names. SpiffWorkflow - - start_messages function should return message names, not ids. - don't catch external thrown messages within the same workflow process - add an expected value to the Correlation Property Model so we can use this well defined class as an external communication tool (rather than building an arbitrary dictionary) - Added a "get_awaiting_correlations" to an event, so we can get a list of the correlation properties related to the workflows currently defined correlation values. - workflows.waiting_events() function now returns the above awaiting correlations as the value on returned message events Backend - Dropping MessageModel and MessageCorrelationProperties - at least for now. We don't need them to send / receive messages though we may eventually want to track the messages and correlations defined across the system - these things (which are ever changing) should not be directly connected to the Messages which may be in flux - and the cross relationships between the tables could cause unexpected and unceissary errors. Commented out the caching logic so we can turn this back on later. - Slight improvement to API Errors - MessageInstances are no longer in a many-to-many relationship with Correlations - Each message instance has a unique set of message correlations specific to the instance. - Message Instances have users, and can be linked through a "counterpart_id" so you can see what send is connected to what recieve. - Message Correlations are connected to recieving message instances. It is not to a process instance, and not to a message model. They now include the expected value and retrieval expression required to validate an incoming message. - A process instance is not connected to message correlations. - Message Instances are not always tied to a process instance (for example, a Send Message from an API) - API calls to create a message use the same logic as all other message catching code. - Make use of the new waiting_events() method to check for any new recieve messages in the workflow (much easier than churning through all of the tasks) - One giant mother of a migration. ce449971a do not call serialize if we can use the cached bpmn_json instead w/ burnettk 15d720f94 Merge branch 'main' of github.com:sartography/spiff-arena 8d8347068 turn on sentry detailed tracing for task-data w/ burnettk cdf5f4053 update spiff 5c1ea3c93 run_pyl 384c272af * SpiffWorkflow event_definitions wanted to return a message event's correlation properties mested within correlation keys. But messages are directly related to properties, not to keys - and it forced a number of conversions that made for tricky code. So Messages now contain a dictionary of correlation properties only. * SpiffWorkflow did not serialize correlations - so they were lost between save and retrieve. f45103406 Allow people to run commands like "flask db upgrade" without setting specific environment variables like FLASK_SESSION_SECRET_KEY everytime - they just need to add in their own /instance/config.py with their local configuration. b169c3a87 * Re-work message tests so I could wrap my simple head around what was happening - just needed an example that made sense to me. * Clear out complex get_message_instance_receive how that many-to-many works. * Create decent error messages when correlations fail * Move correlation checks into the MessageInstance class * The APIError could bomb out ugly if it hit a workflow exception with not Task Spec. a39590912 failing test. 6db600caa Merge branch 'main' into feature/message_fixes 4942a728b work in progress - * Link between message instance and correlations is now a link table and many-to-many relationships as recommended by SQLAlchemy * Use the correlation keys, not the process id when accepting api messages. git-subtree-dir: spiffworkflow-backend git-subtree-split: 0bfe4400f4191214b8972977438ceb35a9f5b3c3
162 lines
5.0 KiB
TOML
162 lines
5.0 KiB
TOML
[tool.poetry]
|
|
name = "spiffworkflow-backend"
|
|
version = "0.0.0"
|
|
description = "Spiffworkflow Backend"
|
|
authors = ["Jason Lantz <sartography@users.noreply.github.com>"]
|
|
license = "MIT"
|
|
readme = "README.rst"
|
|
homepage = "https://github.com/sartography/spiffworkflow-backend"
|
|
repository = "https://github.com/sartography/spiffworkflow-backend"
|
|
documentation = "https://spiffworkflow-backend.readthedocs.io"
|
|
classifiers = [
|
|
"Development Status :: 1 - Planning",
|
|
]
|
|
|
|
[tool.poetry.urls]
|
|
Changelog = "https://github.com/sartography/spiffworkflow-backend/releases"
|
|
|
|
[tool.poetry.dependencies]
|
|
python = ">=3.9,<3.12"
|
|
click = "^8.0.1"
|
|
flask = "2.2.2"
|
|
flask-admin = "*"
|
|
flask-bcrypt = "*"
|
|
flask-cors = "*"
|
|
flask-mail = "*"
|
|
flask-marshmallow = "*"
|
|
flask-migrate = "*"
|
|
flask-restful = "*"
|
|
werkzeug = "*"
|
|
SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"}
|
|
#SpiffWorkflow = {develop = true, path = "../SpiffWorkflow" }
|
|
sentry-sdk = "^1.10"
|
|
sphinx-autoapi = "^2.0"
|
|
flask-bpmn = {git = "https://github.com/sartography/flask-bpmn", rev = "main"}
|
|
# flask-bpmn = {develop = true, path = "../flask-bpmn"}
|
|
mysql-connector-python = "*"
|
|
pytest-flask = "^1.2.0"
|
|
pytest-flask-sqlalchemy = "^1.1.0"
|
|
psycopg2 = "^2.9.3"
|
|
typing-extensions = "^4.4.0"
|
|
connexion = {extras = [ "swagger-ui",], version = "^2"}
|
|
lxml = "^4.9.1"
|
|
marshmallow-enum = "^1.5.1"
|
|
marshmallow-sqlalchemy = "^0.28.0"
|
|
PyJWT = "^2.6.0"
|
|
gunicorn = "^20.1.0"
|
|
APScheduler = "*"
|
|
Jinja2 = "^3.1.2"
|
|
RestrictedPython = "^6.0"
|
|
Flask-SQLAlchemy = "^3"
|
|
|
|
# type hinting stuff
|
|
# these need to be in the normal (non dev-dependencies) section
|
|
# because if not then poetry export won't have them and nox -s mypy --pythons 3.10
|
|
# will fail
|
|
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"
|
|
|
|
# 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 = "^2022.6"
|
|
dateparser = "^1.1.2"
|
|
types-dateparser = "^1.1.4.1"
|
|
flask-jwt-extended = "^4.4.4"
|
|
pylint = "^2.15.10"
|
|
|
|
|
|
[tool.poetry.dev-dependencies]
|
|
pytest = "*"
|
|
coverage = {extras = ["toml"], version = "^6.1"}
|
|
safety = "^2.3.1"
|
|
mypy = ">=0.961"
|
|
typeguard = "^2"
|
|
xdoctest = {extras = ["colors"], version = "^1.0.1"}
|
|
sphinx = "^5.0.2"
|
|
sphinx-autobuild = ">=2021.3.14"
|
|
pre-commit = "^2.20.0"
|
|
flake8 = "*"
|
|
black = ">=21.10b0"
|
|
flake8-bandit = "*"
|
|
|
|
# 1.7.3 broke us. https://github.com/PyCQA/bandit/issues/841
|
|
bandit = "*"
|
|
|
|
flake8-bugbear = "^22.10.25"
|
|
flake8-docstrings = "^1.6.0"
|
|
flake8-rst-docstrings = "^0.2.7"
|
|
# flask-sqlalchemy-stubs = "^0.2"
|
|
pep8-naming = "^0.13.2"
|
|
darglint = "^1.8.1"
|
|
reorder-python-imports = "^3.9.0"
|
|
pre-commit-hooks = "^4.0.1"
|
|
sphinx-click = "^4.3.0"
|
|
Pygments = "^2.10.0"
|
|
pyupgrade = "^3.1.0"
|
|
furo = ">=2021.11.12"
|
|
|
|
[tool.poetry.scripts]
|
|
spiffworkflow-backend = "spiffworkflow_backend.__main__:main"
|
|
|
|
[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/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",
|
|
"ignore:'app.json_encoder' is deprecated and will be removed in Flask 2.3"
|
|
]
|
|
|
|
[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
|
|
|
|
[build-system]
|
|
requires = ["poetry-core>=1.0.0"]
|
|
build-backend = "poetry.core.masonry.api"
|