Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
b60f27c
feat: Add Homebrew and Spack package definitions
sbryngelson Nov 4, 2025
007e05e
chore: Remove Spack files (Homebrew-only branch)
sbryngelson Nov 4, 2025
95097c9
docs: Consolidate Homebrew documentation into single file
sbryngelson Nov 4, 2025
edfc8fe
chore: Remove non-Homebrew documentation files
sbryngelson Nov 4, 2025
c1b5453
chore: Remove README/CITATION changes and issue templates
sbryngelson Nov 4, 2025
e34711d
refactor: Move Homebrew files to packaging/homebrew/ directory
sbryngelson Nov 4, 2025
6ee36b7
docs: Update README to match latest upstream version
sbryngelson Nov 4, 2025
33e9645
docs: Update README and CITATION.cff, add issue templates (#1022)
sbryngelson Nov 4, 2025
7d21ed3
fix: Address PR review feedback for Homebrew formula
sbryngelson Nov 4, 2025
35b4469
refactor: Implement all PR review suggestions for Homebrew formula
sbryngelson Nov 4, 2025
bd9f51e
fix: Address Copilot PR review comments
sbryngelson Nov 4, 2025
dd0b8c4
fix up
sbryngelson Nov 4, 2025
07ee05e
docs: Address final Copilot review suggestions
sbryngelson Nov 4, 2025
29a928d
fix: Implement qodo-merge-pro safety improvements
sbryngelson Nov 4, 2025
d1d1c67
ci: Add Homebrew formula testing workflow
sbryngelson Nov 4, 2025
b2e034e
fix: Address all Homebrew style violations
sbryngelson Nov 4, 2025
86a4c89
fix
sbryngelson Nov 4, 2025
79924a4
fix?
sbryngelson Nov 4, 2025
b7c580c
fix
sbryngelson Nov 4, 2025
919a800
Fix Homebrew CI: use local tap for formula installation
sbryngelson Nov 4, 2025
9fd8391
Restore bug_report.md from master branch
sbryngelson Nov 4, 2025
d176487
Fix Homebrew formula: handle hashed installation directory
sbryngelson Nov 4, 2025
5f5ced5
Fix: Find each binary individually in separate hashed directories
sbryngelson Nov 4, 2025
d372e63
Simplify Homebrew formula to install binaries only
sbryngelson Nov 4, 2025
3c5d327
push
sbryngelson Nov 4, 2025
161d41d
Fix test: Don't run binaries with -h flag
sbryngelson Nov 4, 2025
52de223
Fix Homebrew style: Use assert_path_exists instead of assert_predicat…
sbryngelson Nov 4, 2025
1d3bc21
Install full MFC toolchain with smart wrapper for read-only Cellar
sbryngelson Nov 4, 2025
3b8c950
Fix formula test: Don't trigger Python venv setup
sbryngelson Nov 4, 2025
46e325a
Add Cantera dependency and pre-install Python venv
sbryngelson Nov 4, 2025
a38350f
Build Cantera 3.1.0 from source instead of PyPI
sbryngelson Nov 4, 2025
272340a
Complete Cantera 3.1.0 source build implementation
sbryngelson Nov 4, 2025
9b8db76
Fix trailing whitespace errors in Homebrew formula
sbryngelson Nov 4, 2025
5a48e36
Fix Cantera resource: remove incorrect revision hash
sbryngelson Nov 4, 2025
5d7ef61
Fix unnecessary spacing in Cantera resource definition
sbryngelson Nov 4, 2025
b8a2940
Fix: Build Cantera before MFC to avoid PyPI dependency error
sbryngelson Nov 4, 2025
9a45f65
Fix Homebrew style: Use ENV.fetch instead of ENV[]
sbryngelson Nov 4, 2025
4e5cc79
Add packaging module to Cantera build dependencies
sbryngelson Nov 4, 2025
1cd2cc3
Fix: Run scons via venv Python to find packaging module
sbryngelson Nov 4, 2025
5d2eb66
Remove scons from Homebrew dependencies
sbryngelson Nov 4, 2025
e2c249c
Fix Cantera build: Pass compiler and SDK paths to scons
sbryngelson Nov 5, 2025
4edc60f
Fix: Pass compiler flags as environment variables, not scons args
sbryngelson Nov 5, 2025
55ca2b0
Fix hash alignment for Homebrew style check
sbryngelson Nov 5, 2025
f9d3409
Add verbose logging and artifacts to Homebrew CI
sbryngelson Nov 5, 2025
24452d4
Fix brew test version check by committing formula to tap
sbryngelson Nov 5, 2025
26df743
Fix: Modify ENV directly instead of passing hash to system
sbryngelson Nov 5, 2025
dd0ba7c
Replace brew test with direct test commands
sbryngelson Nov 5, 2025
3a4ce68
Pass compiler flags directly to scons as build arguments
sbryngelson Nov 5, 2025
301ea0b
Fix trailing whitespace on line 45
sbryngelson Nov 5, 2025
f3643b9
Fix test: use formula-specific prefix for libexec check
sbryngelson Nov 5, 2025
ef4aba5
Fix Cantera build: Set ENV vars and explicit compilers for scons
sbryngelson Nov 5, 2025
7dc3c9a
Fix trailing whitespace on lines 44 and 51
sbryngelson Nov 5, 2025
09fe44e
Fix TypeError: Set SDKROOT in ENV instead of passing hash to system
sbryngelson Nov 5, 2025
19fe2d9
Add SDK C++ include path to scons extra_inc_dirs
sbryngelson Nov 5, 2025
b1c75bb
Pass compiler flags as scons variables for configure checks
sbryngelson Nov 5, 2025
1612552
Fix RuboCop: Use ENV.fetch instead of ENV[] for compiler flags
sbryngelson Nov 5, 2025
3973747
Fix Cantera scons: Use cc_flags/cxx_flags instead of CCFLAGS/CXXFLAGS
sbryngelson Nov 5, 2025
d4dcaaa
Add C++ include path directly to cxx_flags for scons checks
sbryngelson Nov 5, 2025
23949ef
Add SDK main include path to compiler flags for C header access
sbryngelson Nov 5, 2025
0385aa8
Add Cantera config.log capture to CI for debugging
sbryngelson Nov 5, 2025
00f8295
Fix CI: Add pipefail to catch brew install failures
sbryngelson Nov 5, 2025
7f34c7e
Add config.log output on Cantera build failure
sbryngelson Nov 5, 2025
abe825a
Fix RuboCop style: remove trailing whitespace and shorten long line
sbryngelson Nov 5, 2025
4bffab5
Improve config.log capture: search recursively and list directory con…
sbryngelson Nov 5, 2025
bd376b4
Fix RuboCop: remove trailing whitespace on lines 87 and 99
sbryngelson Nov 5, 2025
f4fa72e
Enhance debug output: use opoo, check multiple config.log locations, …
sbryngelson Nov 5, 2025
b8c2463
Remove Cantera from formula - make it an optional user-installed depe…
sbryngelson Nov 5, 2025
06edb9b
Install Cantera from PyPI instead of building from source
sbryngelson Nov 5, 2025
9e21f25
Fix RuboCop: use assert_path_exists instead of assert_predicate with …
sbryngelson Nov 5, 2025
5ee24d4
Fix mfc.sh build: ensure we're in buildpath directory
sbryngelson Nov 5, 2025
62393d1
Add debug output to diagnose mfc.sh directory issue
sbryngelson Nov 5, 2025
69427d9
Fix trailing whitespace in formula
sbryngelson Nov 5, 2025
b9d4148
Fix mfc.sh build: keep toolchain in buildpath during build
sbryngelson Nov 5, 2025
96fe6d4
Fix mfc wrapper script: add toolchain symlink and build directory
sbryngelson Nov 6, 2025
5c9bbb7
Fix Homebrew formula: copy directories instead of symlinking to avoid…
sbryngelson Nov 6, 2025
9163b77
Fix Homebrew formula: ensure fresh venv on each install
sbryngelson Nov 6, 2025
ed9c328
Fix CI: handle Homebrew dylib fixup warnings gracefully
sbryngelson Nov 6, 2025
0d472e7
Fix CI: remove invalid mfc count test
sbryngelson Nov 6, 2025
5a7a31a
Fix CI: use absolute path for test case file
sbryngelson Nov 6, 2025
8de2268
Remove 'mfc run' test from CI and clarify Homebrew limitations
sbryngelson Nov 6, 2025
bc7175f
Enable 'mfc run' by patching toolchain to use Homebrew binaries
sbryngelson Nov 6, 2025
c56cd92
Fix mfc run: patch toolchain to skip building and use Homebrew binaries
sbryngelson Nov 6, 2025
cae22fd
Fix wrapper script creation and permissions
sbryngelson Nov 6, 2025
09c8bf2
Fix executable permissions with post_install hook
sbryngelson Nov 6, 2025
385061a
Fix CI: use absolute path for case.py in mfc run test
sbryngelson Nov 6, 2025
692519f
docs
sbryngelson Nov 6, 2025
1408aec
docs
sbryngelson Nov 6, 2025
5b85475
cleanup
sbryngelson Nov 6, 2025
ef66c9a
harden
sbryngelson Nov 6, 2025
d3b1a93
quick start
sbryngelson Nov 6, 2025
e75b7ff
deploy to repo
sbryngelson Nov 6, 2025
415ad05
push
sbryngelson Nov 6, 2025
8a75271
remove test
sbryngelson Nov 6, 2025
d1381c8
improve and deploy
sbryngelson Nov 7, 2025
3efb9d6
ci(homebrew): merge duplicate push blocks in deploy-tap.yml
sbryngelson Nov 7, 2025
845c68b
minor trigger
sbryngelson Nov 7, 2025
a7572e2
ci(homebrew): fix brew audit to use formula name instead of path
sbryngelson Nov 7, 2025
2308b9a
bump to trigger
sbryngelson Nov 7, 2025
3be3e15
fix(homebrew): use rm_r instead of rm_rf per brew audit
sbryngelson Nov 7, 2025
1a32884
minor
sbryngelson Nov 7, 2025
6b5bd9f
fix(homebrew): only install executable files to bin
sbryngelson Nov 7, 2025
5da2c3a
style(homebrew): fix rubocop guard clause style
sbryngelson Nov 7, 2025
8215624
fix(homebrew): move venv to var/ to avoid dylib fixups and harden bin…
sbryngelson Nov 7, 2025
3ff41d1
style(homebrew): fix heredoc indentation for rubocop
sbryngelson Nov 7, 2025
72304d5
fix(ci): update venv path check in homebrew.yml workflow
sbryngelson Nov 7, 2025
43bfb7b
feat(ci): add smoke tests before expensive Homebrew installation
sbryngelson Nov 7, 2025
1bb2226
minor
sbryngelson Nov 7, 2025
315c4fd
fix(ci): configure git identity for brew tap-new in smoke tests
sbryngelson Nov 7, 2025
f7e6aea
fix(homebrew): correct Python indentation in build.py patch
sbryngelson Nov 7, 2025
81e30ff
fix
sbryngelson Nov 7, 2025
bb096d7
trigger
sbryngelson Nov 8, 2025
efb6c53
try again deploy
sbryngelson Nov 8, 2025
93f8c3b
fix
sbryngelson Nov 8, 2025
2db4c31
fixup
sbryngelson Nov 8, 2025
59f196b
add test
sbryngelson Nov 8, 2025
0aab6ca
fix
sbryngelson Nov 8, 2025
66e2093
fix?
sbryngelson Nov 8, 2025
323e3bf
Fix homebrew.yml: Update venv path from var/mfc/venv to libexec/venv
sbryngelson Nov 8, 2025
11a4e98
Fix lock.yaml write error by redirecting MFC paths to temp directory
sbryngelson Nov 8, 2025
c3b0c1d
Use sitecustomize.py for early MFC path patching
sbryngelson Nov 8, 2025
95f2109
Fix Homebrew formula: disable bottles to avoid relocation errors
sbryngelson Nov 8, 2025
ede409c
Fix Homebrew formula to enable proper bottle creation
sbryngelson Nov 8, 2025
dcc6031
Fix Cantera build issue: use pre-built wheel for Cantera, compile MFC…
sbryngelson Nov 8, 2025
addcd87
Simplify MFC deps install: let pip choose wheels vs source builds
sbryngelson Nov 8, 2025
25a39df
Fix orjson dylib relocation by forcing source compilation
sbryngelson Nov 8, 2025
9d4e299
Use bottle :unneeded to skip bottling for Python venv
sbryngelson Nov 8, 2025
e3a7f3c
Remove deprecated 'bottle :unneeded' causing wrong-arity error in bre…
sbryngelson Nov 8, 2025
2b2b749
Add Rust dependency and rebuild orjson with headerpad for bottle relo…
sbryngelson Nov 8, 2025
cf453b9
Move mfc wrapper to libexec and use write_exec_script for audit compl…
sbryngelson Nov 8, 2025
f5f9abb
Remove Rust dependency and orjson source rebuild - not needed with li…
sbryngelson Nov 8, 2025
b1e3ac5
Add skip_clean for libexec/venv to prevent orjson dylib relocation er…
sbryngelson Nov 8, 2025
c73b091
Improve Homebrew wrapper UX: add help, block unsupported commands, fi…
sbryngelson Nov 9, 2025
9ade107
Add Homebrew installation and usage documentation
sbryngelson Nov 9, 2025
6970bce
cleanup
sbryngelson Nov 9, 2025
61adc7e
Add README for Homebrew tap and auto-deploy it
sbryngelson Nov 9, 2025
1e78657
tap
sbryngelson Nov 9, 2025
cb29fc5
minor diff
sbryngelson Nov 9, 2025
7c7543f
Add smart case file detection to mfc wrapper
sbryngelson Nov 11, 2025
4041006
Merge upstream/master into homebrew-formula
sbryngelson Nov 11, 2025
346c413
Fix RuboCop style error: remove redundant escape in regex
sbryngelson Nov 11, 2025
ec24979
Update CI to test shorthand mfc syntax
sbryngelson Nov 11, 2025
3e4ba96
Merge upstream/master into homebrew-formula
sbryngelson Nov 12, 2025
a6d2641
Address PR #1038 feedback: standardize Homebrew command syntax
sbryngelson Nov 12, 2025
5fecd1b
Simplify Homebrew wrapper: remove redundant 'mfc run' syntax
sbryngelson Nov 12, 2025
76ac76e
Add error handling for 'mfc run' syntax
sbryngelson Nov 12, 2025
41706e1
Improve wrapper validation and error messages
sbryngelson Nov 12, 2025
58ba949
Fix RuboCop style error: remove redundant escape in regex
sbryngelson Nov 12, 2025
f125de6
Update packaging/homebrew/mfc.rb
sbryngelson Nov 12, 2025
4b5c016
Fix RuboCop error and improve validation logic
sbryngelson Nov 12, 2025
1a1865f
Fix 'run' detection to check first non-flag argument
sbryngelson Nov 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Install the prebuilt package and run an example:
brew install mflowcode/mfc/mfc
mkdir -p ~/mfc_quickstart && cd ~/mfc_quickstart
cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py .
mfc run case.py -n 2
mfc case.py -n 2
```

Use `-n X` to select the number of MPI processes. For developer commands (`build`, `test`, etc.), clone the repo and use `./mfc.sh`.
Expand Down
5 changes: 3 additions & 2 deletions docs/documentation/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ Run a quick example:
mkdir -p ~/mfc_quickstart && cd ~/mfc_quickstart
cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py .
# Use -n X to choose the number of MPI processes
mfc run case.py -n 2
mfc case.py -n 2
```

Notes:
- The Homebrew wrapper supports only `mfc run ...`. Developer commands like `build`, `test`, `clean` are available when you clone the repo and use `./mfc.sh`.
- The Homebrew package uses a simplified syntax: just `mfc <case.py>` to run cases.
- Developer commands like `build`, `test`, `clean` are available when you clone the repo and use `./mfc.sh`.
- The package bundles a Python venv and prebuilt binaries; no additional setup is required.
- Examples are installed at `$(brew --prefix mfc)/examples/`.

Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ several supercomputer clusters, both interactively and through batch submission.
If you installed MFC via Homebrew, run cases with the `mfc` wrapper:

```bash
mfc run <path/to/case.py> -n 2
mfc <path/to/case.py> -n 2
```

- Use `-n X` to control the number of MPI processes (ranks).
- Only the `run` command is supported in the Homebrew wrapper.
- The Homebrew package uses a simplified syntax: just `mfc <case.py>` to run cases.
- To use developer commands (`build`, `test`, `clean`, etc.), clone the repository and use `./mfc.sh`.
- The wrapper passes through runtime flags like `-t pre_process simulation`, `-n`, and others; it always runs with preinstalled binaries.
- Examples live at `$(brew --prefix mfc)/examples/`.
Expand Down
6 changes: 3 additions & 3 deletions packaging/homebrew/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Run the 1D Sod shock tube example:
```bash
mkdir -p ~/mfc_example && cd ~/mfc_example
cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py .
mfc run case.py -n 2
mfc case.py -n 2
```

## What's Included
Expand All @@ -28,12 +28,12 @@ mfc run case.py -n 2
## Usage

```bash
mfc run <case.py> -n <processes>
mfc <case.py> -n <processes>
```

Use `-n X` to set the number of MPI processes.

**Note**: The Homebrew wrapper supports only `mfc run`. For developer commands (`build`, `test`, `clean`, etc.), [clone the repository](https://github.com/MFlowCode/MFC) and use `./mfc.sh`.
**Note**: The Homebrew wrapper supports only running cases. For developer commands (`build`, `test`, `clean`, etc.), [clone the repository](https://github.com/MFlowCode/MFC) and use `./mfc.sh`.

## Documentation

Expand Down
54 changes: 40 additions & 14 deletions packaging/homebrew/mfc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,17 @@ def install
fi
done

SUBCMD="${ARGS[0]-}"

# Friendly help and guardrails
if [[ ${#ARGS[@]} -eq 0 ]] || [[ "${SUBCMD}" == "--help" ]] || [[ "${SUBCMD}" == "-h" ]]; then
if [[ ${#ARGS[@]} -eq 0 ]] || [[ "${ARGS[0]-}" == "--help" ]] || [[ "${ARGS[0]-}" == "-h" ]]; then
cat <<'HHELP'
MFC (Homebrew) #{version}

Usage:
mfc <case.py> [options]
mfc run <case.py> [options]

Examples:
mfc case.py -n 2
mfc run case.py -n 2 -t pre_process simulation
mfc examples/1D_sodshocktube/case.py -n 2 -t pre_process simulation

Notes:
- This Homebrew wrapper uses prebuilt binaries and a preinstalled venv.
Expand All @@ -117,18 +114,48 @@ def install
exit 0
fi

# Smart detection: if first arg looks like a case file, auto-prepend "run"
if [[ "${SUBCMD}" =~ .py$ ]] || [[ -f "${SUBCMD}" ]]; then
ARGS=("run" "${ARGS[@]}")
SUBCMD="run"
# Handle --version flag
if [[ "${ARGS[0]-}" == "--version" ]] || [[ "${ARGS[0]-}" == "-v" ]]; then
echo "MFC (Homebrew) #{version}"
exit 0
fi

if [[ "${SUBCMD}" != "run" ]]; then
echo "mfc (Homebrew): only 'run' is supported in the Homebrew package."
echo "Use 'mfc <case.py>' or clone the repository for developer commands."
# Find first non-flag argument
first_nonflag=""
for arg in "${ARGS[@]}"; do
if [[ "$arg" != -* ]]; then
first_nonflag="$arg"
break
fi
done

# Check if no case file provided
if [[ -z "${first_nonflag}" ]]; then
echo "mfc (Homebrew): missing case file."
echo "Usage: mfc <case.py> [options]"
echo "Example: mfc case.py -n 2"
exit 2
fi

# Check if user accidentally used 'mfc run' syntax (even with flags before it)
if [[ "${first_nonflag}" == "run" ]]; then
echo "mfc (Homebrew): The 'run' command is not needed."
echo "Usage: mfc <case.py> [options]"
echo "Example: mfc case.py -n 2"
exit 2
fi

# Require a readable Python file (not a directory)
if [[ ! "${first_nonflag}" =~ .py$ ]] || [[ ! -f "${first_nonflag}" ]]; then
echo "mfc (Homebrew): first argument must be a readable Python case file."
echo "Given: ${first_nonflag}"
echo "Usage: mfc <case.py> [options]"
exit 2
fi

# Always prepend "run" since this wrapper only supports running cases
ARGS=("run" "${ARGS[@]}")

# Create a temporary working directory (Cellar is read-only)
TMPDIR="$(mktemp -d)"
trap 'rm -rf "${TMPDIR}"' EXIT
Expand Down Expand Up @@ -226,8 +253,7 @@ def caveats
MFC has been installed successfully!

To run a case:
mfc <case.py>
mfc run <case.py> (explicit form)
mfc <case.py> [options]

Pre-built binaries are also available directly:
pre_process, simulation, post_process
Expand Down
Loading