Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version: 0.2.0 #12

Merged
merged 1 commit into from
Oct 9, 2023
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
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: qfmu_ci

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]" -U

- name: Lint with Ruff
run: |
ruff --output-format=github .

- name: Test with Pytest
run: |
pytest --cov --cov-report xml:codecov.xml

- name: Code coverage
uses: orgoro/coverage@v3.1
with:
coverageFile: codecov.xml
token: ${{ secrets.GITHUB_TOKEN }}




77 changes: 77 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: qfmu_ci

on:
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run'
required: false
type: boolean
default: true


concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
build:
if: ${{ github.ref == 'refs/heads/main' }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]" -U

- name: Lint with Ruff
run: |
ruff --output-format=github .

- name: Test with Pytest
run: |
pytest --cov --cov-report xml:codecov.xml

- name: Code coverage
uses: orgoro/coverage@v3.1
with:
coverageFile: codecov.xml
token: ${{ secrets.GITHUB_TOKEN }}

deploy:
needs: build
runs-on: ubuntu-latest
name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]" -U
- name: Deploy
run: |
python setup.py sdist
python setup.py bdist_wheel
twine upload dist/* --skip-existing --verbose -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}





4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.tmp/
.ruff_cache/
*.fmu

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,7 @@ dist: clean ## builds source and wheel package

install: clean ## install the package to the active Python's site-packages
python setup.py install

format:
isort .
black .
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
<p align="center">
<img src="./docs/images/title.png">
</p>

# qfmu
---

Generate standard form system **FMUs** through CLI. `q` is for quick.
**qfmu** is a python package to generate `continuous-time`, `LTI` system FMUs from command line.

Currently, `qfmu` supports:

- LTI system in state space (ABCD matrices) form.
TODO: Insert ttygif here

## Installation

Install `qfmu` through PyPI

```
pip install qfmu
```

*Noted* that a proper C compiler is required on your OS.
*Noted* that a C compiler is required

- `gcc` for Linux and Debian.
- `msvc` for windows (WIP).
- `msvc` for Windows
- `gcc` for Linux
- `clang` for MacOS

## HelloWorld
## Example

Generate an LTI system in state space form using the following command:

Expand Down Expand Up @@ -87,7 +88,7 @@ System form:
Install required packages

```
pip install -r requirements_dev.txt
pip install -e ".[dev]" -U
```

Dry run bumpversion
Expand Down
Binary file added docs/images/title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# qfmu

Generate an FMU
5 changes: 0 additions & 5 deletions qfmu/__init__.py

This file was deleted.

59 changes: 0 additions & 59 deletions qfmu/__main__.py

This file was deleted.

Loading