Skip to content

Commit

Permalink
Release 24.1 (#74)
Browse files Browse the repository at this point in the history
* update version checks

* update release version

* update release notes

* fix case

* require released pybmds

* update versions in db config
  • Loading branch information
shapiromatron authored Nov 26, 2024
1 parent d362e3e commit 0012619
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 47 deletions.
4 changes: 2 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# History

## v24.1 (TBD)
## v24.1

*Released on 2024-XX-XX.*
*Released on 2024-11-25.*

* Added BMDS Desktop mode for execution
* Added support for Multitumor modeling
Expand Down
2 changes: 1 addition & 1 deletion bmds_ui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys

__version__ = "24.1a6"
__version__ = "24.1"


def manage():
Expand Down
5 changes: 2 additions & 3 deletions bmds_ui/desktop/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,14 @@ def stop(self):


def get_latest_version(package: str) -> tuple[datetime, Version]:
raise ValueError("TODO - implement when we're clear to release")
url = f"https://pypi.org/pypi/{package}/json"
try:
resp = urlopen(url, timeout=5) # noqa: S310
except URLError:
except URLError as err:
parsed = urlparse(url)
raise ValueError(
f"Could not check latest version; unable to reach {parsed.scheme}://{parsed.netloc}."
) from URLError
) from err
data = json.loads(resp.read().decode("utf-8"))
latest_str = list(data["releases"].keys())[-1]
upload_time = data["releases"][latest_str][0]["upload_time"]
Expand Down
2 changes: 1 addition & 1 deletion bmds_ui/desktop/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def version_check(check: bool = False) -> str:
return "**Status:** Ready to check - this requires an internet connection."
current = get_installed_version()
try:
latest_date, latest = get_latest_version("bmds") # TODO - change to bmds-ui
latest_date, latest = get_latest_version("bmds-ui")
except ValueError as err:
return str(err)
try:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "bmds_ui"
license = {text = "MIT License"}
authors = [
{name = "BMDS development team"},
{name = "BMDS Development Team"},
{name = "Andy Shapiro", email = "[email protected]"}
]
readme = "README.md"
Expand All @@ -24,7 +24,7 @@ classifiers = [
requires-python = ">=3.11"
dependencies = [
# pybmds
"pybmds==24.1a6",
"pybmds==24.1",

# website
"Django~=5.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ interactions:
Host:
- pypi.org
User-Agent:
- Python-urllib/3.11
- Python-urllib/3.12
method: GET
uri: https://pypi.org/pypi/bmds/json
uri: https://pypi.org/pypi/bmds-ui/json
response:
body:
string: '{"info":{"author":"Andy Shapiro","author_email":"[email protected]","bugtrack_url":null,"classifiers":["Intended
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ interactions:
Host:
- pypi.org
User-Agent:
- Python-urllib/3.11
- Python-urllib/3.12
method: GET
uri: https://pypi.org/pypi/bmds/json
uri: https://pypi.org/pypi/bmds-ui/json
response:
body:
string: '{"info":{"author":"Andy Shapiro","author_email":"[email protected]","bugtrack_url":null,"classifiers":["Intended
Expand Down
63 changes: 31 additions & 32 deletions tests/data/db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1959,8 +1959,8 @@
analysis_id: cc3ca355-a57a-4fba-9dc3-99657562df68
analysis_schema_version: '1.1'
bmds_python_version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
bmds_ui_version: 9434971c
outputs:
- bayesian:
Expand Down Expand Up @@ -3419,8 +3419,8 @@
model_index: null
notes: ''
version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
dataset_index: 0
error: null
frequentist:
Expand Down Expand Up @@ -5135,8 +5135,8 @@
model_index: null
notes: ''
version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
option_index: 0
starred: false
started: 2024-05-14 19:18:13.442351+00:00
Expand Down Expand Up @@ -6837,8 +6837,8 @@
- 10.0
- 19.0
version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
selected:
notes: ''
model_index: null
Expand Down Expand Up @@ -6999,10 +6999,10 @@
option_index: 0
dataset_index: 0
analysis_id: 432a6083-f9aa-4de2-a71f-a6488b4c5bf1
bmds_ui_version: 24.1a6
bmds_ui_version: "24.1"
bmds_python_version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
analysis_schema_version: '1.1'
errors: []
created: 2024-08-22 15:46:25.966993+00:00
Expand Down Expand Up @@ -7942,8 +7942,8 @@
- 8.24
- 9.23
version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
selected:
notes: User selected best fitting model
model_index: 0
Expand Down Expand Up @@ -8100,10 +8100,10 @@
option_index: 0
dataset_index: 0
analysis_id: cfe458aa-2313-44c0-9346-f4931567bef0
bmds_ui_version: 24.1a6
bmds_ui_version: "24.1"
bmds_python_version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
analysis_schema_version: '1.1'
errors: []
created: 2024-08-22 15:45:08.929260+00:00
Expand Down Expand Up @@ -9832,8 +9832,8 @@
- 0
- 0
version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
datasets:
- ns:
- 20.0
Expand Down Expand Up @@ -9936,10 +9936,10 @@
option_index: 0
dataset_index: -1
analysis_id: 2f86f324-911d-4194-97d1-fc7c3f5d0c72
bmds_ui_version: 24.1a6
bmds_ui_version: "24.1"
bmds_python_version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
analysis_schema_version: '1.1'
errors: []
created: 2024-08-22 15:26:02.720355+00:00
Expand Down Expand Up @@ -13096,8 +13096,8 @@
- 8.0
- 10.0
version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
selected:
notes: User selected best fitting model
model_index: 1
Expand Down Expand Up @@ -13266,10 +13266,10 @@
option_index: 0
dataset_index: 0
analysis_id: 4459f728-05f7-4057-a27c-174822a0313d
bmds_ui_version: 24.1a6
bmds_ui_version: "24.1"
bmds_python_version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
analysis_schema_version: '1.1'
errors: []
created: 2024-08-22 15:25:20.345600+00:00
Expand Down Expand Up @@ -14368,8 +14368,8 @@
- 15.1564
- 15.0368
version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
selected:
notes: User selected best fitting model
model_index: 0
Expand Down Expand Up @@ -14526,10 +14526,10 @@
option_index: 0
dataset_index: 0
analysis_id: 09c09d22-2e1a-413c-b350-6b19969f6533
bmds_ui_version: 24.1a6
bmds_ui_version: "24.1"
bmds_python_version:
dll: 24.1a6
python: 24.1a6
dll: "24.1"
python: "24.1"
analysis_schema_version: '1.1'
errors: []
created: 2024-08-22 15:23:53.050405+00:00
Expand Down Expand Up @@ -14763,7 +14763,6 @@
content_type: 1
subject: Homepage
content:
title: <h1>Welcome to BMDS online.</h1>
template: "<div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Welcome
to BMDS online.</h1>\n </div>\n</div>\n<div class=\"row\">\n <div class=\"col-md-8\">\n
\ <div class=\"col-lg\">\n <p>\n This web-application
Expand Down
3 changes: 1 addition & 2 deletions tests/desktop/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@


@pytest.mark.vcr
@pytest.mark.xfail(reason="Turn back on when we're ready for release")
def test_get_latest_version():
uploaded, version = actions.get_latest_version("bmds") # TODO - change to bmds-ui
uploaded, version = actions.get_latest_version("bmds-ui")
assert isinstance(uploaded, datetime)
assert isinstance(version, Version)

Expand Down

0 comments on commit 0012619

Please sign in to comment.