Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Sep 25, 2024
1 parent 884f3ef commit 9f2d206
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 73 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Change Log

## 0.9.0

- Added support for Heta standard v0.4.5.
- Fixed minor parser bugs.
- **SimbioExport**: Introduced the `ausAsNotes` option and added `aux` as UserData.
- **Component**: Added `xmlAnnotation` property for SBML Annotation.
- Fixed issues with `HetaCodeExport` related to the `aux` property.
- **API**: Made `Component` a subclass of `Top`.
- Enhanced error messages for JSON schema validation.
- **Builder API**: Now supports both backend and frontend.
- All file paths are now relative.
- Moved export statements to `platform.yml`.
- Replaced `platform.json` with `platform.yml`.
- **CLI**: Removed `--skip-export` and `--julia-only`, added the new `--export` option.

## 0.8.7

- check and warn context without Switchers
Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

## ideas

- allow to use const expressions in `TimeSwitcher.start` and `TimeSwitcher.end`
- support SBML's delay
- AnyUnit for zero numbers
- updating properties with `one::s1.assignments.start_ 5.5;`
Expand Down
145 changes: 74 additions & 71 deletions migrate-to-v0.9.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,93 @@
# Migrate from v0.8 to v0.9

Heta compiler of **version 0.9** follows the [Heta standard](https://hetalang.github.io/#/specifications/) of **version 0.5.0**.
# Migration from v0.8 to v0.9

To use the newer Heta compiler you should make some updates to the platform files. To see the other updates see [change log](./CHANGELOG).
The v0.9 release of Heta includes improvements in export flexibility, support for new formats, and better tooling for the declaration files.

See also [Migrate to v0.6](./migrate-to-v0.6), [Migrate to v0.7](./migrate-to-v0.7), [Migrate to v0.8](./migrate-to-v0.8).
The **v0.9** version of the Heta compiler adheres to the [Heta standard](https://hetalang.github.io/#/specifications/) **v0.5.0**.

## Changes in declaration (platform.json) file
To use the latest Heta compiler, you will need to update some platform files. For other updates, refer to the [changelog](./CHANGELOG).

The new version uses YAML format (instead of JSON) for declaration file. The new format is more flexible and allows to use comments and multiline strings.
You may also want to check the previous migration guides: [Migrate to v0.6](./migrate-to-v0.6), [Migrate to v0.7](./migrate-to-v0.7), and [Migrate to v0.8](./migrate-to-v0.8).

Users can use JSON format for declaration file without restrictions but default YAML files will be generated with `heta init`.
## Changes to the Declaration (platform.json) File

## Replacement of inline #export actions by export array in declaration
The new version uses the YAML format (instead of JSON) for the declaration file. YAML is more flexible, supporting comments and multiline strings.

The new version uses `export` array in declaration file to define the list of actions which should be exported.
You can still use JSON format for declaration files without restrictions, but YAML files will now be generated by default when using `heta init`.

Another option is to use `--export` property in CLI command. See details in [CLI documentation](./cli-references.md).
## Replacement of Inline `#export` Actions with an `export` Array in Declarations

The old inline export syntax will be supported in the current version (as depricated) but it will be removed in the future.
In this version, the `export` array is used in the declaration file to specify the list of actions to be exported.

## Update platforms to support new features
Alternatively, you can use the `--export` option in CLI commands. For more details, refer to the [CLI documentation](./cli-references.md).

1. **Check** that your platform can be build without errors in the current builder v0.8.x.
The old inline export syntax will be deprecated but supported in the current version. However, it will be removed in future versions.

*If you use Git you should commit the latest changes before updating formats.*
## Updating Platforms to Support New Features

1. Install the latest version of **Heta compiler**.
1. **Ensure** your platform builds without errors using the current v0.8.x builder.

```bash
npm install -g heta-compiler
heta -v
# must be v0.9.0 or newer
```
*If you're using Git, it is recommended to commit the latest changes before updating the formats.*

1. If you use declaration file **platform.json** update the property to `builderVersion: ^0.9.0` and change file name to **platform.yml** (optional).
2. Install the latest version of the **Heta compiler**:

```yml
# in platform.yml
{
"builderVersion": "^0.9.0",
"id": "my-platform",
"notes": "platform notes",
"version": "v0.1.0",
...
}
```
```bash
npm install -g heta-compiler
heta -v
# should return v0.9.0 or newer
```

1. Remove unnecessary properties from the declaration file if you used them before:
3. If you're using the **platform.json** declaration file, update the `builderVersion` property to `^0.9.0`, and optionally rename the file to **platform.yml**.

```yml
# in platform.yml
{
"builderVersion": "^0.9.0",
"id": "my-platform",
"notes": "platform notes",
"version": "v0.1.0",
...
}
```

4. Remove any unnecessary properties from the declaration file if you had used them previously:

- `options.skipExport`: use `export: []` instead
- `options.juliaOnly`: use `export: [{format: Julia}]` instead

1. If you used command line options to supress export with `heta build --no-export` then you should use now `heta build --export ''`.

If you used line options to build julia code only with `heta build --julia-only` then you should use now `heta build --export 'Julia'`.

1. Remove all inline `#export` actions from the .heta files and add them to the `export` array in the declaration file.

See details in [export formats](./export-formats.md)

**Before**
```hetas
// in index.heta
#export {format: DBSolve, filepath: model, powTransform: function};
#export {format: SBML, version: L3V2};
```

**After**
```yaml
# in platform.yml
...
export: [
{format: DBSolve, filepath: model, powTransform: function},
{format: SBML, version: L3V2}
]
```

**Or After**
```json
# in platform.json
...
"export": [
{"format": "DBSolve", "filepath": "model", "powTransform": "function"},
{"format": "SBML", "version": "L3V2"}
]
```

1. Check building with `heta build` and make a commit if you use git.
- `options.skipExport`: replace with `export: []`
- `options.juliaOnly`: replace with `export: [{format: Julia}]`

5. If you were using command line options to suppress export with `heta build --no-export`, now use `heta build --export ''`.

If you previously used `heta build --julia-only` to build only Julia code, now use `heta build --export 'Julia'`.

6. Remove all inline `#export` actions from your `.heta` files and move them to the `export` array in the declaration file.

Refer to [export formats](./export-formats.md) for more details.

**Before:**
```heta
// in index.heta
#export {format: DBSolve, filepath: model, powTransform: function};
#export {format: SBML, version: L3V2};
```

**After (YAML format):**
```yaml
# in platform.yml
...
export: [
{format: DBSolve, filepath: model, powTransform: function},
{format: SBML, version: L3V2}
]
```

**Or After (JSON format):**
```json
# in platform.json
...
"export": [
{"format": "DBSolve", "filepath": "model", "powTransform": "function"},
{"format": "SBML", "version": "L3V2"}
]
```

7. Test the build with `heta build`, and if you're using Git, make a commit.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "heta-compiler",
"version": "0.8.7",
"version": "0.9.0",
"description": "Programming platform for Quantitative Systems Pharmacology modeling in NodeJS",
"main": "src/index.js",
"scripts": {
Expand Down

0 comments on commit 9f2d206

Please sign in to comment.