-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* contrib refactoring * contrib refactoring --------- Co-authored-by: Pavlo Mokiichuk <[email protected]>
- Loading branch information
1 parent
048e48b
commit e9dc18d
Showing
53 changed files
with
336 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,4 +133,8 @@ cov.json | |
.vscode/ | ||
output_data/ | ||
.coverage | ||
|
||
archive/ | ||
output.json | ||
pytest_html_report.html | ||
compose.dist.yml |
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 |
---|---|---|
|
@@ -65,7 +65,7 @@ def handle(self, *args: Any, **options: Any) -> None: | |
call_command("loaddata", f"{settings.PROJECT_ROOT}/apps/household/fixtures/data.json") | ||
call_command("loaddata", f"{settings.PROJECT_ROOT}/apps/accountability/fixtures/data.json") | ||
call_command("loaddata", f"{settings.PROJECT_ROOT}/apps/steficon/fixtures/data.json") | ||
call_command("loaddata", f"{settings.PROJECT_ROOT}/aurora/fixtures/data.json") | ||
call_command("loaddata", f"{settings.PROJECT_ROOT}/contrib/aurora/fixtures/data.json") | ||
|
||
try: | ||
call_command("search_index", "--rebuild", "-f") | ||
|
@@ -86,14 +86,9 @@ def handle(self, *args: Any, **options: Any) -> None: | |
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
|
@@ -103,10 +98,8 @@ def handle(self, *args: Any, **options: Any) -> None: | |
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
] | ||
tester_list = [ | ||
"[email protected]", | ||
|
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
File renamed without changes.
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
src/hct_mis_api/aurora/api.py → src/hct_mis_api/contrib/aurora/api.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
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
Empty file.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/hct_mis_api/aurora/urls.py → src/hct_mis_api/contrib/aurora/urls.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
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
Empty file.
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,30 @@ | ||
from django.contrib import admin | ||
|
||
from adminfilters.filters import ValueFilter | ||
|
||
from hct_mis_api.apps.utils.admin import HOPEModelAdminBase | ||
from hct_mis_api.contrib.vision.models import DownPayment, FundsCommitment | ||
|
||
|
||
@admin.register(FundsCommitment) | ||
class FundsCommitmentAdmin(HOPEModelAdminBase): | ||
list_display = ( | ||
"rec_serial_number", | ||
"business_area", | ||
"funds_commitment_item", | ||
"funds_commitment_number", | ||
"posting_date", | ||
) | ||
list_filter = ( | ||
"business_area", | ||
"posting_date", | ||
("business_area", ValueFilter), | ||
) | ||
search_fields = ("rec_serial_number", "vendor_id", "wbs_element", "funds_commitment_number") | ||
|
||
|
||
@admin.register(DownPayment) | ||
class DownPaymentAdmin(HOPEModelAdminBase): | ||
list_display = ("rec_serial_number", "down_payment_reference", "business_area", "consumed_fc_number") | ||
|
||
list_filter = (("business_area", ValueFilter),) |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class Config(AppConfig): | ||
name = "hct_mis_api.contrib.vision" | ||
verbose_name = "Vision" |
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,25 @@ | ||
import factory.fuzzy | ||
from factory.django import DjangoModelFactory | ||
from pytz import utc | ||
|
||
from hct_mis_api.apps.core.models import BusinessArea | ||
from hct_mis_api.contrib.vision.models import FundsCommitment | ||
|
||
|
||
class FundsCommitmentFactory(DjangoModelFactory): | ||
class Meta: | ||
model = FundsCommitment | ||
|
||
rec_serial_number = factory.fuzzy.FuzzyInteger(1000, 99999999) | ||
business_area = factory.LazyAttribute(lambda o: BusinessArea.objects.first().cash_assist_code) | ||
document_type = "DO" | ||
currency_code = factory.Faker("currency_code") | ||
|
||
total_open_amount_local = factory.fuzzy.FuzzyDecimal(100.0, 10000.0) | ||
total_open_amount_usd = factory.fuzzy.FuzzyDecimal(100.0, 10000.0) | ||
update_date = factory.Faker( | ||
"date_time_this_decade", | ||
before_now=True, | ||
after_now=False, | ||
tzinfo=utc, | ||
) |
Oops, something went wrong.