Skip to content

Commit 59b6675

Browse files
2024 update (#56)
* reflect update in mud * cleanup + updates + linting * rtd * readme update * typo * try supporting missing tex * typo * temporarily remove 3.7 with pip * bring back in 3.7 on 0.1.1rc3 * use latest mud version
1 parent e9f87b7 commit 59b6675

File tree

17 files changed

+888
-506
lines changed

17 files changed

+888
-506
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ name: builds
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
paths:
77
- "src/**.py"
88
- "setup.py"
99
- "setup.cfg"
1010
- ".github/workflows/build.yml"
1111
pull_request:
12-
branches-ignore: '**docker**'
12+
branches-ignore: ["**docker**"]
1313
paths:
1414
- "src/**.py"
1515
- "setup.py"
1616
- "setup.cfg"
1717
- ".github/workflows/build.yml"
1818
schedule:
19-
- cron: "0 0 1 * *"
19+
- cron: "0 0 1 * *"
2020

2121
jobs:
2222
build:
@@ -27,12 +27,12 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v3
3131
with:
3232
fetch-depth: 0
3333

3434
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v1
35+
uses: actions/setup-python@v2
3636
with:
3737
python-version: ${{ matrix.python-version }}
3838

@@ -42,7 +42,7 @@ jobs:
4242
pip install --upgrade wheel setuptools setuptools_scm
4343
4444
- name: Inspect version info
45-
run: |
45+
run: |
4646
python setup.py --version
4747
git describe --dirty --tags --long --match "*[0-9]*"
4848

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
release:
55
types: [published, created, edited]
66
push:
7-
branches: '**docker**'
7+
branches: ["**docker**"]
88

99
jobs:
1010
build_image:
1111
name: Build Docker image from source
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Check out the repo
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
1818

.github/workflows/examples.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ name: examples
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
paths:
77
- "**.py"
88
- ".github/workflows/examples.yml"
99
pull_request:
10-
paths:
10+
paths:
1111
- "**.py"
1212
- ".github/workflows/examples.yml"
1313
schedule:
14-
- cron: "0 0 1 * *"
14+
- cron: "0 0 1 * *"
1515

1616
jobs:
1717
pip-build:
1818
name: Default ${{ matrix.python-version }}
1919
strategy:
2020
matrix:
21-
python-version: ["3.7", "3.8", "3.9", "3.10"]
21+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
2626

2727
- name: Set up Python ${{ matrix.python-version }}
2828
uses: actions/setup-python@v2
@@ -32,12 +32,33 @@ jobs:
3232
- name: Install Dependencies
3333
run: |
3434
pip install .
35+
# pip install mud==0.1.1
36+
pip install -U mud
3537
36-
- name: Test CLI
38+
- name: Test CLI (no TeX)
39+
continue-on-error: true
3740
run: |
3841
cd /tmp
3942
mud_run_all -v
40-
43+
44+
- name: Install apt dependencies
45+
run: |
46+
sudo apt-get install -yqq \
47+
texlive-base \
48+
texlive-latex-base \
49+
texlive-latex-extra \
50+
texlive-fonts-recommended \
51+
texlive-fonts-extra \
52+
texlive-science \
53+
latexmk \
54+
dvipng \
55+
cm-super
56+
57+
- name: Test CLI (w TeX)
58+
run: |
59+
cd /tmp
60+
mud_run_all -v
61+
4162
- name: Generate figures using makefile
4263
run: |
4364
cd scripts
@@ -72,7 +93,8 @@ jobs:
7293
- name: Install Dependencies
7394
run: |
7495
pip install .
75-
pip install mud==0.1rc1
96+
# pip install mud==0.1.1
97+
pip install -U mud
7698
7799
- name: Conda information
78100
run: conda list

.github/workflows/main.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@ name: tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
paths:
77
- "src/**.py"
88
- "setup.py"
99
- "setup.cfg"
1010
- ".github/workflows/main.yml"
1111
pull_request:
12-
branches-ignore: "**docker**"
12+
branches-ignore: ["**docker**"]
1313
paths:
1414
- "src/**.py"
1515
- "setup.py"
1616
- "setup.cfg"
1717
- ".github/workflows/main.yml"
1818
schedule:
19-
- cron: "0 0 */7 * *"
19+
- cron: "0 0 */7 * *"
2020

2121
jobs:
2222
test:
2323
name: Run unit tests
2424
strategy:
2525
matrix:
26-
python-version: ["3.7", "3.10"]
26+
python-version: ["3.7", "3.10", "3.12"]
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v3
3131
with:
3232
fetch-depth: 0
3333

3434
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v1
35+
uses: actions/setup-python@v2
3636
with:
3737
python-version: ${{ matrix.python-version }}
3838

@@ -43,4 +43,3 @@ jobs:
4343
4444
- name: Run unit tests
4545
run: pytest
46-

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
# release: [published, created, edited]
55
push:
66
tags:
7-
- 'v*'
7+
- "v*"
88

99
jobs:
1010
pypi:
@@ -15,12 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v1
23+
uses: actions/setup-python@v2
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626

@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-latest
4646
steps:
4747
- name: Check out the repo
48-
uses: actions/checkout@v2
48+
uses: actions/checkout@v3
4949

5050
- name: Login to DockerHub
5151
uses: docker/login-action@v1

.readthedocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
# Required
55
version: 2
66

7+
build:
8+
os: "ubuntu-20.04"
9+
tools:
10+
python: "3.8"
11+
712
# Build documentation in the docs/ directory with Sphinx
813
sphinx:
914
configuration: docs/conf.py
@@ -18,7 +23,6 @@ formats:
1823
- epub
1924

2025
python:
21-
version: 3.8
2226
install:
2327
- requirements: docs/requirements.txt
2428
- method: pip

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,31 @@
1111
Authors: Troy Butler & Michael Pilosov
1212

1313
# Installation
14+
For Python 3.7-3.12:
1415

1516
```sh
1617
pip install mud-examples
1718
```
1819

20+
To reproduce the results in Michael's thesis, use `mud-examples==0.1`. However, this comes with `mud==0.0.28`.
21+
Newer versions should still produce the same figures.
22+
23+
TeX is recommended (but not required):
24+
25+
```
26+
apt-get install -yqq \
27+
texlive-base \
28+
texlive-latex-base \
29+
texlive-latex-extra \
30+
texlive-fonts-recommended \
31+
texlive-fonts-extra \
32+
texlive-science \
33+
latexmk \
34+
dvipng \
35+
cm-super
36+
```
37+
38+
1939
# Quickstart
2040

2141
Generate all of the figures the way they are referenced in the paper:

docs/conf.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
templates_path = ["_templates"]
8787

8888
# The suffix of source filenames.
89-
#source_suffix = ".rst"
90-
source_suffix = ['.rst', '.md']
89+
# source_suffix = ".rst"
90+
source_suffix = [".rst", ".md"]
9191

9292
# The encoding of source files.
9393
# source_encoding = 'utf-8-sig'
@@ -149,9 +149,9 @@
149149

150150
# -- Options for HTML output -------------------------------------------------
151151

152-
#html_theme = "alabaster"
152+
# html_theme = "alabaster"
153153

154-
#html_theme_options = {"sidebar_width": "300px", "page_width": "1200px"}
154+
# html_theme_options = {"sidebar_width": "300px", "page_width": "1200px"}
155155

156156

157157
html_theme = "furo"
@@ -205,8 +205,8 @@
205205

206206

207207
html_css_files = [
208-
"custom.css",
209-
]
208+
"custom.css",
209+
]
210210

211211
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
212212
# using the given strftime format.
@@ -267,7 +267,13 @@
267267
# Grouping the document tree into LaTeX files. List of tuples
268268
# (source start file, target name, title, author, documentclass [howto/manual]).
269269
latex_documents = [
270-
("index", "user_guide.tex", "mud-examples Documentation", "Mathematical Michael", "manual")
270+
(
271+
"index",
272+
"user_guide.tex",
273+
"mud-examples Documentation",
274+
"Mathematical Michael",
275+
"manual",
276+
)
271277
]
272278

273279
# The name of an image file (relative to this directory) to place at the top of

0 commit comments

Comments
 (0)