diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ec2681..59f4d55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,9 +36,9 @@ jobs: sudo apt-get -y update sudo apt-get install libcups2-dev wamerican - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -48,7 +48,7 @@ jobs: echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.pip-cache.outputs.dir }} key: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f3af91..a32918b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,32 +3,32 @@ exclude: tests/etc/user-* repos: - repo: https://github.com/PyCQA/bandit - rev: 1.7.5 + rev: 1.7.7 hooks: - id: bandit args: - "-x *test*.py" - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.2.0 hooks: - id: black language_version: python3.11 - repo: https://github.com/pycqa/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 args: - "--config=setup.cfg" - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: requirements-txt-fixer files: requirements/.*\.txt$ @@ -42,7 +42,7 @@ repos: - id: detect-private-key - repo: https://github.com/adrienverge/yamllint - rev: v1.32.0 + rev: v1.34.0 hooks: - id: yamllint args: diff --git a/edc_pharmacy/model_mixins/study_medication_crf_model_mixin.py b/edc_pharmacy/model_mixins/study_medication_crf_model_mixin.py index 9590bbb..a65ee34 100644 --- a/edc_pharmacy/model_mixins/study_medication_crf_model_mixin.py +++ b/edc_pharmacy/model_mixins/study_medication_crf_model_mixin.py @@ -18,7 +18,6 @@ class StudyMedicationCrfModelMixin(PreviousNextModelMixin, StudyMedicationRefillModelMixin): - """Declare with field subject_visit using a CRF model mixin""" def save(self, *args, **kwargs): diff --git a/edc_pharmacy/models/dosage_guideline.py b/edc_pharmacy/models/dosage_guideline.py index 0f834c0..bcdda49 100644 --- a/edc_pharmacy/models/dosage_guideline.py +++ b/edc_pharmacy/models/dosage_guideline.py @@ -16,7 +16,6 @@ def get_by_natural_key(self, medication_name, dose, dose_units, dose_per_kg): class DosageGuideline(BaseUuidModel): - """Dosage guidelines.""" medication = models.ForeignKey(Medication, on_delete=PROTECT, null=True, blank=False) diff --git a/edc_pharmacy/models/rx.py b/edc_pharmacy/models/rx.py index 9f567de..b6cb5cc 100644 --- a/edc_pharmacy/models/rx.py +++ b/edc_pharmacy/models/rx.py @@ -35,7 +35,6 @@ class Rx( SearchSlugModelMixin, BaseUuidModel, ): - """A model for the prescription. In this context the `prescription` specifies only the medication. diff --git a/edc_pharmacy/tests/models.py b/edc_pharmacy/tests/models.py index a1ae39e..9963591 100644 --- a/edc_pharmacy/tests/models.py +++ b/edc_pharmacy/tests/models.py @@ -45,6 +45,9 @@ class SubjectVisit(SiteModelMixin, VisitModelMixin, BaseUuidModel): def run_metadata_rules(self, **kwargs): pass + def metadata_create(self): + pass + class Meta(VisitModelMixin.Meta, BaseUuidModel.Meta): app_label = "edc_pharmacy"