Skip to content

Commit 6e70e9f

Browse files
committed
merge main, correct rebase
2 parents 53415c3 + 875389a commit 6e70e9f

20 files changed

+353
-461
lines changed

.github/workflows/build-linux.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
name: Build on Linux with SDK
22

3-
on: [pull_request, release]
3+
on:
4+
workflow_dispatch:
5+
release:
6+
pull_request:
7+
types: [opened, synchronize, reopened, closed]
48

59
jobs:
610
build:
11+
if: |
12+
!(github.event_name == 'pull_request' && github.event.pull_request.draft == true) &&
13+
!(github.event_name == 'pull_request' && ${{ contains(github.event.commits[0].message, 'ci skip') }}) &&
14+
(github.repository == 'MESAHub/mesa')
715
strategy:
816
fail-fast: false
917
matrix:
10-
sdk: ["22.6.1", "23.7.3", "24.7.1"]
11-
18+
sdk: ["23.7.3", "24.7.1"] # pick 2 or 3 most recent. "22.6.1", ...
1219
runs-on: ubuntu-latest
13-
1420
steps:
1521
- name: Checkout
1622
uses: actions/checkout@v4
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Check TestHub results
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
request_status:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Get branch name and latest commit SHA
11+
id: vars
12+
run: |
13+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
14+
# Replace "/" with "%2F" in branch name
15+
BRANCH_NAME="${BRANCH_NAME//\//%2F}"
16+
COMMIT_SHA="${{ github.event.pull_request.head.sha }}"
17+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
18+
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV
19+
20+
- name: Fetch test results
21+
id: fetch_results
22+
run: |
23+
TEST_URL="https://testhub.mesastar.org/${{ env.BRANCH_NAME }}/commits/${{ env.COMMIT_SHA }}"
24+
if [ -z "$BRANCH_NAME" ]; then
25+
TEST_URL="https://testhub.mesastar.org"
26+
fi
27+
echo "Fetching test results from: $TEST_URL"
28+
29+
RESPONSE=$(curl -s -o response.json -w "%{http_code}" "$TEST_URL")
30+
31+
if [[ "$RESPONSE" -ne 200 ]]; then
32+
echo "Test results not found or server error."
33+
exit 1
34+
fi
35+
36+
# cat response.json
37+
38+
PASS_COUNT=$(grep -B 1 "tests where all computers report passing." response.json | sed -n -E -e 's/<b>([0-9]+)<\/b>.*/\1/p')
39+
echo "Number of passing tests: $PASS_COUNT"
40+
41+
FAIL_COUNT=$(grep -B 1 "tests where all computers report failing." response.json | sed -n -E -e 's/<b>([0-9]+)<\/b>.*/\1/p')
42+
echo "Number of failing tests: $FAIL_COUNT"
43+
44+
MIXED_COUNT=$(grep -B 1 "tests where some computers report passing and others report failing." response.json | sed -n -E -e 's/<b>([0-9]+)<\/b>.*/\1/p')
45+
echo "Number of mixed tests: $MIXED_COUNT"
46+
47+
UNTESTED_COUNT=$(grep -B 1 "tests with no submission data." response.json | sed -n -E -e 's/<b>([0-9]+)<\/b>.*/\1/p')
48+
echo "Number of untested tests: $UNTESTED_COUNT"
49+
50+
echo ""
51+
52+
# Check that there are no failing or mixed tests
53+
if [[ "$FAIL_COUNT" -gt 0 || "$MIXED_COUNT" -gt 0 ]]; then
54+
echo "Some tests are failing or mixed!"
55+
exit 1
56+
fi
57+
# Check that there are at least 106 passing tests
58+
if [[ "$PASS_COUNT" -lt 106 ]]; then
59+
echo "Not enough passing tests!"
60+
exit 1
61+
else
62+
echo "All tests are passing!"
63+
fi
64+
65+
- name: Allow merge if tests pass
66+
if: success()
67+
run: echo "All tests passed. PR is good to merge!"

.github/workflows/test-mesa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
echo "platform: Linux" >> $MESA_TEST_YML
6363
echo "platform_version: Ubuntu" >> $MESA_TEST_YML
6464
shell: bash
65-
65+
6666
- name: Check Install
6767
env:
6868
OMP_NUM_THREADS: ${{env.OMP_NUM_THREADS}}

binary/defaults/binary_history_columns.list

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
star_2_mass ! mass of second star in msun
7373
!lg_star_2_mass ! log10 mass of second star in msun
7474
!sum_of_masses ! star_1_mass + star_2_mass
75+
!mass_ratio ! star_2_mass / star_1_mass
76+
!obs_mass_ratio ! min(m2/m1, m2/m1)
7577
lg_mtransfer_rate ! log10 of abs(mass transfer rate) in Msun/yr
7678
! this considers the amount of mass lost from the donor due to RLOF
7779
! not the actual mass that ends up accreted

binary/defaults/pgbinary.defaults

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,29 +1897,33 @@
18971897
! ::
18981898

18991899
Text_Summary1_win_flag = .false.
1900-
Text_Summary1_win_width = 10
1901-
Text_Summary1_win_aspect_ratio = 0.15
1900+
Text_Summary1_win_width = 7
1901+
Text_Summary1_win_aspect_ratio = 0.6
19021902

19031903
! ::
19041904

19051905
Text_Summary1_xleft = 0.02
19061906
Text_Summary1_xright = 0.98
19071907
Text_Summary1_ybot = 0.08
19081908
Text_Summary1_ytop = 0.98
1909-
Text_Summary1_txt_scale = 4.5
1909+
Text_Summary1_txt_scale = 3.0
19101910
Text_Summary1_title = ''
19111911

19121912
! setup default
19131913

19141914
! ::
19151915

1916-
Text_Summary1_num_rows = 8
1917-
Text_Summary1_num_cols = 4
1916+
Text_Summary1_num_rows = 5
1917+
Text_Summary1_num_cols = 1
19181918
Text_Summary1_name(:, :) = ''
19191919

19201920
! ::
19211921

19221922
Text_Summary1_name(1, 1) = 'model_number'
1923+
Text_Summary1_name(2, 1) = 'jdot'
1924+
Text_Summary1_name(3, 1) = 'mass_ratio'
1925+
Text_Summary1_name(4, 1) = 'period_days'
1926+
Text_Summary1_name(5, 1) = 'rl_relative_overflow_1'
19231927

19241928
! file output
19251929

binary/private/binary_history.f90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,10 @@ subroutine binary_history_getval(b, c, val, int_val, is_int_val, ierr)
595595
val = safe_log10(b% m(2) / Msun)
596596
case(bh_sum_of_masses)
597597
val = (b% m(1) + b% m(2)) / Msun
598+
case(bh_mass_ratio)
599+
val = b% m(2) / b% m(1)
600+
case(bh_obs_mass_ratio)
601+
val = min(b% m(2) / b% m(1), b% m(1) / b% m(2))
598602
case(bh_lg_mtransfer_rate)
599603
val = safe_log10(abs(b% step_mtransfer_rate) / Msun * secyer)
600604
case(bh_lg_mstar_dot_1)

binary/private/binary_private_def.f90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ module binary_private_def
5757
integer, parameter :: bh_star_2_mass = bh_lg_star_1_mass + 1
5858
integer, parameter :: bh_lg_star_2_mass = bh_star_2_mass + 1
5959
integer, parameter :: bh_sum_of_masses = bh_lg_star_2_mass + 1
60-
integer, parameter :: bh_lg_mtransfer_rate = bh_sum_of_masses + 1
60+
integer, parameter :: bh_mass_ratio = bh_sum_of_masses + 1
61+
integer, parameter :: bh_obs_mass_ratio = bh_mass_ratio + 1
62+
integer, parameter :: bh_lg_mtransfer_rate = bh_obs_mass_ratio + 1
6163
integer, parameter :: bh_lg_mstar_dot_1 = bh_lg_mtransfer_rate + 1
6264
integer, parameter :: bh_lg_mstar_dot_2 = bh_lg_mstar_dot_1 + 1
6365
integer, parameter :: bh_lg_system_mdot_1 = bh_lg_mstar_dot_2 + 1
@@ -145,6 +147,8 @@ subroutine binary_history_column_names_init(ierr)
145147
binary_history_column_name(bh_star_2_mass) = 'star_2_mass'
146148
binary_history_column_name(bh_lg_star_2_mass) = 'lg_star_2_mass'
147149
binary_history_column_name(bh_sum_of_masses) = 'sum_of_masses'
150+
binary_history_column_name(bh_mass_ratio) = 'mass_ratio'
151+
binary_history_column_name(bh_obs_mass_ratio) = 'obs_mass_ratio'
148152
binary_history_column_name(bh_lg_mtransfer_rate) = 'lg_mtransfer_rate'
149153
binary_history_column_name(bh_lg_mstar_dot_1) = 'lg_mstar_dot_1'
150154
binary_history_column_name(bh_lg_mstar_dot_2) = 'lg_mstar_dot_2'

docs/source/changelog.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ New Features
2121

2222
A pseudo drag term ``v_drag`` has been reintroduced for ``u_flag`` to damp spurious shocks.
2323

24+
``hydro_rotation`` now contains the more accurate deformation fits from Fabry+2022, A&A 661, A123
25+
2426
.. _Bug Fixes main:
2527

2628
Bug Fixes
2729
---------
2830

2931
fixed small bug in star/private/create_initial_model.f90 that will have a small effect on creating initial models
30-
32+
fixed bug in ``star/private/hydro_rotation.f90`` where the sigmoid function to cap ``w_div_w_crit`` was incorrectly implemented. This only influences models with `w_div_wc_flag = .true.`
3133

3234
.. note:: Before releasing a new version of MESA, move `Changes in main` to a new section below with the version number as the title, and add a new `Changes in main` section at the top of the file (see ```changelog_template.rst```).
3335

docs/source/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = 'MESA'
21-
copyright = '2024, The MESA Team'
21+
copyright = '2025, The MESA Team'
2222
author = 'The MESA Team'
2323
language = 'en'
2424
version = 'main'
@@ -117,7 +117,13 @@
117117
# Set canonical URL from the Read the Docs Domain
118118
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
119119

120-
html_context = {}
120+
html_context = {
121+
"display_github": True, # Integrate GitHub
122+
"github_user": "MESAHub", # Username
123+
"github_repo": "mesa", # Repo name
124+
"github_version": "main", # Version
125+
"conf_py_path": "/docs/source/", # Path in the checkout to the docs root
126+
}
121127

122128
# Tell Jinja2 templates the build is running on Read the Docs
123129
html_context["READTHEDOCS"] = os.environ.get("READTHEDOCS", "") == "True"

docs/source/developing/infrastructure.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,8 @@ Wolf. It is funded by Frank and Bill W. The Heroku account costs
108108
around $600/yr, though its cost has been higher during the GitHub
109109
transition.
110110

111-
The testing `log archive <https://logs.mesastar.org/>`__ lives on a
112-
server controlled by Josiah. The marginal cost is $1/month, which he
113-
covers.
111+
The testing `log archive <https://mesa-logs.flatironinstitute.org/>`__ lives on a
112+
server at the Flatiron Institute, with Philip Mocz as a point of contact.
114113

115114
Jenkins
116115
^^^^^^^

0 commit comments

Comments
 (0)