- Always use
--startup-file=nowhen invoking Julia (Revise.jl causes exit segfaults on Julia 1.12) - Use global Julia environment (plain
julia, NOTjulia --project) for running tests - Run tests:
julia --startup-file=no -e 'using ODEParameterEstimation; include("test/fast_core.jl")' - Run feature regressions:
julia --startup-file=no -e 'using ODEParameterEstimation; include("test/feature_regressions.jl")' - Run specific test:
julia --startup-file=no -e 'using ODEParameterEstimation; include("test/specific_test.jl")' - Run examples:
julia --startup-file=no -e 'using ODEParameterEstimation; include("src/examples/run_examples.jl")'
- Imports: Group related packages, with ModelingToolkit, OrdinaryDiffEq first
- Types: Use concrete types for function arguments, especially core types
- Functions: Document with docstrings using the triple quote format with Arguments/Returns sections
- Naming: Use snake_case for functions/variables, PascalCase for types
- Error handling: Use informative error messages with try/catch for numerical operations
- Parameters: Use OrderedDict for parameters and states to maintain consistent ordering
- ODE convention: Use t as the independent variable, D for differentiation
- Documentation: Document complex algorithms with explanatory inline comments
- Avoid
Anytype in struct fields and function signatures - Ensure functions return consistent types
- Use concrete parameter types instead of generic ones
- Add explicit return type annotations to complex functions
- Prefer using Union types over Any when multiple specific types are possible
- Use @code_warntype to check for type instabilities in critical functions
- Default ODE solver:
package_wide_default_ode_solver = AutoVern9(Rodas4P()) - Algorithm thresholds are defined in core_types.jl
- Error thresholds: Use descriptive names with consistent notation (e.g.,
XXX_THRESHOLD) - Function parameters: Use consistent names across similar functions:
abstol/reltolfor tolerances (not atol/rtol)interp_funcfor interpolation functions- Put
problemormodelas first parameter when applicable
- File organization: Keep related functionality in the same file or module