Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 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
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
4 changes: 2 additions & 2 deletions .github/workflows/homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ jobs:
cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py "$TESTDIR/"

echo "Running with $(sysctl -n hw.ncpu) processors..."
# Use absolute path since mfc wrapper creates its own tmpdir
mfc run "$TESTDIR/case.py" -j $(sysctl -n hw.ncpu)
# Use absolute path and shorthand syntax (mfc auto-detects and prepends 'run')
mfc "$TESTDIR/case.py" -j $(sysctl -n hw.ncpu)

echo "Test case completed successfully!"

Expand Down
19 changes: 14 additions & 5 deletions packaging/homebrew/mfc.rb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High-level Suggestion

The PR adds a shorthand for the run subcommand, which is inconsistent with the main developer tool's CLI. To ensure a consistent user experience, this implicit behavior should be removed, requiring the explicit mfc run <case.py> command. [High-level, importance: 7]

Solution Walkthrough:

Before:

# In mfc wrapper script
ARGS=("$@")
SUBCMD="${ARGS[0]}"

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

if [[ "${SUBCMD}" != "run" ]]; then
  echo "mfc (Homebrew): only 'run' is supported..."
  exit 2
fi
# ... proceed to execute 'run' command

After:

# In mfc wrapper script
ARGS=("$@")
SUBCMD="${ARGS[0]}"

# No smart detection. 'run' must be explicit.

if [[ "${SUBCMD}" != "run" ]]; then
  echo "mfc (Homebrew): only 'run' is supported..."
  echo "Use 'mfc run <case.py>'"
  exit 2
fi
# ... proceed to execute 'run' command

Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ def install
MFC (Homebrew) #{version}

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

Examples:
mfc run case.py -j 1
mfc case.py -n 2
mfc run case.py -n 2 -t pre_process simulation

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

# Smart detection: if first arg looks like a case file, auto-prepend "run"
if [[ "${SUBCMD}" =~ .py$ ]] || [[ -f "${SUBCMD}" ]]; then
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern .py$ is missing the escape for the dot, which means it will match any character followed by "py" at the end, not specifically ".py" files. The pattern should be \.py$ to properly match Python files.

This could cause false positives where strings ending with any character + "py" (e.g., "xpy", "1py") would incorrectly trigger the auto-detection.

Suggested change
if [[ "${SUBCMD}" =~ .py$ ]] || [[ -f "${SUBCMD}" ]]; then
if [[ "${SUBCMD}" =~ \.py$ ]] || [[ -f "${SUBCMD}" ]]; then

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file existence check [[ -f "${SUBCMD}" ]] is too broad and will trigger auto-detection for any file, not just Python case files. This means commands like mfc myfile.txt would incorrectly be transformed to mfc run myfile.txt.

Consider making the check more specific, e.g., [[ "${SUBCMD}" =~ \.py$ ]] || [[ "${SUBCMD}" =~ \.py$ && -f "${SUBCMD}" ]], or simply rely only on the file extension check since Python case files should always end in .py.

Suggested change
if [[ "${SUBCMD}" =~ .py$ ]] || [[ -f "${SUBCMD}" ]]; then
if [[ "${SUBCMD}" =~ \.py$ ]]; then

Copilot uses AI. Check for mistakes.
ARGS=("run" "${ARGS[@]}")
SUBCMD="run"
fi
Comment on lines +120 to +124
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Modify the case file detection logic to handle command-line options placed before the filename. The current implementation only checks the first argument, which fails in this common scenario. [possible issue, importance: 7]

Suggested change
# Smart detection: if first arg looks like a case file, auto-prepend "run"
if [[ "${SUBCMD}" =~ .py$ ]] || [[ -f "${SUBCMD}" ]]; then
ARGS=("run" "${ARGS[@]}")
SUBCMD="run"
fi
# Smart detection: if 'run' is not specified, find a case file and prepend 'run'
if [[ "${SUBCMD}" != "run" ]]; then
for arg in "${ARGS[@]}"; do
# If we find an argument that is a file and not an option, prepend "run"
if [[ ! "${arg}" =~ ^- ]] && ([[ "${arg}" =~ \.py$ ]] || [[ -f "${arg}" ]]); then
ARGS=("run" "${ARGS[@]}")
SUBCMD="run"
break
fi
done
fi


if [[ "${SUBCMD}" != "run" ]]; then
echo "mfc (Homebrew): only 'run' is supported in the Homebrew package."
echo "Use 'mfc run <case.py>' or clone the repository for developer commands."
echo "Use 'mfc <case.py>' or clone the repository for developer commands."
exit 2
fi

Expand Down Expand Up @@ -218,17 +226,18 @@ def caveats
MFC has been installed successfully!

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

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

Examples are available in:
#{prefix}/examples

Example:
Quick start:
cp #{prefix}/examples/1D_sodshocktube/case.py .
mfc run case.py
mfc case.py -n 2

Note: Cantera 3.1.0 is pre-installed in the MFC virtual environment.
EOS
Expand Down
Loading