diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e5fe9b6..14541476 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,7 @@ on: branches: [main] pull_request: branches: - - '**' - + - "**" jobs: run_tests: @@ -15,8 +14,8 @@ jobs: strategy: matrix: os: [ubuntu-24.04] - python-version: ['3.12'] - toxenv: [quality, docs, pii_check, django42, django52] + python-version: ["3.12"] + toxenv: [quality, docs, pii_check, django52] permissions: # Gives the action the necessary permissions for publishing new # comments in pull requests. @@ -27,38 +26,38 @@ jobs: contents: write steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: setup python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Install pip - run: pip install -r requirements/pip.txt - - - name: Install Dependencies - run: pip install -r requirements/ci.txt - - - name: Run Tests - env: - TOXENV: ${{ matrix.toxenv }} - run: tox - - - name: Run coverage - if: matrix.python-version == '3.12' && matrix.toxenv == 'django42' - uses: py-cov-action/python-coverage-comment-action@5d8df5979747514c914e1c5a12335a7cf9a2745f # v3 - with: - GITHUB_TOKEN: ${{ github.token }} - MINIMUM_GREEN: 90 - MINIMUM_ORANGE: 85 - ANNOTATE_MISSING_LINES: true - ANNOTATION_TYPE: error - - - name: Store Pull Request comment to be posted - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' - with: - # If you use a different name, update COMMENT_ARTIFACT_NAME accordingly - name: python-coverage-comment-action - # If you use a different name, update COMMENT_FILENAME accordingly - path: python-coverage-comment-action.txt + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - name: setup python + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Install Dependencies + run: pip install -r requirements/ci.txt + + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox + + - name: Run coverage + if: matrix.python-version == '3.12' && matrix.toxenv == 'django42' + uses: py-cov-action/python-coverage-comment-action@5d8df5979747514c914e1c5a12335a7cf9a2745f # v3 + with: + GITHUB_TOKEN: ${{ github.token }} + MINIMUM_GREEN: 90 + MINIMUM_ORANGE: 85 + ANNOTATE_MISSING_LINES: true + ANNOTATION_TYPE: error + + - name: Store Pull Request comment to be posted + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' + with: + # If you use a different name, update COMMENT_ARTIFACT_NAME accordingly + name: python-coverage-comment-action + # If you use a different name, update COMMENT_FILENAME accordingly + path: python-coverage-comment-action.txt diff --git a/README.rst b/README.rst index 26e8deb7..4b451966 100644 --- a/README.rst +++ b/README.rst @@ -213,10 +213,11 @@ Event Sink Configuration - ``module`` - The module path of the model. - ``model`` - The model class name. -Event Sinks are disabled by default. To enable them, you need to enable the following -waffle flag: ``event_sink_clickhouse.{{model_name}}.enabled``, where model_name is the name -of the model that you want to enable. Or, you can enable them via settings by setting -``EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED`` to ``True``. +Event Sinks are disabled by default from this repository, but enabled in the Aspects Tutor +plugin (tutor-contrib-aspects). If not using the Tutor plugin you will need to enable the +following waffle flags: ``event_sink_clickhouse.{{model_name}}.enabled``, where model_name +is the name of the model that you want to enable. Or, you can enable them via settings by +setting ``EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED`` to ``True``. Getting Help diff --git a/platform_plugin_aspects/__init__.py b/platform_plugin_aspects/__init__.py index 0e5c07f7..d0a7ec4e 100644 --- a/platform_plugin_aspects/__init__.py +++ b/platform_plugin_aspects/__init__.py @@ -5,6 +5,6 @@ import os from pathlib import Path -__version__ = "1.3.0" +__version__ = "2.0.0" ROOT_DIRECTORY = Path(os.path.dirname(os.path.abspath(__file__))) diff --git a/platform_plugin_aspects/settings/common.py b/platform_plugin_aspects/settings/common.py index 5d769a03..fbd991bd 100644 --- a/platform_plugin_aspects/settings/common.py +++ b/platform_plugin_aspects/settings/common.py @@ -94,13 +94,13 @@ def plugin_settings(settings): "module": "openedx.core.djangoapps.user_api.models", "model": "UserPreference", }, - "tag": {"module": "openedx_tagging.core.tagging.models", "model": "Tag"}, + "tag": {"module": "openedx_tagging.models.base", "model": "Tag"}, "taxonomy": { - "module": "openedx_tagging.core.tagging.models", + "module": "openedx_tagging.models.base", "model": "Taxonomy", }, "object_tag": { - "module": "openedx_tagging.core.tagging.models", + "module": "openedx_tagging.models.base", "model": "ObjectTag", }, } diff --git a/tox.ini b/tox.ini index 36e1d7c7..9cd8ac3a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py312-django{42,52} +envlist = py312-django{52} [doc8] ; D001 = Line too long @@ -38,7 +38,6 @@ norecursedirs = .* docs requirements site-packages setenv: DJANGO_SETTINGS_MODULE = test_settings deps = - django42: Django>=4.2,<4.3 django52: Django>=5.2,<5.3 -r{toxinidir}/requirements/test.txt commands =