Skip to content

Commit 49551b0

Browse files
authored
Merge pull request #49 from unicef/feature/validate_programme
validate program checs for individuals too
2 parents cceaaf0 + 5a04fcf commit 49551b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+244
-138
lines changed

pyproject.toml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -97,32 +97,6 @@ dev-dependencies = [
9797
"ruff>=0.9.3",
9898
]
9999

100-
[tool.black]
101-
line-length = 120
102-
include = '\.pyi?$'
103-
exclude = '''
104-
/(
105-
\.git
106-
| \.pytest_cache
107-
| \.tox
108-
| \.venv
109-
| ~build
110-
| build
111-
| ops
112-
| migrations
113-
)/
114-
'''
115-
116-
#[tool.isort]
117-
#profile = "black"
118-
#line_length = 120
119-
#default_section = "THIRDPARTY"
120-
#known_first_party = []
121-
#known_django = "django"
122-
#sections = ["FUTURE","STDLIB","DJANGO","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"]
123-
#include_trailing_comma = true
124-
#skip = ["migrations", "snapshots", ".venv"]
125-
126100

127101
[tool.django-stubs]
128102
django_settings_module = "country_workspace.config.settings"

ruff.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ force-wrap-aliases = true
8080
combine-as-imports = true
8181
extra-standard-library = ["path"]
8282
known-third-party = ['django']
83-
known-first-party = ['hope_*']
84-
known-local-folder = ["country_workspace"]
83+
known-first-party = ['country_workspace']
8584
no-sections = false
8685
lines-after-imports = 1
8786
relative-imports-order = "furthest-to-closest"

src/country_workspace/apps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def ready(self) -> None:
1515
import django_celery_boost.admin
1616

1717
import country_workspace.compat.admin_extra_buttons as c
18+
1819
from .utils import flags # noqa
1920

2021
admin_extra_buttons.api.confirm_action = c.confirm_action

src/country_workspace/cache/manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
from redis_lock.django_cache import RedisCache
1111
from sentry_sdk import capture_exception
1212

13-
from .signals import cache_get, cache_invalidate, cache_set
1413
from country_workspace import VERSION
1514
from country_workspace.state import state
1615

16+
from .signals import cache_get, cache_invalidate, cache_set
17+
1718
if TYPE_CHECKING:
1819
from ..models import Office, Program
1920
logger = logging.getLogger(__name__)

src/country_workspace/contrib/hope/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
from constance import config
99
from requests.exceptions import RequestException
1010

11-
from .signals import hope_request_end, hope_request_start
1211
from country_workspace.exceptions import RemoteError
1312

13+
from .signals import hope_request_end, hope_request_start
14+
1415
if TYPE_CHECKING:
1516
JsonType = None | int | str | bool | list["JsonType"] | dict[str, "JsonType"]
1617
FlatJsonType = dict[str, str | int | bool]

src/country_workspace/contrib/hope/geo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
from django import forms
55
from django.core.exceptions import ValidationError
66
from django.utils.text import slugify
7-
87
from hope_flex_fields.mixin import ChildFieldMixin
98

9+
from country_workspace.cache.manager import cache_manager
10+
1011
from ...exceptions import RemoteError
1112
from .client import HopeClient
12-
from country_workspace.cache.manager import cache_manager
1313

1414
logger = logging.getLogger(__name__)
1515

src/country_workspace/contrib/hope/remotes/country.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from typing import TYPE_CHECKING
22

33
from django import forms
4-
54
from hope_flex_fields.attributes.abstract import AbstractAttributeHandler, AttributeHandlerConfig
65

76
if TYPE_CHECKING:

src/country_workspace/contrib/hope/sync/office.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from io import TextIOBase
22

33
from django.core.cache import cache
4-
54
from hope_flex_fields.models import DataChecker
65

6+
from country_workspace.models import Office, Program, SyncLog
7+
78
from .. import constants
89
from ..client import HopeClient
9-
from country_workspace.models import Office, Program, SyncLog
1010

1111

1212
def sync_offices(stdout: TextIOBase | None = None) -> dict[str, int]:

src/country_workspace/datasources/rdi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import io
22

33
from django.db.transaction import atomic
4-
54
from hope_smart_import.readers import open_xls_multi
65

76
from country_workspace.models import AsyncJob, Batch, Household

src/country_workspace/models/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
if TYPE_CHECKING:
1616
from django.db.models import QuerySet
17-
1817
from hope_flex_fields.models import DataChecker
1918

2019
from country_workspace.models import Office, Program

0 commit comments

Comments
 (0)