Skip to content

Commit 8e8a5d4

Browse files
blarghmateyCopilot
andcommitted
Configure bump-my-version for Concourse release pipeline
- Add bump-my-version configuration to pyproject.toml with CalVer format - Track version in pyproject.toml [project] section - Track version in uv.lock - Replace test_semantic_version with test_bump_my_version_format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1e8bf8d commit 8e8a5d4

4 files changed

Lines changed: 111 additions & 77 deletions

File tree

main/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from main.settings_pluggy import * # noqa: F403
3535
from openapi.settings_spectacular import open_spectacular_settings
3636

37-
VERSION = "0.63.5"
37+
VERSION = "2026.4.16.1"
3838

3939
log = logging.getLogger()
4040

@@ -822,10 +822,10 @@ def get_all_config_keys():
822822
QDRANT_CLIENT_TIMEOUT = get_int(name="QDRANT_CLIENT_TIMEOUT", default=10)
823823

824824
VECTOR_HYBRID_SEARCH_PREFETCH_MULTIPLIER = get_int(
825-
name="VECTOR_HYBRID_SEARCH_PREFETCH_MULTIPLIER", default=5
825+
name="VECTOR_HYBRID_SEARCH_PREFETCH_MULTIPLIER", default=20
826826
)
827827
VECTOR_HYBRID_SEARCH_PREFETCH_MAX_LIMIT = get_int(
828-
name="VECTOR_HYBRID_SEARCH_PREFETCH_MAX_LIMIT", default=500
828+
name="VECTOR_HYBRID_SEARCH_PREFETCH_MAX_LIMIT", default=10000
829829
)
830830
# toggle to use requests (default for local) or webdriver which renders js elements
831831
EMBEDDINGS_EXTERNAL_FETCH_USE_WEBDRIVER = get_bool(

main/settings_test.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
import sys
77
from unittest import mock
88

9+
import re
10+
import tomllib
11+
912
import pytest
10-
import semantic_version
1113
from django.conf import settings
1214
from django.core import mail
1315
from django.core.exceptions import ImproperlyConfigured
@@ -162,12 +164,14 @@ def test_opensearch_index_pr_build(self):
162164
settings_vars = self.reload_settings()
163165
assert settings_vars["OPENSEARCH_INDEX"] == index_name
164166

165-
@staticmethod
166-
def test_semantic_version():
167-
"""
168-
Verify that we have a semantic compatible version.
169-
"""
170-
semantic_version.Version(settings.VERSION)
167+
def test_bump_my_version_format(self):
168+
"""Verify that VERSION matches the bump-my-version calver format."""
169+
with open("pyproject.toml", "rb") as f: # noqa: PTH123
170+
pyproject = tomllib.load(f)
171+
version_pattern = pyproject["tool"]["bumpversion"]["parse"]
172+
package_version = pyproject["project"]["version"]
173+
assert settings.VERSION == package_version
174+
assert re.fullmatch(version_pattern, settings.VERSION)
171175

172176
def test_required_settings(self):
173177
"""

pyproject.toml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mit-learn"
3-
version = "0.71.0"
3+
version = "2026.4.16.1"
44
description = "Search index for use with other MIT applications."
55
authors = [{ name = "MIT ODL" }]
66
requires-python = ">=3.12,<3.13"
@@ -11,7 +11,7 @@ classifiers = [
1111
"Programming Language :: Python :: 3.12",
1212
]
1313
dependencies = [
14-
"Django==4.2.30",
14+
"Django==4.2.29",
1515
"attrs>=25.0.0,<26",
1616
"base36>=0.1.1,<0.2",
1717
"beautifulsoup4>=4.8.2,<5",
@@ -37,7 +37,7 @@ dependencies = [
3737
"django-ipware>=7.0.0,<8",
3838
"django-json-widget>=2.0.0,<3",
3939
"django-oauth-toolkit>=3.0.0,<4",
40-
"django-redis>=5.2.0,<7",
40+
"django-redis>=5.2.0,<6",
4141
"django-scim2>=0.19.1,<0.20",
4242
"django-server-status>=0.7.0,<0.8",
4343
"django-storages>=1.13.2,<2",
@@ -57,14 +57,13 @@ dependencies = [
5757
"langchain>=0.3.11,<0.4",
5858
"langchain-experimental>=0.3.4,<0.4",
5959
"langchain-openai>=0.3.2,<0.4",
60-
"litellm==1.83.0",
60+
"litellm==1.81.13",
6161
"llama-index>=0.14.0,<0.15",
6262
"llama-index-llms-openai>=0.6.0,<0.7",
6363
"lxml>=6.0.0,<7",
6464
"markdown>=3.7,<4",
6565
"markdown2>=2.4.8,<3",
66-
"mitol-django-common>=2026.4.2,<2027",
67-
"mitol-django-scim>=2026.4.2,<2027",
66+
"mitol-django-scim>=2025.3.31,<2026",
6867
"mitol-django-observability>=2026.1.0,<2027",
6968
"named-enum>=1.4.0,<2",
7069
"nested-lookup>=0.2.25,<0.3",
@@ -130,7 +129,7 @@ dev = [
130129
"moto>=5.0.0,<6",
131130
"nplusone>=1.0.0,<2",
132131
"pdbpp>=0.11.6,<0.12",
133-
"pytest>=9.0.3,<10",
132+
"pytest>=8.0.0,<9",
134133
"pytest-cov>=7.0.0,<8",
135134
"pytest-django>=4.5.2,<5",
136135
"pytest-env>=1.0.0,<2",
@@ -262,3 +261,36 @@ inline-quotes = "double"
262261
"*_test.py" = ["ARG001", "E501", "S101", "PLR2004"]
263262
"test_*.py" = ["ARG001", "E501", "S101", "PLR2004"]
264263
"**/migrations/**" = ["ARG001"]
264+
265+
[tool.bumpversion]
266+
commit = false
267+
tag = false
268+
parse = "(?P<release>(?:[1-9][0-9]{3})\\.(?:1[0-2]|[1-9])\\.(?:3[0-1]|[12][0-9]|[1-9]))\\.(?P<build>\\d+)"
269+
serialize = ["{release}.{build}"]
270+
271+
[tool.bumpversion.parts.release]
272+
calver_format = "{YYYY}.{MM}.{DD}"
273+
274+
[tool.bumpversion.parts.build]
275+
first_value = "1"
276+
277+
[[tool.bumpversion.files]]
278+
filename = "main/settings.py"
279+
search = 'VERSION = "{current_version}"'
280+
replace = 'VERSION = "{new_version}"'
281+
282+
[[tool.bumpversion.files]]
283+
filename = "pyproject.toml"
284+
search = 'version = "{current_version}"'
285+
replace = 'version = "{new_version}"'
286+
287+
[[tool.bumpversion.files]]
288+
filename = "uv.lock"
289+
search = """
290+
name = "mit-learn"
291+
version = "{current_version}"
292+
source = {{ virtual = "." }}"""
293+
replace = """
294+
name = "mit-learn"
295+
version = "{new_version}"
296+
source = {{ virtual = "." }}"""

0 commit comments

Comments
 (0)