Skip to content

Commit

Permalink
2024 update (#56)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mathematicalmichael authored Jan 22, 2024
1 parent e9f87b7 commit 59b6675
Show file tree
Hide file tree
Showing 17 changed files with 888 additions and 506 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ name: builds

on:
push:
branches: [ main ]
branches: [main]
paths:
- "src/**.py"
- "setup.py"
- "setup.cfg"
- ".github/workflows/build.yml"
pull_request:
branches-ignore: '**docker**'
branches-ignore: ["**docker**"]
paths:
- "src/**.py"
- "setup.py"
- "setup.cfg"
- ".github/workflows/build.yml"
schedule:
- cron: "0 0 1 * *"
- cron: "0 0 1 * *"

jobs:
build:
Expand All @@ -27,12 +27,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -42,7 +42,7 @@ jobs:
pip install --upgrade wheel setuptools setuptools_scm
- name: Inspect version info
run: |
run: |
python setup.py --version
git describe --dirty --tags --long --match "*[0-9]*"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
release:
types: [published, created, edited]
push:
branches: '**docker**'
branches: ["**docker**"]

jobs:
build_image:
name: Build Docker image from source
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
38 changes: 30 additions & 8 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ name: examples

on:
push:
branches: [ main ]
branches: [main]
paths:
- "**.py"
- ".github/workflows/examples.yml"
pull_request:
paths:
paths:
- "**.py"
- ".github/workflows/examples.yml"
schedule:
- cron: "0 0 1 * *"
- cron: "0 0 1 * *"

jobs:
pip-build:
name: Default ${{ matrix.python-version }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand All @@ -32,12 +32,33 @@ jobs:
- name: Install Dependencies
run: |
pip install .
# pip install mud==0.1.1
pip install -U mud
- name: Test CLI
- name: Test CLI (no TeX)
continue-on-error: true
run: |
cd /tmp
mud_run_all -v
- name: Install apt dependencies
run: |
sudo apt-get install -yqq \
texlive-base \
texlive-latex-base \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-science \
latexmk \
dvipng \
cm-super
- name: Test CLI (w TeX)
run: |
cd /tmp
mud_run_all -v
- name: Generate figures using makefile
run: |
cd scripts
Expand Down Expand Up @@ -72,7 +93,8 @@ jobs:
- name: Install Dependencies
run: |
pip install .
pip install mud==0.1rc1
# pip install mud==0.1.1
pip install -U mud
- name: Conda information
run: conda list
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ name: tests

on:
push:
branches: [ main ]
branches: [main]
paths:
- "src/**.py"
- "setup.py"
- "setup.cfg"
- ".github/workflows/main.yml"
pull_request:
branches-ignore: "**docker**"
branches-ignore: ["**docker**"]
paths:
- "src/**.py"
- "setup.py"
- "setup.cfg"
- ".github/workflows/main.yml"
schedule:
- cron: "0 0 */7 * *"
- cron: "0 0 */7 * *"

jobs:
test:
name: Run unit tests
strategy:
matrix:
python-version: ["3.7", "3.10"]
python-version: ["3.7", "3.10", "3.12"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -43,4 +43,3 @@ jobs:
- name: Run unit tests
run: pytest

8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# release: [published, created, edited]
push:
tags:
- 'v*'
- "v*"

jobs:
pypi:
Expand All @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Login to DockerHub
uses: docker/login-action@v1
Expand Down
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# Required
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "3.8"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand All @@ -18,7 +23,6 @@ formats:
- epub

python:
version: 3.8
install:
- requirements: docs/requirements.txt
- method: pip
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,31 @@
Authors: Troy Butler & Michael Pilosov

# Installation
For Python 3.7-3.12:

```sh
pip install mud-examples
```

To reproduce the results in Michael's thesis, use `mud-examples==0.1`. However, this comes with `mud==0.0.28`.
Newer versions should still produce the same figures.

TeX is recommended (but not required):

```
apt-get install -yqq \
texlive-base \
texlive-latex-base \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-science \
latexmk \
dvipng \
cm-super
```


# Quickstart

Generate all of the figures the way they are referenced in the paper:
Expand Down
20 changes: 13 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
templates_path = ["_templates"]

# The suffix of source filenames.
#source_suffix = ".rst"
source_suffix = ['.rst', '.md']
# source_suffix = ".rst"
source_suffix = [".rst", ".md"]

# The encoding of source files.
# source_encoding = 'utf-8-sig'
Expand Down Expand Up @@ -149,9 +149,9 @@

# -- Options for HTML output -------------------------------------------------

#html_theme = "alabaster"
# html_theme = "alabaster"

#html_theme_options = {"sidebar_width": "300px", "page_width": "1200px"}
# html_theme_options = {"sidebar_width": "300px", "page_width": "1200px"}


html_theme = "furo"
Expand Down Expand Up @@ -205,8 +205,8 @@


html_css_files = [
"custom.css",
]
"custom.css",
]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down Expand Up @@ -267,7 +267,13 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
("index", "user_guide.tex", "mud-examples Documentation", "Mathematical Michael", "manual")
(
"index",
"user_guide.tex",
"mud-examples Documentation",
"Mathematical Michael",
"manual",
)
]

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

0 comments on commit 59b6675

Please sign in to comment.