• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SDXorg / pysd / 36557836620
99%

Build:
DEFAULT BRANCH: master
Ran 29 Sep 2026 10:50AM UTC
Jobs 1
Files 50
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Sep 2026 10:48AM UTC coverage: 98.871% (+0.1%) from 98.751%
36557836620

push

github

web-flow
Add standalone Julia builder (ODE + MTK backends) (#487)

* Add standalone Julia/ModelingToolkit builder

Adds a new `pysd.builders.julia` package that translates a PySD
AbstractModel into a self-contained `.jl` file using ModelingToolkit.jl.
The generated file has no runtime dependency on Python or PySD.

Key features:
- Stocks → `D(x) ~ flow` ODE equations
- Auxiliaries → algebraic equations (`x ~ expr`)
- Constants → `@parameters`
- Named lookup tables → `DataInterpolations.LinearInterpolation` constants
- Inline lookups → registered and emitted as named interpolants
- SMOOTH(N) / DELAY(N) → expanded into auxiliary ODE levels
- Common Vensim built-ins mapped to Julia equivalents
- Helper functions (_pulse, _ramp, _step, _xidz, _zidz) emitted inline
- Modular output: when the Vensim model uses views and split_views=True,
  each view becomes a separate .jl module file with its own equation
  vector; the main file includes them and concatenates with `[v...;]`

New public entry point: `pysd.translate_to_julia(model_file, split_views=False)`

110 unit tests cover namespace management, AST visitor, element
processing (stocks, auxiliaries, parameters, lookups, smooth/delay
expansions), single-file and modular builder output, and the
translate_to_julia() entry point integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add integration tests and fix Vensim parser function name forms

Bug fixes
---------
* julia_expressions_builder: add underscore-form keys for built-in
  functions that the Vensim parser stores with underscores instead of
  spaces (if_then_else, pulse_train).  Previously these emitted
  'Unknown function' warnings; they now resolve correctly.
* julia_model_builder: replace Julia docstring header ("""...""") with
  # comments.  A triple-quoted string immediately before `using` is
  parsed by Julia as "document the using statement", causing a
  LoadError at runtime.

Integration tests (tests/pytest_builders/pytest_julia_in... (continued)

3076 of 3105 new or added lines in 6 files covered. (99.07%)

8055 of 8147 relevant lines covered (98.87%)

0.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
26
98.96
pysd/builders/julia/julia_model_builder.py
3
99.45
pysd/builders/julia/julia_expressions_builder.py
Jobs
ID Job ID Ran Files Coverage
1 36557836620.1 29 Sep 2026 10:50AM UTC 50
98.87
GitHub Action Run
Source Files on build 36557836620
  • Tree
  • List 50
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36557836620
  • 58041b71 on github
  • Prev Build on master (#20910017872)
  • Next Build on master (#36557870973)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc