Skip to content

Commit

Permalink
Release/0.0.2 (#82)
Browse files Browse the repository at this point in the history
* refactor: unify state and alg var in equations

No longer explicitly distinguish between algebraic variables and state variables. The symbolic equation interfaces are simplified.

* refactor: add JacBlock

* test: add JacBlock tests

* refactor: organize py printer src files

* refactor: simplify codes and add inline printer tests

* refactor: simplify module printer using JacBlock

Add extra tests of c71c1ae

* test: add python utility printer tests

* fix: sort `Eqn.SYMBOLS` in lexicographic order

Partially resolve #78

* test: add module printer tests

* test: add module generator tests

* test: add inline FDAE printer

* tests: deploy cookbook tests

* Git action: debug cookbook-practice.yml

* update pyproject.toml

* update publish-to-pypi.yml
  • Loading branch information
rzyu45 authored Jun 3, 2024
1 parent 0112132 commit f77864e
Show file tree
Hide file tree
Showing 52 changed files with 2,745 additions and 1,924 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cookbook-practice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run tests in cookbook

on: [push]

jobs:
tests_in_cookbook:

runs-on: windows-latest

steps:
- name: Checkout Test Repository
uses: actions/checkout@v3
with:
repository: 'rzyu45/Solverz-Cookbook'
ref: 'main'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies

- name: Install Main Repository as Dependency using Git URL
run: |
pip install --upgrade pip setuptools wheel
pip install git+https://github.com/${{github.repository}}.git@${{ github.sha }}
- name: Run Tests
run: |
pytest
11 changes: 6 additions & 5 deletions .github/workflows/doc-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ jobs:
with:
submodules: true
lfs: false
- name: Bulid Docs
- name: Deploy Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- run: |
- name: Build Docs
run: |
pip install -r requirements.txt
cd docs
pip install -r requirements.txt
Expand All @@ -38,9 +39,9 @@ jobs:
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "docs/build/html" # Built app content directory - optional
app_location: "docs/build/html" # App source code path
output_location: "" # Built app content directory - optional
skip_app_build: true
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Python 🐍 distribution 📦 to PyPI
name: Publish to Pypi

on: push

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
# This workflow will install Python dependencies (if not cached), run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package
name: Run tests

on: [push]

jobs:
build:
built_in_tests:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest ]
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 1 addition & 3 deletions Solverz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
from Solverz.num_api.custom_function import minmod_flag, minmod
from Solverz.variable.variables import Vars, TimeVars, as_Vars
from Solverz.solvers import *
from Solverz.code_printer.make_pyfunc import made_numerical
from Solverz.code_printer.py_printer import render_modules
from Solverz.code_printer.make_module import module_printer
from Solverz.code_printer import made_numerical, module_printer
from Solverz.utilities.io import save, load, save_result
from Solverz.utilities.profile import count_time
from Solverz.variable.ssymbol import Var, AliasVar
Expand Down
2 changes: 2 additions & 0 deletions Solverz/code_printer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from Solverz.code_printer.python.inline.inline_printer import made_numerical
from Solverz.code_printer.make_module import module_printer
2 changes: 1 addition & 1 deletion Solverz/code_printer/make_module.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List

from Solverz.code_printer.py_printer import render_modules as py_module_renderer
from Solverz.code_printer.python import py_module_renderer
from Solverz.equation.equations import AE, FDAE, DAE
from Solverz.variable.variables import Vars

Expand Down
5 changes: 0 additions & 5 deletions Solverz/code_printer/make_pyfunc.py

This file was deleted.

File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f77864e

Please sign in to comment.