Skip to content

Generics AppType refactoring #299

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
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

elitonzky
Copy link
Contributor

No description provided.

@elitonzky elitonzky changed the title Generics refactoring Generics AppType refactoring May 31, 2023
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #299 (2f1fad9) into main (98a156d) will increase coverage by 0.61%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
+ Coverage   86.41%   87.03%   +0.61%     
==========================================
  Files          76       79       +3     
  Lines        2952     3092     +140     
==========================================
+ Hits         2551     2691     +140     
  Misses        401      401              
Flag Coverage Δ
annotations 87.03% <100.00%> (+0.61%) ⬆️
path 87.03% <100.00%> (+0.61%) ⬆️
test_changes 87.03% <100.00%> (+0.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
marketplace/core/serializers.py 100.00% <ø> (ø)
...tplace/core/types/channels/telegram/serializers.py 100.00% <ø> (ø)
marketplace/core/types/externals/base.py 100.00% <ø> (ø)
...tplace/core/types/externals/generic/serializers.py 100.00% <100.00%> (ø)
marketplace/core/types/externals/generic/type.py 100.00% <100.00%> (ø)
marketplace/core/types/externals/generic/views.py 100.00% <100.00%> (ø)

@elitonzky elitonzky force-pushed the feature/generics-refactoring branch 2 times, most recently from a043c44 to 1b7a78e Compare June 7, 2023 15:40
@@ -6,19 +6,32 @@
from marketplace.core.types.channels.generic.views import GetIcons
from marketplace.core.types.channels.generic.views import GenericAppTypes

from marketplace.core.types.externals.generic.views import (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main idea of this listing of urls is that it was generic, that way you are creating a dependency with a specific apptype, the generic-external.

The question is: if a new generic apptype comes up, will you need to implement new urls for it in this file? this deviates a little from the principles of Integrations!

I suggest that you create a way to create urls within the type itself, so that the types would be in fact generic.

else:
raise serializers.ValidationError("external_code not be empty.")

response = self.type_class.list(FlowsClient(), flows_type_code=external_code)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice implementation of dependency inversion! 👏

@elitonzky elitonzky force-pushed the feature/generics-refactoring branch 2 times, most recently from b0985f1 to b9e2776 Compare June 30, 2023 14:29
@elitonzky elitonzky force-pushed the feature/generics-refactoring branch from b9e2776 to 2f1fad9 Compare July 20, 2023 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants