-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ refactor: sensors records and checklist records views making them …
…to use use cases from factories
- Loading branch information
1 parent
f122331
commit 436b412
Showing
42 changed files
with
270 additions
and
227 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
26 changes: 26 additions & 0 deletions
26
src/app/infra/factories/use_cases/checklist_records/__init__.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from .create_checklist_records_by_csv_file_factory import ( | ||
CreateChecklistRecordsByCsvFileFactory, | ||
) | ||
from .create_checklist_record_by_form_factory import CreateChecklistRecordByFormFactory | ||
from .delete_checklist_records_factory import DeleteChecklistRecordsFactory | ||
from .get_checklist_records_csv_file_factory import GetChecklistRecordsCsvFileFactory | ||
from .get_checklist_records_dashboard_page_data_factory import ( | ||
GetChecklistRecordsDashboardPageDataFactory, | ||
) | ||
from .get_checklist_records_table_page_data_factory import ( | ||
GetChecklistRecordsTablePageDataFactory, | ||
) | ||
from .update_checklist_records_factory import UpdateChecklistRecordFactory | ||
|
||
|
||
create_checklist_records_by_csv_file = CreateChecklistRecordsByCsvFileFactory.produce() | ||
create_checklist_record_by_form = CreateChecklistRecordByFormFactory.produce() | ||
delete_checklist_records = DeleteChecklistRecordsFactory.produce() | ||
get_checklist_records_csv_file = GetChecklistRecordsCsvFileFactory.produce() | ||
get_checklist_records_dashboard_page_data = ( | ||
GetChecklistRecordsDashboardPageDataFactory.produce() | ||
) | ||
get_checklist_records_table_page_data = ( | ||
GetChecklistRecordsTablePageDataFactory.produce() | ||
) | ||
update_checklist_record = UpdateChecklistRecordFactory.produce() |
15 changes: 0 additions & 15 deletions
15
...nfra/factories/use_cases/checklist_records/create_checklist_record_by_csv_file_factory.py
This file was deleted.
Oops, something went wrong.
7 changes: 5 additions & 2 deletions
7
...pp/infra/factories/use_cases/checklist_records/create_checklist_record_by_form_factory.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
from core.use_cases.checklist_records import CreateChecklistRecordByForm | ||
|
||
from infra.repositories import checklist_records_repository | ||
from infra.repositories import checklist_records_repository, plants_repository | ||
|
||
|
||
class CreateChecklistRecordByFormFactory: | ||
@staticmethod | ||
def produce(): | ||
return CreateChecklistRecordByForm(checklist_records_repository) | ||
return CreateChecklistRecordByForm( | ||
checklist_records_repository=checklist_records_repository, | ||
plants_repository=plants_repository, | ||
) |
16 changes: 16 additions & 0 deletions
16
...fra/factories/use_cases/checklist_records/create_checklist_records_by_csv_file_factory.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from core.use_cases.checklist_records import CreateChecklistRecordsByCsvFile | ||
|
||
from infra.repositories import plants_repository, checklist_records_repository | ||
from infra.providers import DataAnalyserProvider | ||
|
||
|
||
class CreateChecklistRecordsByCsvFileFactory: | ||
@staticmethod | ||
def produce(): | ||
data_analyser_provider = DataAnalyserProvider() | ||
|
||
return CreateChecklistRecordsByCsvFile( | ||
plants_repository=plants_repository, | ||
checklist_records_repository=checklist_records_repository, | ||
data_analyser_provider=data_analyser_provider, | ||
) |
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
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
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
Oops, something went wrong.