Skip to content

Commit

Permalink
Merge pull request dbca-wa#102 from ropable/master
Browse files Browse the repository at this point in the history
Application version update
  • Loading branch information
ropable authored Aug 11, 2023
2 parents b8b20ac + 2541bdf commit f9efed7
Show file tree
Hide file tree
Showing 23 changed files with 2,207 additions and 1,215 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[flake8]
ignore = E501,E722
ignore = E265,E501,E722
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Prepare the base environment.
FROM python:3.9.15-slim-buster as builder_base
FROM python:3.10.12-slim-bookworm as builder_base_ibms
MAINTAINER [email protected]
LABEL org.opencontainers.image.source https://github.com/dbca-wa/ibms

Expand All @@ -10,16 +10,16 @@ RUN apt-get update -y \
&& pip install --upgrade pip

# Install Python libs using Poetry.
FROM builder_base as python_libs
FROM builder_base_ibms as python_libs_ibms
WORKDIR /app
ENV POETRY_VERSION=1.2.2
ENV POETRY_VERSION=1.5.1
RUN pip install "poetry==$POETRY_VERSION"
COPY poetry.lock pyproject.toml /app/
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi --only main

# Install the project.
FROM python_libs
FROM python_libs_ibms
COPY manage.py gunicorn.py ./
COPY ibms_project ./ibms_project
RUN python manage.py collectstatic --noinput
Expand Down
12 changes: 9 additions & 3 deletions ibms_project/ibms/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,23 @@ class IBMDataAdmin(ModelAdmin):
readonly_fields = (
'fy', 'ibmIdentifier', 'budgetArea', 'projectSponsor', 'corporatePlanNo', 'strategicPlanNo',
'regionalSpecificInfo', 'servicePriorityID', 'annualWPInfo', 'costCentre', 'account', 'service',
'activity', 'project', 'job')
'activity', 'project', 'job',
'priorityActionNo', 'priorityLevel', 'marineKPI', 'regionProject', 'regionDescription',
)
actions = [
export_as_csv_action(
translations=[
'financialYear', 'ibmIdentifier', 'costCentre', 'account', 'service', 'activity', 'project', 'job',
'budgetArea', 'projectSponsor', 'corporatePlanNo', 'strategicPlanNo',
'regionalSpecificInfo', 'servicePriorityID', 'annualWPInfo'],
'regionalSpecificInfo', 'servicePriorityID', 'annualWPInfo',
'priorityActionNo', 'priorityLevel', 'marineKPI', 'regionProject', 'regionDescription',
],
fields=[
'fy', 'ibmIdentifier', 'costCentre', 'account', 'service', 'activity', 'project', 'job',
'budgetArea', 'projectSponsor', 'corporatePlanNo', 'strategicPlanNo',
'regionalSpecificInfo', 'servicePriorityID', 'annualWPInfo'])]
'regionalSpecificInfo', 'servicePriorityID', 'annualWPInfo',
'priorityActionNo', 'priorityLevel', 'marineKPI', 'regionProject', 'regionDescription',
])]


@register(GLPivDownload)
Expand Down
7 changes: 6 additions & 1 deletion ibms_project/ibms/db_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ def import_to_ibmdata(fileName, fy):
"strategicPlanNo": validateCharField('strategicPlanNo', 20, row[10]),
"regionalSpecificInfo": row[11],
"servicePriorityID": validateCharField('servicePriorityID', 100, row[12]),
"annualWPInfo": str(row[13])
"annualWPInfo": str(row[13]),
"priorityActionNo": str(row[14]),
"priorityLevel": str(row[15]),
"marineKPI": str(row[16]),
"regionProject": str(row[17]),
"regionDescription": str(row[18]),
}
query = {
"fy": fy,
Expand Down
Loading

0 comments on commit f9efed7

Please sign in to comment.