Skip to content

Commit

Permalink
v9.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Mar 28, 2024
1 parent cf7a48a commit aad4b7f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .ambient-package-update/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
email="[email protected]",
),
],
min_coverage=94.23,
min_coverage=86.51,
development_status="5 - Production/Stable",
license=LICENSE_MIT,
license_year=2012,
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"

Expand All @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
Expand All @@ -70,7 +70,7 @@ jobs:
TOXENV: django${{ matrix.django-version }}
run: tox
- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: '.coverage*'
Expand All @@ -82,19 +82,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: python -m pip install --upgrade coverage[toml]

- name: Download data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data

- name: Combine coverage and fail if it's <100%
run: |
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=94.23
python -m coverage report --fail-under=86.51
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![PyPI release](https://img.shields.io/pypi/v/ambient-toolbox.svg)](https://pypi.org/project/ambient-toolbox/)
[![Downloads](https://static.pepy.tech/badge/ambient-toolbox)](https://pepy.tech/project/ambient-toolbox)
[![Coverage](https://img.shields.io/badge/Coverage-94.23%25-success)](https://github.com/ambient-innovation/ambient-toolbox/actions?workflow=CI)
[![Coverage](https://img.shields.io/badge/Coverage-86.51%25-success)](https://github.com/ambient-innovation/ambient-toolbox/actions?workflow=CI)
[![Linting](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Coding Style](https://img.shields.io/badge/code%20style-Ruff-000000.svg)](https://github.com/astral-sh/ruff)
[![Documentation Status](https://readthedocs.org/projects/ambient-toolbox/badge/?version=latest)](https://ambient-toolbox.readthedocs.io/en/latest/?badge=latest)
Expand Down
Empty file.
21 changes: 21 additions & 0 deletions tests/management_commands/test_create_translation_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os

from django.core.management import call_command
from django.test import SimpleTestCase

import settings


class CreateTranslationFileTest(SimpleTestCase):
TEST_LANG = "xx"

@classmethod
def tearDownClass(cls):
os.remove(settings.LOCALE_PATHS[0] / f"{cls.TEST_LANG}/LC_MESSAGES/django.po")

def test_command_regular(self):
call_command("create_translation_file", lang=self.TEST_LANG)

def test_command_no_lang_param(self):
with self.assertRaisesMessage(RuntimeError, 'Please provide a language with the "--lang" parameter.'):
call_command("create_translation_file")

0 comments on commit aad4b7f

Please sign in to comment.