Skip to content
Open
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
7 changes: 1 addition & 6 deletions main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from main.sentry import init_sentry
from openapi.settings_spectacular import open_spectacular_settings

VERSION = "1.149.1"
VERSION = "2026.4.16.1"

log = logging.getLogger()

Expand Down Expand Up @@ -1203,11 +1203,6 @@
default="/home",
description="The suffix (with leading slash) to append to a course URL.",
)
OL_OPENEDX_COURSE_OUTLINE_URL = get_string(
name="OL_OPENEDX_COURSE_OUTLINE_URL",
default="/api/ol-course-outline/v0/{course_id}/",
description="Path template for Open edX course outline plugin endpoint.",
)

OPENEDX_BASE_REDIRECT_URL = get_string(
name="OPENEDX_BASE_REDIRECT_URL",
Expand Down
16 changes: 10 additions & 6 deletions main/settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
Validate that our settings functions work
"""

import re
import sys
from types import SimpleNamespace

import pytest
import semantic_version
import tomllib
from django.core import mail
from django.core.exceptions import ImproperlyConfigured
from mitol.common import envs
Expand Down Expand Up @@ -161,8 +162,11 @@ def test_db_ssl_enable(monkeypatch, settings_sandbox):
assert settings_vars["DATABASES"]["default"]["OPTIONS"] == {"sslmode": "require"}


def test_semantic_version(settings):
"""
Verify that we have a semantic compatible version.
"""
semantic_version.Version(settings.VERSION)
def test_bump_my_version_format(settings):
"""Verify that VERSION matches the bump-my-version calver format."""
with open("pyproject.toml", "rb") as f: # noqa: PTH123
pyproject = tomllib.load(f)
version_pattern = pyproject["tool"]["bumpversion"]["parse"]
package_version = pyproject["project"]["version"]
assert package_version == settings.VERSION
assert re.fullmatch(version_pattern, settings.VERSION)
35 changes: 34 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mitxonline"
version = "0.69.1"
version = "2026.4.16.1"
description = "MITx Online"
authors = [{ name = "MIT ODL" }]
requires-python = "~=3.11.0"
Expand Down Expand Up @@ -251,3 +251,36 @@ fixture-parentheses = false
"*_test.py" = ["ARG001", "E501", "S101", "PLR2004"]
"test_*.py" = ["ARG001", "E501", "S101", "PLR2004"]
"**/migrations/**" = ["ARG001", "D101", "D100"]

[tool.bumpversion]
commit = false
tag = false
parse = "(?P<release>(?:[1-9][0-9]{3})\\.(?:1[0-2]|[1-9])\\.(?:3[0-1]|[12][0-9]|[1-9]))\\.(?P<build>\\d+)"
serialize = ["{release}.{build}"]

[tool.bumpversion.parts.release]
calver_format = "{YYYY}.{MM}.{DD}"

[tool.bumpversion.parts.build]
first_value = "1"

[[tool.bumpversion.files]]
filename = "main/settings.py"
search = 'VERSION = "{current_version}"'
replace = 'VERSION = "{new_version}"'

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "uv.lock"
search = """
name = "mitxonline"
version = "{current_version}"
source = {{ virtual = "." }}"""
replace = """
name = "mitxonline"
version = "{new_version}"
source = {{ virtual = "." }}"""
21 changes: 4 additions & 17 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading