diff --git a/changelog.d/fix-path-troubleshooting.fixed.md b/changelog.d/fix-path-troubleshooting.fixed.md new file mode 100644 index 0000000..bd09ab4 --- /dev/null +++ b/changelog.d/fix-path-troubleshooting.fixed.md @@ -0,0 +1 @@ +Add macOS troubleshooting note for PATH issues when using policyengine-taxsim from Stata, SAS, or other programs. diff --git a/dashboard/public/config-data.json b/dashboard/public/config-data.json index bab72ba..41a8b76 100644 --- a/dashboard/public/config-data.json +++ b/dashboard/public/config-data.json @@ -280,5 +280,5 @@ } ] }, - "lastUpdated": "2026-03-03T23:51:17.900Z" + "lastUpdated": "2026-03-06T19:56:21.560Z" } \ No newline at end of file diff --git a/dashboard/src/components/DocumentationContent.jsx b/dashboard/src/components/DocumentationContent.jsx index 49b6162..77647f5 100644 --- a/dashboard/src/components/DocumentationContent.jsx +++ b/dashboard/src/components/DocumentationContent.jsx @@ -80,6 +80,7 @@ const DocumentationContent = () => { }; const [activeUsageLang, setActiveUsageLang] = useState('cli'); + const [installOs, setInstallOs] = useState('mac'); const usageExamples = { cli: { @@ -469,15 +470,64 @@ policyengine_versions()

Installation

-
+
+
+ {[ + { id: 'mac', label: 'macOS/Linux' }, + { id: 'win', label: 'Windows' }, + ].map(({ id, label }) => ( + + ))} +
{renderCodeBlock({ - id: 'install-pip', + id: `install-${installOs}`, label: 'Terminal', - code: `# Install uv package manager (if you don't have it)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Install policyengine-taxsim\nuv tool install policyengine-taxsim`, + code: installOs === 'mac' + ? `# Install uv package manager (if you don't have it)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Install policyengine-taxsim\nuv tool install policyengine-taxsim` + : `# Install uv package manager (if you don't have it)\npowershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"\n\n# Install policyengine-taxsim\nuv tool install policyengine-taxsim`, })} +

+ If the command is not found, open Terminal and run uv tool dir --bin, then replace policyengine-taxsim with the full path shown (e.g. /Users/you/.local/bin/policyengine-taxsim). +

+ {/* Upgrading & Version Pinning */} +
+

+ Upgrading +

+

+ To upgrade to the latest version: +

+ {renderCodeBlock({ + id: 'upgrade', + label: 'Terminal', + code: 'uv tool upgrade policyengine-taxsim', + })} +

+ Version pinning +

+

+ For reproducible results, pin to a specific version: +

+ {renderCodeBlock({ + id: 'version-pin', + label: 'Terminal', + code: '# Install a specific version of policyengine-taxsim\nuv tool install policyengine-taxsim==2.13.0\n\n# Pin the underlying tax model for reproducible results\nuv tool install policyengine-taxsim --with policyengine-us==1.555.0', + })} +
+ {/* Usage with language tabs */}

@@ -509,6 +559,11 @@ policyengine_versions() code: usageExamples[activeUsageLang].code, })}

+ {['stata', 'sas', 'julia'].includes(activeUsageLang) && ( +

+ If the command is not found, open Terminal and run uv tool dir --bin, then replace policyengine-taxsim with the full path shown (e.g. /Users/you/.local/bin/policyengine-taxsim). +

+ )} {/* Language-specific extras */} {activeUsageLang === 'python' && ( diff --git a/dashboard/src/components/LandingContent.jsx b/dashboard/src/components/LandingContent.jsx index 888b529..0d27bf3 100644 --- a/dashboard/src/components/LandingContent.jsx +++ b/dashboard/src/components/LandingContent.jsx @@ -140,8 +140,19 @@ const COMPARISON_EXAMPLES = { }, }; +const OS_TABS = [ + { id: 'mac', label: 'macOS/Linux' }, + { id: 'win', label: 'Windows' }, +]; + +const INSTALL_COMMANDS = { + mac: "# Install uv package manager (if you don't have it)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Install policyengine-taxsim\nuv tool install policyengine-taxsim", + win: "# Install uv package manager (if you don't have it)\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n\n# Install policyengine-taxsim\nuv tool install policyengine-taxsim", +}; + const LandingContent = () => { const [lang, setLang] = useState('cli'); + const [os, setOs] = useState('mac'); const example = COMPARISON_EXAMPLES[lang]; @@ -166,12 +177,25 @@ const LandingContent = () => {

Installation

-
+
+
+ {OS_TABS.map(({ id, label }) => ( + + ))} +
@@ -223,6 +247,11 @@ const LandingContent = () => { />
+ {['stata', 'sas', 'julia'].includes(lang) && ( +

+ If the command is not found, open Terminal and run uv tool dir --bin, then replace policyengine-taxsim with the full path shown (e.g. /Users/you/.local/bin/policyengine-taxsim). +

+ )}