Skip to content
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

Add bulk version of fast-api airflow example #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mertse7en
Copy link

No description provided.

"common_5_key": self.onboard_item.common5,

# AWS related configs
"aws_common_value_example_1": os.environ["example1"],
Copy link
Owner

Choose a reason for hiding this comment

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

I think it is sufficient to define 2-3 example here.

tpa_payload = {
"specific_key_1": "specific_value_1",
"specific_key_2": "specific_value_2",
"specific_key_3": "specific_value_3",
Copy link
Owner

Choose a reason for hiding this comment

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

Same applies here

"specific_key_1": "specific_value_1",
"specific_key_2": "specific_value_2",
"specific_key_3": "specific_value_3",
"specific_key_4": "specific_value_4",
Copy link
Owner

Choose a reason for hiding this comment

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

Same applies here, we can keep the number of parameters consistent

EXAMPLE_2 = ("Example2", Example_2_OnboardItem)
EXAMPLE_3 = ("Example3", Example_3_OnboardItem)
# EXAMPLE_4 = ("Example4", Example_4_OnboardItem)
# EXAMPLE_5 = ("Example5", Example_5_OnboardItem)
Copy link
Owner

Choose a reason for hiding this comment

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

We can remove extra examples here, and keep it consistent with other files


### Insight

Using the factory pattern enhances the readability and maintainability of the code. Additionally, there is neat code present before anything else. CAUTION: While it could be implemented more effectively using a different pattern, it is being used for educational purposes. Also code will not work if you try to run it.
Copy link
Owner

Choose a reason for hiding this comment

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

do we have any reference to any other source? if we have, we should also mention them in a credits topic. You can refer to other README.md files

@@ -0,0 +1,30 @@
# Real world example:

Here is the realworld example that I have used for one of my project with factory_pattern.
Copy link
Owner

Choose a reason for hiding this comment

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

nit: we can remove this


from data_models import ExampleTPA

class OnboardItemValidator:
Copy link
Owner

Choose a reason for hiding this comment

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

We should add docstring

Files
```
...
- main.py --> Fast-API app
Copy link
Owner

@egehanyorulmaz egehanyorulmaz Sep 1, 2023

Choose a reason for hiding this comment

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

Copy link
Owner

@egehanyorulmaz egehanyorulmaz left a comment

Choose a reason for hiding this comment

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

We just need to make some cosmetic changes. Also, we should rename the folder to a project name like 'fast-api-onboard'

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