Skip to content

Commit

Permalink
fix import, setup
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Oct 10, 2023
1 parent 54688c1 commit aa9afe1
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ repos:
rev: 23.9.1
hooks:
- id: black
language_version: python3.10
language_version: python3.11

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
args:
Expand All @@ -42,7 +42,7 @@ repos:
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint
rev: v1.31.0
rev: v1.32.0
hooks:
- id: yamllint
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
from typing import TYPE_CHECKING

from django.utils.translation import gettext_lazy as _
from edc_appointment.utils import get_allow_skipped_appt_using
from edc_appointment.utils import allow_clinic_on_weekend, get_allow_skipped_appt_using
from edc_form_validators import INVALID_ERROR
from edc_utils.date import to_local

from ..utils import allow_clinic_on_weekend

if TYPE_CHECKING:
from edc_facility.models import HealthFacility

Expand Down
2 changes: 1 addition & 1 deletion edc_next_appointment/modelform_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from edc_metadata.utils import has_keyed_metadata
from edc_utils import convert_php_dateformat
from edc_utils.date import to_local
from edc_visit_schedule.schedule.window import ScheduledVisitWindowError
from edc_visit_schedule.exceptions import ScheduledVisitWindowError


class NextAppointmentModelFormMixin:
Expand Down
6 changes: 3 additions & 3 deletions edc_next_appointment/tests/tests/test_next_appointment.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
from edc_facility.models import HealthFacility, HealthFacilityTypes
from edc_reference import site_reference_configs
from edc_utils import get_utcnow
from edc_visit_schedule import site_visit_schedules
from edc_visit_schedule.apps import populate_visit_schedule
from edc_visit_schedule.models import VisitSchedule
from edc_visit_schedule.site_visit_schedules import site_visit_schedules
from edc_visit_tracking.constants import SCHEDULED
from edc_visit_tracking.utils import get_related_visit_model_cls

Expand All @@ -25,7 +25,7 @@
from next_appointment_app.visit_schedules import visit_schedule

utc = ZoneInfo("UTC")
utc_tz = ZoneInfo("Africa/Dar_es_salaam")
tz = ZoneInfo("Africa/Dar_es_Salaam")


class TestNextAppointment(TestCase):
Expand Down Expand Up @@ -199,7 +199,7 @@ def test_next_appt_with_health_facility(self):
},
LANGUAGE_CODE="sw",
)
@time_machine.travel(dt.datetime(2019, 6, 11, 8, 00, tzinfo=utc_tz))
@time_machine.travel(dt.datetime(2019, 6, 11, 8, 00, tzinfo=tz))
def test_next_appt_with_health_facility_tz(self):
self.assertEqual(get_utcnow().weekday(), 1) # tues
health_facility_type = HealthFacilityTypes.objects.create(
Expand Down
17 changes: 0 additions & 17 deletions edc_next_appointment/utils.py

This file was deleted.

4 changes: 3 additions & 1 deletion next_appointment_app/visit_schedules.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from dateutil.relativedelta import relativedelta
from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule
from edc_visit_schedule.constants import MONTH0, MONTH1, MONTH2, MONTH3, MONTH4
from edc_visit_schedule.schedule import Schedule
from edc_visit_schedule.visit import Crf, FormsCollection, Visit
from edc_visit_schedule.visit_schedule import VisitSchedule

app_label = "next_appointment_app"

Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=60", "setuptools-scm>=8.0"]

[tool.setuptools_scm]
write_to = "_version.py"
version_file="_version.py"

[tool.black]
line-length = 95
target-version = ["py310"]
target-version = ["py311"]
extend-exclude = '''^(.*\/)*\b(migrations)\b($|\/.*$)'''

[tool.isort]
profile = "black"
py_version = "310"
py_version = "311"
skip = [".tox", ".eggs", "migrations"]

[tool.coverage.run]
Expand Down

0 comments on commit aa9afe1

Please sign in to comment.