Skip to content

Commit

Permalink
Merge branch 'release/0.1.38' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed May 24, 2023
2 parents 7c8104c + 5a4893e commit ea37a99
Show file tree
Hide file tree
Showing 66 changed files with 19 additions and 92 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10']
django-version: ['3.2', '4.0', '4.1', 'dev']

python-version: ['3.10', '3.11']
django-version: ['4.1', '4.2', 'dev']
exclude:
- python-version: '3.10'
django-version: 'dev'
services:
mysql:
image: mysql:latest
Expand All @@ -31,20 +33,19 @@ jobs:
sudo apt-get -y update
sudo apt-get install libcups2-dev wamerican
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
Expand All @@ -64,7 +65,7 @@ jobs:
env:
DJANGO: ${{ matrix.django-version }}

- name: Upload coverage
uses: codecov/codecov-action@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ repos:
- "-x *test*.py"

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
language_version: python3.9
language_version: python3.10

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
Expand Down Expand Up @@ -42,7 +42,7 @@ repos:
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint
rev: v1.30.0
rev: v1.31.0
hooks:
- id: yamllint
args:
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

1 change: 0 additions & 1 deletion edc_pharmacy/admin/dispensing_history_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@admin.register(DispensingHistory, site=edc_pharmacy_admin)
class DispensingHistoryAdmin(ModelAdminMixin, admin.ModelAdmin):

form = DispensingHistoryForm

fieldsets = (
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/dosage_guideline_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@admin.register(DosageGuideline, site=edc_pharmacy_admin)
class DosageGuidelineAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

autocomplete_fields = ["medication"]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/formulation_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@admin.register(Formulation, site=edc_pharmacy_admin)
class FormulationAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

autocomplete_fields = ["medication"]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/labels_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

@admin.register(Labels, site=edc_pharmacy_admin)
class LabelsAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

form = LabelsForm
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/list_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class MedicationsListFilter(SimpleListFilter):

title = "Medication"
parameter_name = "medication_name"

Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/medication_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@admin.register(Medication, site=edc_pharmacy_admin)
class MedicationAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

form = MedicationForm
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/medication_lot_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@admin.register(MedicationLot, site=edc_pharmacy_admin)
class MedicationLotAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

form = MedicationLotForm
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/order_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

@admin.register(Order, site=edc_pharmacy_admin)
class OrderAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

# autocomplete_fields = (
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/product_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

@admin.register(Product, site=edc_pharmacy_admin)
class ProductAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

form = ProductForm
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/return_history_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@admin.register(ReturnHistory, site=edc_pharmacy_admin)
class ReturnHistoryAdmin(ModelAdminMixin, admin.ModelAdmin):

form = ReturnHistoryForm

fieldsets = (
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/rx_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

@admin.register(Rx, site=edc_pharmacy_admin)
class RxAdmin(ModelAdminSubjectDashboardMixin, admin.ModelAdmin):

show_object_tools = True

form = RxForm
Expand Down
2 changes: 0 additions & 2 deletions edc_pharmacy/admin/rx_refill_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

@admin.register(RxRefill, site=edc_pharmacy_admin)
class RxRefillAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

ordering: Tuple[str, ...] = ("refill_start_datetime",)
Expand Down Expand Up @@ -210,7 +209,6 @@ def get_subject_dashboard_url_kwargs(self, obj):


class RxRefillInlineAdmin(admin.StackedInline):

form = RxRefillForm

model = RxRefill
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/stock_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

@admin.register(Stock, site=edc_pharmacy_admin)
class StockAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

form = StockForm
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/stock_create_labels_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

@admin.register(StockCreateLabels, site=edc_pharmacy_admin)
class StockCreateLabelsAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

form = StockCreateLabelsForm
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/admin/stock_receiving_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

@admin.register(StockReceiving, site=edc_pharmacy_admin)
class StockReceivingAdmin(ModelAdminMixin, admin.ModelAdmin):

show_object_tools = True

form = StockReceivingForm
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/approve_prescription.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ class PrescriptionApprovalValidatorError(Exception):


class ApprovePrescription:

prescription_model = "edc_pharmacy.rx"

def __init__(self, rx_model_obj=None):
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/dosage_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def __init__(
formulation: Optional[Any] = None,
weight_in_kgs: Optional[Union[float, Decimal]] = None,
) -> None:

self.dosage_guideline = dosage_guideline
self.formulation = formulation
if formulation.medication != dosage_guideline.medication:
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/forms/crf/study_medication_modelform_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class StudyMedicationModelFormMixin:

form_validator_cls = StudyMedicationFormValidator

def clean(self):
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/forms/dispensing_history_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class Meta:


class DispensingHistoryReadonlyForm(forms.ModelForm):

count = forms.DecimalField(
label="Count", widget=forms.TextInput(attrs={"readonly": "readonly"})
)
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0001_initial"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0002_alter_medication_unique_together"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0004_auto_20220414_1741.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0003_alter_rxrefill_unique_together"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0005_alter_rx_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0004_auto_20220414_1741"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0005_alter_rx_managers"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0007_auto_20220704_1841.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0006_historicalrxrefill_roundup_divisible_by_and_more"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0008_auto_20220706_2324.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0007_auto_20220704_1841"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0009_auto_20220708_0805.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("sites", "0002_alter_domain_unique"),
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0010_auto_20220708_0813.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0009_auto_20220708_0805"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0011_auto_20220826_0406.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0010_auto_20220708_0813"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0012_auto_20220907_0157.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0011_auto_20220826_0406"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0013_auto_20220907_0202.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0012_auto_20220907_0157"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0014_auto_20220907_0207.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0013_auto_20220907_0202"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0015_auto_20220913_2139.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("edc_pharmacy", "0014_auto_20220907_0207"),
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/migrations/0016_auto_20220929_1742.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
("edc_pharmacy", "0015_auto_20220913_2139"),
]
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/model_mixins/medication_order_model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class MedicationOrderModelMixin(models.Model):

stock = models.ForeignKey(
"edc_pharmacy.stock",
null=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class StudyMedicationCrfModelMixin(PreviousNextModelMixin, StudyMedicationRefill
"""Declare with field subject_visit using a CRF model mixin"""

def save(self, *args, **kwargs):

if not self.formulation:
raise StudyMedicationError(
f"Formulation cannot be None. Perhaps catch this in the form. See {self}."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class StudyMedicationRefillModelMixin(models.Model):

refill = models.CharField(
verbose_name="Will the subject receive study medication for this visit",
max_length=15,
Expand Down
1 change: 0 additions & 1 deletion edc_pharmacy/models/dispensing_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class Manager(models.Manager):

use_in_migrations = True

def get_by_natural_key(self, rx_refill, dispensed_datetime):
Expand Down
Loading

0 comments on commit ea37a99

Please sign in to comment.