-
Notifications
You must be signed in to change notification settings - Fork 32
♻️ Extract Celery code to a new simcore library
#7698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
giancarloromeo
merged 124 commits into
ITISFoundation:master
from
giancarloromeo:extract-celery-code
Jun 23, 2025
Merged
Changes from 106 commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
0545b05
Initial commit
giancarloromeo 3d833dd
add files
giancarloromeo 5eff59d
rename
giancarloromeo 8eb12a0
add codeowner
giancarloromeo 48b4532
add dependency
giancarloromeo f4ca78a
add reqs
giancarloromeo 04690ca
refactor
giancarloromeo 5cfdb51
refactor
giancarloromeo d5cdf8c
add celery dep
giancarloromeo a1de0be
continue
giancarloromeo 305f925
continue
giancarloromeo 836f751
update deps
giancarloromeo 61eb070
tests
giancarloromeo 115748e
add py.typed
giancarloromeo 50983d3
add assert
giancarloromeo 6ea72b1
move tests
giancarloromeo daa3a7a
add celery-library
giancarloromeo 39856a0
ci
giancarloromeo 1630ee9
add celery-library.bash
giancarloromeo 757d96a
add celery-lib
giancarloromeo 08e887f
add Makefile
giancarloromeo 5ccbded
typecheck
giancarloromeo 69d24ca
fix tests
giancarloromeo da2bf53
typecheck
giancarloromeo ab48cea
revert
giancarloromeo 2ea37be
Merge branch 'master' into extract-celery-code
giancarloromeo fa25e67
add ref
giancarloromeo 74d77b4
add type hint
giancarloromeo 43fd068
typecheck
giancarloromeo 6de9a83
typecheck
giancarloromeo ca9d7c5
Merge branch 'master' into extract-celery-code
giancarloromeo 2405161
remove pydantic
giancarloromeo 54a4f5f
Merge branch 'extract-celery-code' of github.com:giancarloromeo/ospar…
giancarloromeo 9d234de
add task_id
giancarloromeo 17382ca
Merge branch 'master' into extract-celery-code
giancarloromeo 4589ae1
fix body
giancarloromeo 4baa92c
Merge branch 'extract-celery-code' of github.com:giancarloromeo/ospar…
giancarloromeo 490ba71
assert
giancarloromeo 1477536
fix return
giancarloromeo 8e5dd06
Merge branch 'master' into extract-celery-code
giancarloromeo c080344
fix modeldump
giancarloromeo 0fc9137
add params
giancarloromeo ea0665c
Merge branch 'master' into extract-celery-code
bisgaard-itis 4479935
Merge branch 'master' into extract-celery-code
bisgaard-itis 58e7fa1
start adding tests to celery module
bisgaard-itis c8d9b01
create fixture for creating rabbitmq rpc server
bisgaard-itis 0cd3857
Merge branch 'master' into extract-celery-code
bisgaard-itis 07ee77a
make sure celery tasks actually run
bisgaard-itis dcef2f1
minor changes
bisgaard-itis 593c353
Merge branch 'master' into extract-celery-code
bisgaard-itis fc98752
upgraded celery-library requirements
bisgaard-itis e212495
minor fix
bisgaard-itis e4e85dc
Merge branch 'master' into extract-celery-code
giancarloromeo 2c065f7
Merge branch 'master' into extract-celery-code
giancarloromeo f27e9ad
Revert "🐛 fix wrong project name in billing center usage view (#7798)"
bisgaard-itis 8b2e65c
Merge branch 'extract-celery-code' of github.com:giancarloromeo/ospar…
bisgaard-itis 384a2a1
Revert "create fixture for creating rabbitmq rpc server"
bisgaard-itis 6021ddb
Revert "Revert "🐛 fix wrong project name in billing center usage view…
bisgaard-itis 97a1e8b
Revert "upgraded celery-library requirements"
bisgaard-itis b71cbca
Revert "minor changes"
bisgaard-itis 1202074
Revert "make sure celery tasks actually run"
bisgaard-itis 738ad55
Revert "create fixture for creating rabbitmq rpc server"
bisgaard-itis 2e05671
Revert "start adding tests to celery module"
bisgaard-itis f85f878
fix after reverts
bisgaard-itis abc94de
Merge branch 'master' into extract-celery-code
bisgaard-itis a5ebd01
Merge remote-tracking branch 'upstream/master' into extract-celery-code
giancarloromeo e813cdb
Merge remote-tracking branch 'upstream/master' into extract-celery-code
giancarloromeo f7a6279
unify interfaces
giancarloromeo 64a0c4e
remove duplicate
giancarloromeo 5d3425e
rename
giancarloromeo c01d337
Merge remote-tracking branch 'upstream/master' into extract-celery-code
giancarloromeo 3d0bbb5
move method
giancarloromeo 7901486
Merge branch 'master' into extract-celery-code
giancarloromeo cb91384
fix: typo
giancarloromeo c08faf9
feat: wrap app server
giancarloromeo a5c933e
fix: tests
giancarloromeo 72a0ce9
fix: typecheck
giancarloromeo 1c4f7ec
fix: startup
giancarloromeo ddffcd6
Merge branch 'master' into extract-celery-code
giancarloromeo c8515a0
fix typecheck
giancarloromeo 9390e82
Merge branch 'extract-celery-code' of github.com:giancarloromeo/ospar…
giancarloromeo 88f9922
fix: rename
giancarloromeo d204914
fix: update reqs
giancarloromeo 4691989
fix: assert
giancarloromeo b1da2eb
fix: typecheck
giancarloromeo bf18f60
refactor
giancarloromeo f317b34
Merge branch 'master' into extract-celery-code
giancarloromeo 578b30d
remove unused fixture
giancarloromeo 22513d8
fix: mock
giancarloromeo 07e37d0
rename fixture
giancarloromeo 146b080
add deps
giancarloromeo 503b162
Merge remote-tracking branch 'upstream/master' into extract-celery-code
giancarloromeo e8a4510
upgrade req
giancarloromeo 687d848
tests: refactor
giancarloromeo d1bed3a
tests: fix
giancarloromeo 60de6c6
tests: fix
giancarloromeo 54ea767
tests: fix list
giancarloromeo 4d408c6
tests: fix typecheck
giancarloromeo 6e1fc9f
tests: fix import
giancarloromeo 614df7d
use hooks
giancarloromeo a53a97e
Merge branch 'master' into extract-celery-code
giancarloromeo 0ff0e3c
refactor models
giancarloromeo baff971
fix: typecheck
giancarloromeo 912d041
fix: typecheck
giancarloromeo 38c3fc4
Merge branch 'master' into extract-celery-code
giancarloromeo e74dfd6
Merge branch 'master' into extract-celery-code
giancarloromeo 4b403b0
fix findings
giancarloromeo 1c28009
fix: pydantic types
giancarloromeo 7de918a
fix abortable task test
giancarloromeo 9981610
add redis secure
giancarloromeo 5b0ddf3
Merge branch 'master' into extract-celery-code
giancarloromeo 04744fc
Merge branch 'master' into extract-celery-code
giancarloromeo fb07920
Merge branch 'master' into extract-celery-code
giancarloromeo 0ad9d0a
fix
giancarloromeo f859617
use generics
giancarloromeo 6ea49fe
fix: typecheck
giancarloromeo b791440
Merge branch 'master' into extract-celery-code
giancarloromeo d7d7a3e
tests: fix
giancarloromeo b02e11a
fix: pydantic types registration
giancarloromeo 73c03cc
fix: rename
giancarloromeo bc6abca
Merge branch 'master' into extract-celery-code
giancarloromeo 86ef5a9
Merge branch 'master' into extract-celery-code
giancarloromeo 57023a9
Merge branch 'master' into extract-celery-code
giancarloromeo eda052e
Merge branch 'master' into extract-celery-code
giancarloromeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/bin/bash | ||
| # http://redsymbol.net/articles/unofficial-bash-strict-mode/ | ||
| set -o errexit # abort on nonzero exitstatus | ||
| set -o nounset # abort on unbound variable | ||
| set -o pipefail # don't hide errors within pipes | ||
| IFS=$'\n\t' | ||
|
|
||
| install() { | ||
| make devenv | ||
| # shellcheck source=/dev/null | ||
| source .venv/bin/activate | ||
| pushd packages/celery-library | ||
| make install-ci | ||
| popd | ||
| uv pip list | ||
| } | ||
|
|
||
| test() { | ||
| # shellcheck source=/dev/null | ||
| source .venv/bin/activate | ||
| pushd packages/celery-library | ||
| make tests-ci | ||
| popd | ||
| } | ||
|
|
||
| typecheck() { | ||
| # shellcheck source=/dev/null | ||
| source .venv/bin/activate | ||
| uv pip install mypy | ||
| pushd packages/celery-library | ||
| make mypy | ||
| popd | ||
| } | ||
|
|
||
| # Check if the function exists (bash specific) | ||
| if declare -f "$1" >/dev/null; then | ||
| # call arguments verbatim | ||
| "$@" | ||
| else | ||
| # Show a helpful error | ||
| echo "'$1' is not a known function name" >&2 | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # | ||
| # Targets for DEVELOPMENT of Celery Library | ||
| # | ||
| include ../../scripts/common.Makefile | ||
| include ../../scripts/common-package.Makefile | ||
|
|
||
| .PHONY: requirements | ||
| requirements: ## compiles pip requirements (.in -> .txt) | ||
| @$(MAKE_C) requirements reqs | ||
|
|
||
|
|
||
| .PHONY: install-dev install-prod install-ci | ||
| install-dev install-prod install-ci: _check_venv_active ## install app in development/production or CI mode | ||
| # installing in $(subst install-,,$@) mode | ||
| @uv pip sync requirements/$(subst install-,,$@).txt | ||
|
|
||
|
|
||
| .PHONY: tests tests-ci | ||
| tests: ## runs unit tests | ||
| # running unit tests | ||
| @pytest \ | ||
| --asyncio-mode=auto \ | ||
| --color=yes \ | ||
| --cov-config=../../.coveragerc \ | ||
| --cov-report=term-missing \ | ||
| --cov=celery_library \ | ||
| --durations=10 \ | ||
| --exitfirst \ | ||
| --failed-first \ | ||
| --pdb \ | ||
| -vv \ | ||
| $(CURDIR)/tests | ||
|
|
||
| tests-ci: ## runs unit tests | ||
| # running unit tests | ||
| @pytest \ | ||
| --asyncio-mode=auto \ | ||
| --color=yes \ | ||
| --cov-append \ | ||
| --cov-config=../../.coveragerc \ | ||
| --cov-report=term-missing \ | ||
| --cov-report=xml \ | ||
| --junitxml=junit.xml -o junit_family=legacy \ | ||
| --cov=celery_library \ | ||
| --durations=10 \ | ||
| --log-date-format="%Y-%m-%d %H:%M:%S" \ | ||
| --log-format="%(asctime)s %(levelname)s %(message)s" \ | ||
| --verbose \ | ||
| -m "not heavy_load" \ | ||
| $(CURDIR)/tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # simcore Celery library | ||
|
|
||
| Provides a wrapper around Celery library [1]. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```console | ||
| make help | ||
| make install-dev | ||
| ``` | ||
|
|
||
| ## Test | ||
|
|
||
| ```console | ||
| make help | ||
| make test-dev | ||
| ``` | ||
|
|
||
|
|
||
| [1] https://github.com/celery/celery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 0.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # | ||
| # Targets to pip-compile requirements | ||
| # | ||
| include ../../../requirements/base.Makefile | ||
|
|
||
| # Add here any extra explicit dependency: e.g. _migration.txt: _base.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # | ||
| # Specifies third-party dependencies for 'celery-library' | ||
| # | ||
| --constraint ../../../requirements/constraints.txt | ||
| --requirement ../../../packages/common-library/requirements/_base.in | ||
| --requirement ../../../packages/models-library/requirements/_base.in | ||
| --requirement ../../../packages/service-library/requirements/_base.in | ||
giancarloromeo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --requirement ../../../packages/settings-library/requirements/_base.in | ||
giancarloromeo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| celery[redis] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.