Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
db37b47
feat: consolidate package metadata into pyproject.toml
Jul 9, 2026
73ac819
feat: switch dependency management from pip-compile to uv
Jul 9, 2026
31b597e
feat: add semantic-release for automated PyPI publishing
Jul 9, 2026
e167513
fix: correct release tag format and drop stale MANIFEST.in entries
Jul 10, 2026
5f703cc
fix: prevent uv sync from implicitly pulling in the dev group
Jul 10, 2026
ac3a32e
fix: publish to PyPI via OIDC instead of token
Jul 15, 2026
ed2b1fb
fix: pin pypa/gh-action-pypi-publish to a commit SHA
Jul 15, 2026
173d45c
fix: set major_on_zero=false and allow_zero_version=true for consistency
Jul 16, 2026
f1e097f
refactor: adopt src-layout, matching openedx/sample-plugin
Jul 17, 2026
a6cfe64
fix: update hardcoded fixture path in test_enterprise_client.py for s…
Jul 17, 2026
e433dd6
fix: pattern-gap audit (uv setup, package=true, changelog, MANIFEST.in)
Jul 21, 2026
f80b057
docs: drop stale Version/Changelog checklist items from PR template
Jul 21, 2026
ade014a
fix: pattern-gap audit round 2 (coverage config, twine removal, codec…
Jul 28, 2026
a1e15bc
Merge branch 'master' into irfanuddinahmad/uv-migration
Jul 28, 2026
1910560
fix: add codecov.yml to absorb one-time coverage measurement-scope drop
Jul 29, 2026
624f159
fix: restore CHANGELOG.rst and enable automated changelog updates
Jul 30, 2026
b8a1b05
fix: use stable pypa publish tag and drop tox from Makefile
Aug 4, 2026
db3521e
Merge branch 'master' into irfanuddinahmad/uv-migration
Aug 5, 2026
48c7381
fix: use int-parseable fallback_version instead of 0.0.0.dev0
Aug 10, 2026
d65e5dd
fix: pure-uv mysql8-migrations job, remove permanent codecov threshold
Aug 11, 2026
ae737a5
Merge branch 'master' into irfanuddinahmad/uv-migration
Aug 11, 2026
f471ded
fix: disable python-semantic-release changelog generation
Aug 19, 2026
2aa0151
style: trim codecov.yml explanatory comment
Aug 19, 2026
88e5d15
fix: pin pytest-django<4.13.0 to match master's compat constraint
Aug 24, 2026
d1621ee
fix: create GitHub release with assets attached, not after publish
irfanuddinahmad Aug 27, 2026
00ce65d
fix: pin release.yml actions to sample-plugin's verified SHAs
irfanuddinahmad Sep 2, 2026
ab0a1a8
fix: use v-prefixed tag_format for release tag consistency
irfanuddinahmad Sep 9, 2026
e0f6a43
fix: update author to Open edX Project convention
irfanuddinahmad Sep 9, 2026
dca14b5
fix: restore __version__ dropped during pyproject.toml consolidation
irfanuddinahmad Sep 14, 2026
bcdb0bd
fix: remove dangling codecov.yml comments, not present pre-migration
irfanuddinahmad Sep 14, 2026
397c9ba
Merge remote-tracking branch 'origin/master' into irfanuddinahmad/uv-…
irfanuddinahmad Sep 23, 2026
1f1bf7c
fix: use secrets.GITHUB_TOKEN instead of custom org secret for releas…
irfanuddinahmad Sep 24, 2026
a8cadeb
fix: restore tox delegation for quality target
irfanuddinahmad Sep 24, 2026
587a630
fix: drop uv run from Makefile per feanil's review feedback
irfanuddinahmad Sep 28, 2026
dd37c40
fix: inherit secrets in release.yml's run_ci call
irfanuddinahmad Sep 29, 2026
d6014a4
Merge remote-tracking branch 'upstream/master' into irfanuddinahmad/u…
irfanuddinahmad Sep 29, 2026
b28dec2
revert: drop unnecessary py312- prefix from tox envnames
irfanuddinahmad Sep 29, 2026
722f89e
build(deps): bump python-semantic-release action pin to v10.7.0
irfanuddinahmad Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
- It may or may not make a migration depending on exactly what you modified, but it should still be run.
- This should be run from either a venv with all the edx-analytics-data-api requirements installed or if you checked out edx-enterprise-data into the src directory used by edx-analytics-data-api, you can run this command through an edx-analytics-data-api shell.
- It would be `./manage.py makemigrations` in the shell.
- [ ] [Version](https://github.com/openedx/edx-enterprise-data/blob/master/enterprise/__init__.py) bumped
- [ ] [Changelog](https://github.com/openedx/edx-enterprise-data/blob/master/CHANGELOG.rst) record added
- [ ] Translations updated (see docs/internationalization.rst but also this isn't blocking for merge atm)

**Post merge:**
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- '**'
workflow_call:

jobs:
run_tests:
Expand All @@ -20,33 +21,26 @@ jobs:

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: setup python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install -r requirements/pip.txt

- name: Set env variable
run: export AWS_CONFIG_FILE=/dev/null

- name: check pip version
run: pip --version

- name: check pip-tools version
run: pip freeze
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: pip install -r requirements/ci.txt
run: uv sync --group ci

- name: Install GNU gettext
run: sudo apt-get install gettext

- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
run: uv run tox

- name: Run Coverage
if: matrix.python-version == '3.12' && (matrix.toxenv=='django42-data' || matrix.toxenv=='django42-reporting')
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/mysql8-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,22 @@ jobs:
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install system Packages
run: |
sudo apt-get update
- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/pip_tools.txt') }}
restore-keys: ${{ runner.os }}-pip-
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Ubuntu and sql Versions
run: |
lsb_release -a
mysql -V
- name: Install Python dependencies
run: |
pip install -r requirements/dev.txt
pip uninstall -y mysqlclient
pip install --no-binary mysqlclient mysqlclient
uv sync --group dev --group mysql8 --no-binary-package mysqlclient
- name: Initiate Services
run: |
sudo /etc/init.d/mysql start
Expand All @@ -72,5 +59,5 @@ jobs:
do
echo "CREATE DATABASE IF NOT EXISTS db_$db;" | sudo mysql -u root
export DB_NAME=db_$db
python manage.py migrate --noinput --run-syncdb --database "$db" --settings=enterprise_data.settings.test
uv run python manage.py migrate --noinput --run-syncdb --database "$db" --settings=enterprise_data.settings.test
done
31 changes: 0 additions & 31 deletions .github/workflows/pypi-publish.yml

This file was deleted.

100 changes: 100 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Semantic Release

on:
push:
branches: [master]

jobs:
run_ci:
uses: ./.github/workflows/ci.yml
secrets: inherit

release:
needs: run_ci
runs-on: ubuntu-latest
if: github.ref_name == 'master'
concurrency:
group: ${{ github.workflow }}-release-${{ github.ref_name }}
cancel-in-progress: false

permissions:
contents: write

steps:
# Note: We checkout the repository at the branch that triggered the workflow.
# Python Semantic Release will automatically convert shallow clones to full clones
# if needed to ensure proper history evaluation. However, we forcefully reset the
# branch to the workflow sha because it is possible that the branch was updated
# while the workflow was running, which prevents accidentally releasing un-evaluated
# changes.
- name: Setup | Checkout Repository on Release Branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.ref_name }}

- name: Setup | Force release branch to be at workflow sha
run: |
git reset --hard ${{ github.sha }}

- name: Action | Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@b700dbeb1f431a0fcc30a79f3f0869407fe07278 # v10.7.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
changelog: "false"
# Commit, tag, push and build, but don't create the GitHub release.
# We create it ourselves in the next step so that the distributions
# are attached before the release is published. See that step for why.
vcs_release: "false"

# This repo has immutable releases enabled, which freezes a release's
# assets the moment it is published, so assets cannot be attached
# afterwards. `gh release create` handles this by creating the release as
# a draft, uploading the assets, and only then publishing it:
# https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/immutable-releases
- name: Publish | Create GitHub Release with Assets
if: steps.release.outputs.released == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NOTES: ${{ steps.release.outputs.release_notes }}
TAG: ${{ steps.release.outputs.tag }}
run: |
printf '%s' "$RELEASE_NOTES" > "$RUNNER_TEMP/release_notes.md"
gh release create "$TAG" \
--verify-tag \
--title "$TAG" \
--notes-file "$RUNNER_TEMP/release_notes.md" \
dist/*

- name: Upload | Distribution Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: steps.release.outputs.released == 'true'
with:
name: distribution-artifacts
path: dist
if-no-files-found: error

outputs:
released: ${{ steps.release.outputs.released || 'false' }}
version: ${{ steps.release.outputs.version }}

publish_to_pypi:
runs-on: ubuntu-latest
needs: release
if: github.ref_name == 'master' && needs.release.outputs.released == 'true'

permissions:
contents: read
id-token: write

steps:
- name: Setup | Download Build Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: distribution-artifacts
path: dist

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ geckodriver/

# pyenv
.python-version
venv/
venv/
.venv/
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Change Log
.. There should always be an "Unreleased" section for changes pending release.

Unreleased
----------

[10.22.14] - 2026-08-06
-----------------------
Expand Down
13 changes: 4 additions & 9 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
include CHANGELOG.rst
include CONTRIBUTING.rst
include LICENSE.txt
include README.rst
recursive-include enterprise_data *.html *.png *.gif *js *.css *jpg *jpeg *svg *py *.txt *.json
recursive-include enterprise_reporting *.html *.png *.gif *js *.css *jpg *jpeg *svg *py *.txt *.json
recursive-include enterprise_data_roles *.html *.png *.gif *js *.css *jpg *jpeg *svg *py *.txt *.json
recursive-include requirements *.txt
include requirements/base.in
include requirements/reporting.in
include requirements/constraints.txt
include README.md
recursive-include src/enterprise_data *.html *.png *.gif *js *.css *jpg *jpeg *svg *py *.txt *.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check if this .txt still needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *.txt glob in the recursive-include line is still there — only requirements/*.txt was removed, since the requirements/ directory itself no longer exists now that dependencies live in pyproject.toml/uv.lock.

There's currently no tracked .txt file under the package source dir that this pattern would match, but it was already present (unchanged) before this migration, so I left it as a harmless no-op rather than pruning it as part of this PR.

recursive-include src/enterprise_reporting *.html *.png *.gif *js *.css *jpg *jpeg *svg *py *.txt *.json
recursive-include src/enterprise_data_roles *.html *.png *.gif *js *.css *jpg *jpeg *svg *py *.txt *.json
59 changes: 18 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,58 +14,35 @@ clean: ## remove generated byte code, coverage reports, and build artifacts
rm -fr dist/
rm -fr *.egg-info

piptools-requirements: ## install tools prior to requirements
pip install -q -r requirements/pip.txt -r requirements/pip_tools.txt -c requirements/constraints.txt

coverage: clean ## generate and view HTML coverage report
py.test --cov-report html
pytest --cov-report html
$(BROWSER) htmlcov/index.html

COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: piptools-requirements $(COMMON_CONSTRAINTS_TXT) ## re-compile requirements .txt files from .in files
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip-compile --upgrade -o requirements/base.txt requirements/base.in requirements/reporting.in
pip-compile --upgrade -o requirements/dev.txt requirements/base.in requirements/reporting.in requirements/dev-enterprise_data.in \
requirements/dev-enterprise_reporting.in requirements/quality.in
pip-compile --upgrade -o requirements/quality.txt requirements/base.in requirements/reporting.in requirements/dev-enterprise_data.in \
requirements/quality.in requirements/test.in
pip-compile --upgrade -o requirements/ci.txt requirements/ci.in
pip-compile --upgrade -o requirements/test.txt requirements/base.in requirements/reporting.in requirements/test.in
pip-compile --upgrade -o requirements/test-reporting.txt requirements/test-reporting.in
pip-compile --upgrade -o requirements/test-master.txt requirements/base.in requirements/reporting.in requirements/test-master.in \
requirements/test.in
# Let tox control the Django version for tests
grep -e "^django==" requirements/base.txt > requirements/django.txt
sed '/^[dD]jango==/d' requirements/test-master.txt > requirements/test-master.tmp
mv requirements/test-master.tmp requirements/test-master.txt
sed '/^[dD]jango==/d' requirements/test-reporting.txt > requirements/test-reporting.tmp
mv requirements/test-reporting.tmp requirements/test-reporting.txt
compile-requirements: ## generate the uv.lock file without upgrading packages
uv lock

upgrade: ## upgrade all packages in uv.lock and sync constraints from edx-lint
uv run --with edx-lint edx_lint write_uv_constraints pyproject.toml
uv lock --upgrade

requirements: piptools-requirements ## install development environment requirements
pip install -qr requirements/pip.txt
pip install -qr requirements/base.txt --exists-action w
pip-sync requirements/base.txt requirements/dev.txt requirements/test.txt
requirements: ## install development environment requirements
uv sync --group dev

test: clean ## run tests in the current virtualenv
pip install -qr requirements/test.txt --exists-action w
py.test
pytest

test-all: clean ## run tests on every supported Python/Django combination
tox
quality: ## check coding style with isort, pylint, pycodestyle, and pydocstyle
tox -e quality

test-all: clean ## run tests on every supported Python/Django combination
pytest -Wd --ignore src/enterprise_reporting/
pytest -Wd --cov enterprise_reporting --cov-report term-missing --cov-report xml src/enterprise_reporting/tests
$(MAKE) quality

validate: test ## run tests and quality checks
tox -e quality
$(MAKE) quality

isort: ## call isort on packages/files that are checked in quality tests
isort --recursive tests enterprise_reporting enterprise_data enterprise_data_roles manage.py setup.py
isort --recursive tests src/enterprise_reporting src/enterprise_data src/enterprise_data_roles manage.py

.PHONY: requirements upgrade help
.PHONY: requirements upgrade help compile-requirements quality test-all validate
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
project:
default:
target: auto
patch:
default:
target: auto

comment: false
Loading
Loading