-
Notifications
You must be signed in to change notification settings - Fork 23
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
Refactor rest - part 2 #322
Merged
Merged
Conversation
This file contains 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
…ch 'main' of github.com:mundialis/actinia_core into refactor-rest
This was referenced Mar 23, 2022
Merged
mmacata
requested review from
anikaweinmann,
marcjansen,
metzm and
neteler
and removed request for
anikaweinmann
March 25, 2022 14:08
anikaweinmann
approved these changes
Mar 28, 2022
metzm
approved these changes
Mar 30, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many substantial changes, therefore I suggest to merge rather soon and fix any issues in separate PRs.
I agree. I kind of wait for a fix of #332 to have a running actinia when all of these MRs are merged to be able to see directly if anything is not running smoothely. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See also MR #320 and issues #190, #189 and #191
General refactoring thoughts:
This PR splits up the
rest
modules into:rest
moduleFor
raster_colors
e.g.class SyncPersistentRasterColorsResource(ResourceBase)
persistent
andephemeral
processing as well asephemeral_with_export
andephemeral_renderer_base
. They are moved toprocessing.actinia_processing
. Perspectively this will become a separate repository.For
raster_colors
e.g.class EphemeralRasterColorsOutput(EphemeralProcessing)
andclass PersistentRasterColorsRules(PersistentProcessing)
processing.common
For
raster_colors
e.g.def start_job_colors_out(*args)
anddef start_job_from_rules(*args)
Effects on the queue (local / redis)
Regarding the queue - the methods in between mentioned above can be used in 3 different ways:
QUEUE_TYPE = local
. Here, actinia_processing is needed. If the import fails, actinia won't start up withModuleNotFoundError: No module named 'actinia_core.processing' - No actinia_processing found but required for local queue! [in /usr/lib/python3.8/site-packages/werkzeug/_internal.py:113]
QUEUE_TYPE = redis
- import doesn't matter as no processing done hereOne note about sorting inside
actinia_processing
The modules are sorted by inheritance into the subfolders
ephemeral
,ephemeral_with_export
,persistent
andephemeral_renderer_base
.This means eg. that the module
persistent_processing.py
is inside the folderephemeral
because it inherits fromEphemeralProcessing
directly:class PersistentProcessing(EphemeralProcessing)
. The moduleephemeral_processing
, from which all other classes inherit directly or indirectly, is on top level next to the folders.WARNING
Last thing: again a WARNING that some actinia plugins are affected by move of
Alle of them are adjusted with these PRs: