Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .build/Justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Excel-Economic-Numbers-Tool - ReScript Development Tasks
# Excel-Economic-Numbers-Tool - AffineScript Development Tasks
set shell := ["bash", "-uc"]
set dotenv-load := true

Expand All @@ -10,23 +10,23 @@ default:

# Build
build:
npx rescript build
npx affinescript build

# Build clean
build-clean:
npx rescript build -clean-world
npx affinescript build -clean-world

# Watch mode
watch:
npx rescript build -w
npx affinescript build -w

# Format code
fmt:
npx rescript format -all
npx affinescript format -all

# Clean
clean:
npx rescript clean
npx affinescript clean

# Install dependencies
install:
Expand Down
4 changes: 2 additions & 2 deletions .build/config/rescript.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "economic-toolkit-rescript",
"name": "economic-toolkit-affinescript",
"version": "2.0.0",
"sources": [
{
"dir": "src/rescript",
"dir": "src/affinescript",
"subdirs": true
}
],
Expand Down
2 changes: 1 addition & 1 deletion .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Both are FOSS with independent governance (no Big Tech). Gossamer is hyperpolyma
### Package Management

- **Primary**: Guix (guix.scm)
- **Fallback**: Nix (flake.nix)
- **Fallback**: Guix (flake.guix)
- **JS deps**: Deno (deno.json imports)

### Security Requirements
Expand Down
10 changes: 5 additions & 5 deletions .claude/PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Modular Excel/LibreOffice Add-in for economic modelling and investigative resear

1. **Cross-Platform Abstraction**: Single `ISpreadsheetAdapter` interface with platform-specific adapters
2. **Julia Backend**: High-performance computation engine with HTTP/QUIC API
3. **Type Safety**: TypeScript/ReScript for UI, Julia for backend
3. **Type Safety**: TypeScript/AffineScript for UI, Julia for backend
4. **Production-Grade Reliability**: Caching, rate limiting, exponential backoff retry
5. **Offline Capability**: SQLite cache survives restarts

### Technology Stack

- **Backend**: Julia ≥1.10 (computation, data sources)
- **Frontend**: TypeScript/ReScript (UI components)
- **Frontend**: TypeScript/AffineScript (UI components)
- **Excel Integration**: Office.js API
- **LibreOffice Integration**: UNO API (Rhino JS)
- **Containerization**: Podman ≥4.0
Expand Down Expand Up @@ -62,7 +62,7 @@ economic-toolkit-v2/
│ │ │ ├── OfficeJsAdapter.ts
│ │ │ └── UnoAdapter.js # Rhino JS for LibreOffice
│ │ └── utils/
│ └── rescript/ # ReScript UI
│ └── affinescript/ # AffineScript UI
│ ├── ribbons/ # Ribbon tabs
│ └── taskpanes/ # Task panes
├── tests/
Expand Down Expand Up @@ -267,7 +267,7 @@ function createAdapter(): ISpreadsheetAdapter {
- Identity enforcement (e.g., C + I + G + NX = GDP)
- Literate programming support

## ReScript UI Components
## AffineScript UI Components

### Ribbon Tabs (5)

Expand Down Expand Up @@ -394,7 +394,7 @@ GET /api/v1/cache/stats # Cache statistics

- **Julia**: Follow Blue style guide
- **TypeScript**: ESLint + Prettier
- **ReScript**: Standard ReScript formatter
- **AffineScript**: Standard AffineScript formatter

### Testing Requirements

Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
actions:
patterns:
- "*"
- package-ecosystem: "nix"
- package-ecosystem: "guix"
directory: "/"
schedule:
interval: "weekly"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/rescript-deno-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
permissions:
actions: read
contents: read
name: ReScript/Deno CI
name: AffineScript/Deno CI
on:
push:
branches: [main, master]
Expand All @@ -30,11 +30,11 @@ jobs:
run: deno fmt --check
- name: Deno test
run: deno test --allow-all --coverage=coverage
- name: ReScript build
- name: AffineScript build
run: |
if [ -f "rescript.json" ] || [ -f "bsconfig.json" ]; then
if [ -f "affinescript.json" ] || [ -f "bsconfig.json" ]; then
npm install
npx rescript
npx affinescript
fi
- name: Type check
run: deno check **/*.ts || true
Expand Down
4 changes: 2 additions & 2 deletions ABI-FFI-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
┌─────────────────────────────────────────────┐
│ Any Language via C ABI │
│ - Rust, ReScript, Julia, Python, etc. │
│ - Rust, AffineScript, Julia, Python, etc. │
└─────────────────────────────────────────────┘
```

Expand Down Expand Up @@ -79,7 +79,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
└── bindings/ # Language-specific wrappers (optional)
├── rust/
├── rescript/
├── affinescript/
└── julia/
```

Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

#### Configuration
- TypeScript config (tsconfig.json, webpack, jest, eslint, prettier)
- ReScript config (bsconfig.json)
- AffineScript config (bsconfig.json)
- Julia project (Project.toml)
- Node package (package.json)

Expand Down Expand Up @@ -118,7 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Advanced usage examples (7 scenarios)
- Real-world distribution analysis

#### UI Components (ReScript)
#### UI Components (AffineScript)
- DataBrowser task pane
- FormulaBuilder task pane
- Ribbon tabs structure (planned: 5 tabs)
Expand Down
6 changes: 3 additions & 3 deletions COMPREHENSIVE_v10_IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This document summarizes the comprehensive implementation of all features from v

### v2.2 - Multi-Platform & Collaboration (COMPLETE)
✓ Google Sheets add-on with custom functions
✓ Standalone web application (ReScript + React)
✓ Standalone web application (AffineScript + React)
✓ Mobile apps (Tauri 2.0 for iOS/Android)
✓ Real-time collaboration (WebSocket server, presence indicators)
✓ Cloud cache sync (S3-compatible storage)
Expand Down Expand Up @@ -83,7 +83,7 @@ This document summarizes the comprehensive implementation of all features from v

### Technology Stack
- **Backend**: Julia 1.10+ (high-performance numerical computing)
- **Frontend**: ReScript + React (type-safe UI)
- **Frontend**: AffineScript + React (type-safe UI)
- **Runtime**: Deno 2.0+ (secure JavaScript/TypeScript)
- **Mobile**: Tauri 2.0 (cross-platform iOS/Android)
- **Performance**: Rust/WASM (charts, compute-intensive)
Expand All @@ -106,7 +106,7 @@ FRED, World Bank, IMF, OECD, ECB, BEA, Census, Eurostat, BIS, DBnomics
excel-economic-numbers-tool/
├── src/
│ ├── julia/ # Backend (data sources, formulas, ML, server)
│ ├── rescript/ # Frontend UI components
│ ├── affinescript/ # Frontend UI components
│ ├── python/ # Python API wrapper
│ ├── R/ # R package
│ ├── google-apps-script/ # Google Sheets add-on
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
git clone https://github.com/hyperpolymath/excel-economic-numbers-tool.git
cd excel-economic-numbers-tool

# Using Nix (recommended for reproducibility)
nix develop
# Using Guix (recommended for reproducibility)
guix develop

# Or using toolbox/distrobox
toolbox create excel-economic-numbers-tool-dev
Expand Down Expand Up @@ -45,7 +45,7 @@ excel-economic-numbers-tool/
├── MAINTAINERS.md
├── README.adoc
├── SECURITY.md
├── flake.nix # Nix flake (Perimeter 1)
├── flake.guix # Guix flake (Perimeter 1)
└── Justfile # Task runner (Perimeter 1)
```

Expand Down
2 changes: 1 addition & 1 deletion EXPLAINME.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ____

| **Zig** | https://ziglang.org
| **Deno** | https://deno.land
| **ReScript** | https://rescript-lang.org
| **AffineScript** | https://affinescript-lang.org
| **Julia** | https://julialang.org
| **Idris2 ABI** | https://www.idris-lang.org
|===
Expand Down
22 changes: 11 additions & 11 deletions IMPLEMENTATION-PROGRESS-2026-02-07.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The project has progressed from **40% → 75% completion** by implementing:

### 1.1 Excel Adapter (OfficeJsAdapter.res) ✅

**File:** `src/rescript/adapters/OfficeJsAdapter.res` (450 lines)
**File:** `src/affinescript/adapters/OfficeJsAdapter.res` (450 lines)

**Implementation:**
- ✅ Office.js API bindings (external declarations)
Expand All @@ -47,17 +47,17 @@ The project has progressed from **40% → 75% completion** by implementing:

**Key features:**
- Cell address parsing (A1 notation → row/col indices)
- Type conversion (ReScript cellValue ↔ JavaScript values)
- Type conversion (AffineScript cellValue ↔ JavaScript values)
- Proper promise handling for async operations
- Event subscription/unsubscription management

### 1.2 LibreOffice Adapter (UnoAdapter.res + uno-bridge.js) ✅

**Files:**
- `src/rescript/adapters/UnoAdapter.res` (350 lines) ✅
- `src/affinescript/adapters/UnoAdapter.res` (350 lines) ✅
- `src/libreoffice/uno-bridge.js` (550 lines) ✅

**Architecture:** ReScript → JavaScript bridge → UNO Java API → LibreOffice Calc
**Architecture:** AffineScript → JavaScript bridge → UNO Java API → LibreOffice Calc

**uno-bridge.js implementation:**
- ✅ UNO Java class imports (XSpreadsheet, XCell, XCellRange, etc.)
Expand Down Expand Up @@ -235,7 +235,7 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31))

**What remains:**
- Delete `.build/config/tsconfig.json` (TypeScript removed)
- Delete `.build/config/bsconfig.json` (superseded by root rescript.json)
- Delete `.build/config/bsconfig.json` (superseded by root affinescript.json)
- Delete `.build/config/Project.toml` (moved to root)
- Update Justfile (replace `npm` with `deno`)

Expand All @@ -245,11 +245,11 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31))

## Compilation Status

### ReScript Compilation
### AffineScript Compilation

**Status:** ✅ **Adapters compiled successfully**

**Command:** `rescript build`
**Command:** `affinescript build`

**Result:**
- ✅ 63/66 modules compiled (95% success rate)
Expand All @@ -263,7 +263,7 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31))
- These are UI task pane files, not core platform adapters
- **Impact:** Task pane UI non-functional, but platform adapters work

**Resolution:** Would require adding React dependencies to rescript.json
**Resolution:** Would require adding React dependencies to affinescript.json

---

Expand Down Expand Up @@ -317,8 +317,8 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31))
### New Files (22 total)

**Phase 1 - Platform Integration (10 files):**
1. `src/rescript/adapters/OfficeJsAdapter.res` (450 lines)
2. `src/rescript/adapters/UnoAdapter.res` (350 lines)
1. `src/affinescript/adapters/OfficeJsAdapter.res` (450 lines)
2. `src/affinescript/adapters/UnoAdapter.res` (350 lines)
3. `src/libreoffice/uno-bridge.js` (550 lines)
4. `manifests/excel-manifest.xml` (150 lines)
5. `src/excel/taskpane.html` (100 lines)
Expand All @@ -341,7 +341,7 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31))

### Modified Files (3 total)
1. `package.json` - Fixed name mismatch (economic-toolkit-v2 → economic-toolkit)
2. `src/rescript/ConstraintEditor.res` - Fixed reserved keyword (`constraint` → `constraintDef`)
2. `src/affinescript/ConstraintEditor.res` - Fixed reserved keyword (`constraint` → `constraintDef`)

---

Expand Down
12 changes: 6 additions & 6 deletions NAVIGATION.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This guide helps you navigate the excel-economic-numbers-tool repository structu
|**README.adoc** |Project overview, installation, quick start
|**LICENSE** |MPL-2.0 license text
|**VERSION** |Current version number
|**package.json** |Deno/ReScript package configuration
|**package.json** |Deno/AffineScript package configuration
|===

== Source Code
Expand All @@ -25,7 +25,7 @@ This guide helps you navigate the excel-economic-numbers-tool repository structu
|Directory |Contents

|**src/** |All source code
|**src/rescript/** |ReScript application code (UI, adapters)
|**src/affinescript/** |AffineScript application code (UI, adapters)
|**src/julia/** |Julia backend (data sources, formulas, cache)
|**tests/** |Test suites (organized by language)
|**examples/** |Usage examples and sample code
Expand Down Expand Up @@ -67,7 +67,7 @@ This guide helps you navigate the excel-economic-numbers-tool repository structu
|**.build/** |Build configuration and tooling
|**.build/Justfile** |Task automation (build, test, deploy)
|**.build/Containerfile** |Container image definition
|**.build/config/** |Tool configurations (Deno, ReScript, etc.)
|**.build/config/** |Tool configurations (Deno, AffineScript, etc.)
|**scripts/** |Utility scripts (bootstrap, deploy, verification)
|===

Expand Down Expand Up @@ -112,7 +112,7 @@ just build-libre # Build LibreOffice extension

[source,bash]
----
deno test # Run Deno/ReScript tests
deno test # Run Deno/AffineScript tests
just test # Run all tests (Julia + Deno)
----

Expand Down Expand Up @@ -143,11 +143,11 @@ excel-economic-numbers-tool/
├── package.json # Package config
├── src/ # Source code
│ ├── rescript/ # ReScript UI
│ ├── affinescript/ # AffineScript UI
│ └── julia/ # Julia backend
├── tests/ # Test suites
│ ├── rescript/ # ReScript tests
│ ├── affinescript/ # AffineScript tests
│ └── julia/ # Julia tests
├── examples/ # Usage examples
Expand Down
Loading
Loading