-
Notifications
You must be signed in to change notification settings - Fork 30
♻️ Extract Celery code to a new simcore
package ⚠️
#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
Open
giancarloromeo
wants to merge
72
commits into
ITISFoundation:master
Choose a base branch
from
giancarloromeo:extract-celery-code
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,519
−267
Open
Changes from all commits
Commits
Show all changes
72 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 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,11 @@ | ||
# | ||
# 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 | ||
|
||
asgi_lifespan | ||
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.