Skip to content

Commit

Permalink
Merge pull request #53 from unicef/staging
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
domdinicola authored Jul 16, 2024
2 parents 9c1dee0 + 1a06a70 commit 0c1aa04
Show file tree
Hide file tree
Showing 21 changed files with 601 additions and 164 deletions.
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ignore =
# too complex # TODO: fix this
C901,
# TODO
F401,
# F401,
F403,

per-file-ignores =
tests/extras/testutils/factories/__init__.py: F401
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches:
- develop
- staging
- master
pull_request:
branches:
- develop
- staging
- master

jobs:
Expand Down Expand Up @@ -162,6 +164,7 @@ jobs:
github.event_name == 'push' &&
(
github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/staging' ||
github.ref == 'refs/heads/master'
)
steps:
Expand Down Expand Up @@ -198,4 +201,4 @@ jobs:
echo "Failed to trigger deploy for pipeline $pipeline"
exit 1
fi
done
done
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ coverage.xml
!.mypy.ini
!.pre-commit-config.yaml

pdm.toml
pdm.toml
.coverage
.env
.envrc
.pdm-python
.tox/
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ files = src/hope_country_report
; ~billing
;exclude = (?x)(^\~management$)
;exclude = (?x)(.*/power_query/.*)
exclude = (?x)(.*/management/.*)
exclude = (?x)(.*/management|factories/.*)

install_types = true
show_error_codes = true
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.
2 changes: 1 addition & 1 deletion compose.prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ services:
db:
condition: service_healthy
redis:
condition: service_healthy
condition: service_healthy
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ services:
db:
condition: service_healthy
redis:
condition: service_healthy
condition: service_healthy
2 changes: 1 addition & 1 deletion docker/wait-for-it.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ if [[ $WAITFORIT_CLI != "" ]]; then
exec "${WAITFORIT_CLI[@]}"
else
exit $WAITFORIT_RESULT
fi
fi
4 changes: 3 additions & 1 deletion src/hope_country_report/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class Meta:

@cached_property
def selected_office(self) -> CountryOffice:
co_slug: str = self.context["view"].kwargs[self.co_key]
co_slug: str = self.context["view"].kwargs.get(self.co_key)
if not co_slug:
raise serializers.ValidationError("Country office slug is required.")
return CountryOffice.objects.get(slug=co_slug)

def get_office(self, obj: "Model"):
Expand Down
Loading

0 comments on commit 0c1aa04

Please sign in to comment.