Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openedx/edx-milestones
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.2
Choose a base ref
...
head repository: openedx/edx-milestones
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 1,704 additions and 299 deletions.
  1. +12 −0 .github/ISSUE_TEMPLATE/config.yml
  2. +91 −0 .github/ISSUE_TEMPLATE/depr-ticket.yml
  3. +7 −0 .github/dependabot.yml
  4. +19 −0 .github/workflows/add-depr-ticket-to-depr-board.yml
  5. +20 −0 .github/workflows/add-remove-label-on-comment.yml
  6. +47 −0 .github/workflows/ci.yml
  7. +10 −0 .github/workflows/commitlint.yml
  8. +33 −0 .github/workflows/pypi-publish.yml
  9. +12 −0 .github/workflows/self-assign-issue.yml
  10. +3 −3 .pep8
  11. +0 −36 .travis.yml
  12. +3 −0 MANIFEST.in
  13. +46 −5 Makefile
  14. +18 −22 README.md
  15. +23 −0 catalog-info.yaml
  16. +3 −1 manage.py
  17. +3 −2 milestones/__init__.py
  18. +1 −1 milestones/admin.py
  19. +4 −6 milestones/api.py
  20. +48 −45 milestones/data.py
  21. +2 −2 milestones/exceptions.py
  22. +0 −2 milestones/management/__init__.py
  23. +0 −2 milestones/management/commands/__init__.py
  24. +0 −2 milestones/management/commands/tests/__init__.py
  25. +9 −13 milestones/migrations/0001_initial.py
  26. +1 −5 milestones/migrations/0002_data__seed_relationship_types.py
  27. +1 −5 milestones/migrations/0003_coursecontentmilestone_requirements.py
  28. +0 −4 milestones/migrations/0004_auto_20151221_1445.py
  29. +1 −1 milestones/migrations/__init__.py
  30. +23 −19 milestones/models.py
  31. +0 −2 milestones/resources.py
  32. +1 −1 milestones/serializers.py
  33. +3 −3 milestones/services.py
  34. +0 −2 milestones/tests/__init__.py
  35. +0 −2 milestones/tests/mocks/__init__.py
  36. +0 −2 milestones/tests/mocks/resources.py
  37. +18 −20 milestones/tests/test_api.py
  38. +13 −15 milestones/tests/test_data.py
  39. +23 −0 milestones/tests/test_model.py
  40. +1 −1 milestones/tests/test_services.py
  41. +3 −3 milestones/tests/utils.py
  42. +0 −2 milestones/urls.py
  43. +3 −4 milestones/validators.py
  44. +0 −2 milestones/views.py
  45. +2 −1 openedx.yaml
  46. +385 −0 pylintrc
  47. +6 −0 pytest.ini
  48. +0 −6 requirements.txt
  49. +8 −0 requirements/base.in
  50. +35 −0 requirements/base.txt
  51. +4 −0 requirements/ci.in
  52. +34 −0 requirements/ci.txt
  53. +12 −0 requirements/constraints.txt
  54. +6 −0 requirements/dev.in
  55. +232 −0 requirements/dev.txt
  56. +4 −0 requirements/pip-tools.in
  57. +28 −0 requirements/pip-tools.txt
  58. +6 −0 requirements/pip.in
  59. +16 −0 requirements/pip.txt
  60. +9 −0 requirements/quality.in
  61. +147 −0 requirements/quality.txt
  62. +10 −0 requirements/test.in
  63. +82 −0 requirements/test.txt
  64. +11 −8 settings.py
  65. +7 −0 setup.cfg
  66. +131 −22 setup.py
  67. +0 −14 test_requirements.txt
  68. +24 −13 tox.ini
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## This configuration file overrides the inherited configuration file defined
## in openedx/.github/.github/ISSUE_TEMPLATE because this repo currently does
## not have Issues turned on, so we create this override to *only* show DEPR
## issues to users creating Issues. Once Issues are turned on and the repo is
## ready to accept Issues of all types, this file must be deleted so inheritance
## of standard openedx configuration works properly.

blank_issues_enabled: false
contact_links:
- name: Open edX Community Support
url: https://discuss.openedx.org/
about: Please ask all questions, suggest all enhancements, and report all bugs here.
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/depr-ticket.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
## This configuration file overrides the inherited configuration file defined
## in openedx/.github/.github/ISSUE_TEMPLATE because this repo currently does
## not have Issues turned on, so we create this override to *only* show DEPR
## issues to users creating Issues. Once Issues are turned on and the repo is
## ready to accept Issues of all types, this file must be deleted so inheritance
## of standard openedx configuration works properly.

name: Deprecation (DEPR) Ticket
description: Per OEP-21, use this template to begin the technology deprecation process.
title: "[DEPR]: <Technology Name>"
labels: ["DEPR"]
body:
- type: markdown
attributes:
value: |
Refer to [OEP-21](https://open-edx-proposals.readthedocs.io/en/latest/processes/oep-0021-proc-deprecation.html) for more detail on the deprecation and removal process. This ticket should only be used for proposing the removal of an Open edX technology.
Please leave [DEPR] in the title of your ticket!
- type: input
id: todays-date
attributes:
label: Proposal Date
description: The start date of this proposal (likely today)
placeholder: 29 February 2020
validations:
required: true
- type: input
id: accept-date
attributes:
label: Ticket Acceptance Date
description: When is the target date for getting this proposal accepted?
placeholder: 29 February 2020
validations:
required: true
- type: input
id: remove-date
attributes:
label: Technology Removal Date
description: When is the target date for getting this technology removed?
placeholder: 29 February 2020
validations:
required: true
- type: input
id: named-release-without
attributes:
label: First Open edX Named Release Without This Functionality
description: Named releases are generally CUT in early April and early October. Based on the above removal date, what named release would be the first without this code? Please reach out to the Build Test Release working group (#wg-build-test-release in Slack) if you're not sure.
placeholder: Dogwood
validations:
required: true
- type: textarea
id: rationale
attributes:
label: Rationale
description: Explain, in a few sentences, why this technology should be removed - what's the usage pattern? What's wrong with keeping it around?
validations:
required: true
- type: textarea
id: removal
attributes:
label: Removal
description: Include a description with links to what exactly is being removed.
validations:
required: true
- type: textarea
id: replacement
attributes:
label: Replacement
description: Include a description with links to what this is being replaced by.
validations:
required: true
- type: textarea
id: deprecation
attributes:
label: Deprecation
description: If you plan to mark the code for deprecation, explain how.
validations:
required: false
- type: textarea
id: migration
attributes:
label: Migration
description: If automated migration will be needed, explain your migration plan.
validations:
required: false
- type: textarea
id: addl-info
attributes:
label: Additional Info
description: If there is any additional publicly sharable information or data from your earlier analysis, include that.
validations:
required: false
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Adding new check for github-actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/workflows/add-depr-ticket-to-depr-board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Run the workflow that adds new tickets that are either:
# - labelled "DEPR"
# - title starts with "[DEPR]"
# - body starts with "Proposal Date" (this is the first template field)
# to the org-wide DEPR project board

name: Add newly created DEPR issues to the DEPR project board

on:
issues:
types: [opened]

jobs:
routeissue:
uses: openedx/.github/.github/workflows/add-depr-ticket-to-depr-board.yml@master
secrets:
GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/add-remove-label-on-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "label: " it tries to apply
# the label indicated in rest of comment.
# If the comment starts with "remove label: ", it tries
# to remove the indicated label.
# Note: Labels are allowed to have spaces and this script does
# not parse spaces (as often a space is legitimate), so the command
# "label: really long lots of words label" will apply the
# label "really long lots of words label"

name: Allows for the adding and removing of labels via comment

on:
issue_comment:
types: [created]

jobs:
add_remove_labels:
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master

47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Python CI

on:
push:
branches: [master]
pull_request:
branches:
- '**'

jobs:
run_tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11', '3.12']
toxenv: [quality, django42]

steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

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

- name: Install pip-tools
run: pip install -r requirements/pip-tools.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: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
10 changes: 10 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Run commitlint on the commit messages in a pull request.

name: Lint Commit Messages

on:
- pull_request

jobs:
commitlint:
uses: openedx/.github/.github/workflows/commitlint.yml@master
33 changes: 33 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish package to PyPi

on:
release:
types: [published]

jobs:

push:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.12

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

- name: Install Dependencies
run: pip install setuptools wheel

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/self-assign-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "assign me" it assigns the author to the
# ticket (case insensitive)

name: Assign comment author to ticket if they say "assign me"
on:
issue_comment:
types: [created]

jobs:
self_assign_by_comment:
uses: openedx/.github/.github/workflows/self-assign-issue.yml@master
6 changes: 3 additions & 3 deletions .pep8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[pep8]
[pycodestyle]
ignore=E501
max_line_length=119
exclude=settings
max_line_length=120
exclude=.git,.tox,milestones/migrations,settings
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions MANIFEST.in
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
include LICENSE
include README.md
include requirements/base.in
include requirements/test.in
include requirements/constraints.txt
51 changes: 46 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,54 @@
all: install quality test
.PHONY: clean help pii_check quality requirements selfcheck test upgrade validate

install-test:
pip install -q -r test_requirements.txt
.DEFAULT_GOAL := help

install: install-test
pip install -q -r requirements.txt
help: ## display this help message
@echo "Please use \`make <target>' where <target> is one of"
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'

all: requirements quality test

clean: ## remove generated byte code, coverage reports, and build artifacts
find . -name '__pycache__' -exec rm -rf {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
coverage erase
rm -fr build/
rm -fr dist/
rm -fr *.egg-info

pii_check: ## check for PII annotations on all Django models
tox -e pii_check

requirements:
pip install -qr requirements/pip.txt
pip install -qr requirements/dev.txt

quality:
tox -e quality

selfcheck: ## check that the Makefile is well-formed
@echo "The Makefile is well-formed."

test: ## run tests on every supported Python version
tox

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade --allow-unsafe -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --allow-unsafe -o requirements/base.txt requirements/base.in
pip-compile --upgrade --allow-unsafe -o requirements/test.txt requirements/test.in
pip-compile --upgrade --allow-unsafe -o requirements/quality.txt requirements/quality.in
pip-compile --upgrade --allow-unsafe -o requirements/ci.txt requirements/ci.in
pip-compile --upgrade --allow-unsafe -o requirements/dev.txt requirements/dev.in
# Let tox control the Django version for tests
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt

validate: quality pii_check test ## run tests and quality checks
Loading