Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upgrade Python Requirements

on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
inputs:
branch:
description: "Target branch against which to create requirements PR"
required: true
# If copying this template manually, you must provide your default branch name
# in quotes, such as 'master'
default: "main"

jobs:
call-upgrade-python-requirements-workflow:
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
with:
# If copying manually, also provide your default branch name in quotes here
branch: ${{ github.event.inputs.branch || 'main' }}
# optional parameters below; fill in if you'd like github or email notifications
# user_reviewers: ""
# team_reviewers: "axim-engineering"
# email_address: "aximimprovements@axim.org"
# send_success_notification: false
secrets:
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ docs/_build
.DS_Store
source/.DS_Store
.idea/
.python-version
.python-version
.venv/
*.pyc
__pycache__/
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ build:
# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements/docs.txt
- method: pip
path: .
41 changes: 16 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,22 @@ help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@awk -F ':.*?## ' '/^[a-zA-Z]/ && NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort

.PHONY: help Makefile upgrade requirements

# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS)

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -r requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
$(PIP_COMPILE) --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -r requirements/pip-tools.txt
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) -o requirements/docs.txt requirements/docs.in

requirements:
pip install -r requirements/pip-tools.txt
pip-sync requirements/base.txt

serve_docs:
sphinx-autobuild -W docs/ docs/_build/html/

# Emulate the build step on RTD to flush out errors ahead pushing
check_docs:
sphinx-build -T -E -W --keep-going docs/ docs/_build/html
.PHONY: help Makefile upgrade requirements install

sync-constraints: ## download and sync common_constraints.txt to pyproject.toml
uv run python sync_constraints.py

upgrade: sync-constraints
uv lock --upgrade

requirements: ## install dependencies using uv
uv sync

serve_docs: ## serve documentation locally with auto-reload
uv run sphinx-autobuild -W docs/ docs/_build/html/

check_docs: ## emulate the build step on RTD to flush out errors ahead pushing
uv run sphinx-build -T -E -W --keep-going docs/ docs/_build/html

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

Learner analytics for Open edX!

## Development Setup

This project uses [uv](https://docs.astral.sh/uv/) for dependency management. To get started:

```bash
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies
make install

# Serve documentation locally
make serve_docs

# Check documentation builds correctly
make check_docs

# Upgrade dependencies
make upgrade
```

## What is Aspects?

Aspects is an optional implementation of analytics for the Open edX LMS. It is the combined solution of Cairn by Overhang.io and the OARS project developed by Axim Collaborative with a huge amount of help from the Open edX community. Primarily it is intended to be a "batteries included" set of configurations and plugins to combine 3rd party tools into a powerful and flexible system for learner analytics.
Expand Down
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[project]
name = "openedx-aspects"
version = "3.0.0"
description = "Learner analytics documentation for Open edX"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "AGPL-3.0"}
authors = [
{name = "Axim Collaborative", email = "oscm@axim.org"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

dependencies = [
"sphinx",
"sphinx-book-theme",
"sphinx-autobuild",
"sphinx-copybutton",
"sphinxcontrib-mermaid",
"sphinxcontrib-contentui",
]

[project.urls]
Homepage = "https://docs.openedx.org/projects/openedx-aspects"
Documentation = "https://docs.openedx.org/projects/openedx-aspects"
Repository = "https://github.com/openedx/openedx-aspects"
"Issue Tracker" = "https://github.com/openedx/openedx-aspects/issues"

[tool.uv]
constraint-dependencies = [
# Downloaded from edx-lint common_constraints.txt
# DO NOT EDIT - Use 'python sync_constraints.py' to update
"Django<6.0",
"elasticsearch<7.14.0",
# Local constraint
"greenlet>3.0.1", # playwright and sqlalchemy requirements conflict for greenlet<=3.0.1
]
# Common constraints from edx-lint
override-dependencies = [
"Django<6.0", # using LTS django version
"elasticsearch<7.14.0", # 7.14.0+ contains breaking changes
]
12 changes: 0 additions & 12 deletions requirements/base.in

This file was deleted.

109 changes: 0 additions & 109 deletions requirements/base.txt

This file was deleted.

20 changes: 20 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
# Similar to other constraint files this file doesn't install any packages.
# It specifies version constraints that will be applied if a package is needed.
# When pinning something here, please provide an explanation of why it is a good
# idea to pin this package across all edx repos, Ideally, link to other information
# that will help people in the future to remove the pin when possible.
# Writing an issue against the offending project and linking to it here is good.
#
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.

# using LTS django version
Django<6.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
# See https://github.com/openedx/edx-platform/issues/35126 for more info
elasticsearch<7.14.0
12 changes: 0 additions & 12 deletions requirements/constraints.txt

This file was deleted.

9 changes: 0 additions & 9 deletions requirements/docs.in

This file was deleted.

Loading