Skip to content

Commit

Permalink
Prep version 0.5.1 (#83)
Browse files Browse the repository at this point in the history
* add get method for a component

* Update README.rst

* add extends argument manipulation

* do not save temp file

* build(deps): bump pygments from 2.12.0 to 2.15.0

Bumps [pygments](https://github.com/pygments/pygments) from 2.12.0 to 2.15.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](pygments/pygments@2.12.0...2.15.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update test_model.py

* add method for getting and setting parameters

* cleanup

* add dictionary

* fix end of dict fileg

* Bump version and update test dependencies (#62)

* bump version and update test depends

* prepare the last of the release items

* update _source on save_as (#64)

* update deprecated call to pkg_resources (#65)

* update deprecated call to pkg_resources

* argh, pre-commit

* import from `typing` instead of `typing.io`

* Add poetry and remove tox (#67)

* remove tox and add poetry

* run pre-commit

* add benchmark package

* add building of doc in test

* update dependendencies

* precommit

* Move Modelica methods over from GMT (#68)

* remove tox and add poetry

* run pre-commit

* add benchmark package

* add building of doc in test

* update dependendencies

* precommit

* move modelica methods from gmt

---------

Co-authored-by: Nathan Moore <[email protected]>

* Update antlr4 and use a non-deprecated docker base image (#66)

* update antlr4 to 4.13.0

* bump to antlrv4.13.1

* `poetry update` to bump dependency versions

* remove redundant CI run

* use os & python version matrix in github ci

* eek, found an obvious miss of another antlr version mention

* another `poetry update` to pick up the new antlr runtime version

* use new base image in dockerfile

* rebuild docker container

* remove Windows from CI, it's too soon for that

* update changelog (#70)

* Support py312 (#73)

* add support for python 3.12

* update dependencies

* update pre-commit hooks with `pre-commit autoupdate`

* Add method to scale loads in an MOS file (#74)

* scale loads in mos file

* cleanup doc

* remove print

* more documentation

* bump version of antrl to 4.13.1 (#75)

* add .mpignore to skip loading files in ModelicaProject (#77)

* Upgrade to MBLv10 (#72)

* use mblv10 when templating package.mo

* add parameter for mbl_version in PackageParser

* template mbl_version in top-level package.mot

* test to confirm mbl_version gets templatized correctly in PackageParser

* include python 3.12 in ci, which was accidentally forgotten

* check for mbl_version when loading templates

* Update copyright dates (#80)

* update license dates

* update copyright holder

* update language in license

* Prepare for v0.5.0 release (#79)

* bump to v0.5.0, update changelog

* Update CHANGELOG.rst

---------

Co-authored-by: Nicholas Long <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>

* update dependencies

* make if statement more constrained (#81)

* Create config file to automatically publish to pypi when a Github release is made (#82)

* automatic pypi release workflow config. needs pypi & github settings to work

* bump versions of actions used in the release workflow

* argh pre-commit

* changelog for 0.5.1

* bump to version 0.5.1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people committed Jan 5, 2024
1 parent 3a432d1 commit 393166c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: PyPIRelease
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

release:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi_release
url: https://pypi.org/p/modelica-builder
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Changelog
=========

Version 0.5.1
=============

## What's Changed
* Ensure the correct template is loaded when parsing the package by @vtnate in https://github.com/urbanopt/modelica-builder/pull/81
* Create config file to automatically publish to pypi when a Github release is made by @vtnate in https://github.com/urbanopt/modelica-builder/pull/82

**Full Changelog**: https://github.com/urbanopt/modelica-builder/compare/v0.5.0...v0.5.1

Version 0.5.0
=============

Expand Down
2 changes: 1 addition & 1 deletion modelica_builder/package_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def new_from_template(cls,
PackageParser: object of the package parser
"""
klass = PackageParser(path)
if not mbl_version:
if within and not mbl_version:
template = klass.template_env.get_template("package.mot")
else:
template = klass.template_env.get_template("package_base.mot")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "modelica-builder"
version = "0.5.0"
version = "0.5.1"
description = "Modelica builder enables programmatic parsing and modification of Modelica files."
authors = ["Nicholas Long <[email protected]>", "Nathan Moore <[email protected]>"]
license = "BSD-3-Clause"
Expand Down

0 comments on commit 393166c

Please sign in to comment.