Skip to content

Comments

Move annotations to the correct position in a class#18

Merged
AtiyahElsheikh merged 1 commit intomasterfrom
move-annotations
Apr 6, 2021
Merged

Move annotations to the correct position in a class#18
AtiyahElsheikh merged 1 commit intomasterfrom
move-annotations

Conversation

@sjoelund
Copy link
Member

The Modelica grammar does not allow annotations except at the end of a class.

This prepares the package for using the conversion script and is related to #17.

@sjoelund sjoelund requested a review from AtiyahElsheikh March 31, 2021 09:02
@sjoelund
Copy link
Member Author

I could possibly try to improve OMC to make this diff a little smaller by not adding whitespace between some of the modifiers. I don't think that's intended. After this I could add the conversion script, which would make that diff much easier to see what actually changes for MSL 4.0.0

@sjoelund
Copy link
Member Author

Ah, those are due to the merging failing and defaulting to put poorly formatted code in there...

@sjoelund sjoelund marked this pull request as draft March 31, 2021 09:49
@AtiyahElsheikh AtiyahElsheikh marked this pull request as ready for review March 31, 2021 12:16
@AtiyahElsheikh
Copy link
Collaborator

Difficult to see the differences due to formatting

The Modelica grammar does not allow annotations except at the end of a class.
@sjoelund
Copy link
Member Author

This is now a better diff with annotations moved manually. It should make the actual conversion script possible to see what the changes are. Moving the annotations automatically seemed to be quite difficult for the diff algorithm. It's not been allowed since Modelica 2.x as far as I know (but OpenModelica always supported it for backwards compatibility)

@sjoelund
Copy link
Member Author

Note that this is still not that easy to see what the changes are because there are similar lines in the middle of what was moved. But it's simply cut-and-paste of annotations to ends of classes...

@sjoelund sjoelund mentioned this pull request Mar 31, 2021
@AtiyahElsheikh
Copy link
Collaborator

I assume that there is no need to merge this branch and it is enough to merge Pull Request # 19

@sjoelund
Copy link
Member Author

sjoelund commented Apr 6, 2021

Well, this should probably also be merged since BioChem is following the Modelica language 2.x grammar instead of the 3.x grammar. It would also make working with OMEdit produce nicer diffs in the future since it automatically moves annotations to the end of files when you make changes to a file.

@sjoelund
Copy link
Member Author

sjoelund commented Apr 6, 2021

So I think this should be merged first and part of the next release.

@AtiyahElsheikh AtiyahElsheikh merged commit 8f4e786 into master Apr 6, 2021
@sjoelund sjoelund deleted the move-annotations branch April 6, 2021 07:13
AtiyahElsheikh added a commit that referenced this pull request Apr 6, 2021
* MSL version 3.2.3

* separate Interfaces/Substances/package.mo into separate components

* separate the components within the package Interfaces.Compartments

* Decompose the package BioChem.Interfaces.Nodes into separate components

* Separate all components within Biochem/Interfaces/Reactions/package.mo into separate *.mo components

* Decompose package BioChem/Interfaces/Reactions/Basics/package.mo into separate components

* Separate BioChem/Interfaces/Reactions/Modifiers/package.mo into separate components

* remove extra spaces from several modified package.mo

* keep model declaration using partial or without partial identical to the original version

* package.order files to be included in the repository

* decompose BioChem/Compartments/package.mo into separate components

* decompose BioChem/Substances/package.mo into separate components

* Separate the Icons package within BioChem/package.mo into separate directory

* Separate Biochem.Math package into a separate directory

* Separate top models within the Biochem.Examples package

* Separate all subpackages within Biochem.Examples into separate *.mo files. Each subpackage corresponds to a standalone example

* Separate Biochem.Reactions.MichaelisMenten into separate components

* separate Biochem.Reactions.MassAction.Reversible into separate components

* decompose package Reactions.MassAction.Irreversible into separate components

* Decompose Reactions.Inhibition into separate components

* decompoase Reactions.FastEquilibrium into separate components

* Decompose package Reactions into separate components

* ignore backup files

* annotations for version 1.0.2

* Revert "ignore backup files"

This reverts commit 898a667.

* remove backup files

* announcing version 1.0.2

* 1.0.2: major components in separate *.mo files / MSL 3.2.3 (#13)

* Issue07 separate component (#11)

* MSL version 3.2.3

* separate Interfaces/Substances/package.mo into separate components

* separate the components within the package Interfaces.Compartments

* Decompose the package BioChem.Interfaces.Nodes into separate components

* Separate all components within Biochem/Interfaces/Reactions/package.mo into separate *.mo components

* Decompose package BioChem/Interfaces/Reactions/Basics/package.mo into separate components

* Separate BioChem/Interfaces/Reactions/Modifiers/package.mo into separate components

* remove extra spaces from several modified package.mo

* keep model declaration using partial or without partial identical to the original version

* package.order files to be included in the repository

* decompose BioChem/Compartments/package.mo into separate components

* decompose BioChem/Substances/package.mo into separate components

* Separate the Icons package within BioChem/package.mo into separate directory

* Separate Biochem.Math package into a separate directory

* Separate top models within the Biochem.Examples package

* Separate all subpackages within Biochem.Examples into separate *.mo files. Each subpackage corresponds to a standalone example

* Separate Biochem.Reactions.MichaelisMenten into separate components

* separate Biochem.Reactions.MassAction.Reversible into separate components

* decompose package Reactions.MassAction.Irreversible into separate components

* Decompose Reactions.Inhibition into separate components

* decompoase Reactions.FastEquilibrium into separate components

* Decompose package Reactions into separate components

* Develop 1.0.2 (#12)

* MSL version 3.2.3

* separate Interfaces/Substances/package.mo into separate components

* separate the components within the package Interfaces.Compartments

* Decompose the package BioChem.Interfaces.Nodes into separate components

* Separate all components within Biochem/Interfaces/Reactions/package.mo into separate *.mo components

* Decompose package BioChem/Interfaces/Reactions/Basics/package.mo into separate components

* Separate BioChem/Interfaces/Reactions/Modifiers/package.mo into separate components

* remove extra spaces from several modified package.mo

* keep model declaration using partial or without partial identical to the original version

* package.order files to be included in the repository

* decompose BioChem/Compartments/package.mo into separate components

* decompose BioChem/Substances/package.mo into separate components

* Separate the Icons package within BioChem/package.mo into separate directory

* Separate Biochem.Math package into a separate directory

* Separate top models within the Biochem.Examples package

* Separate all subpackages within Biochem.Examples into separate *.mo files. Each subpackage corresponds to a standalone example

* Separate Biochem.Reactions.MichaelisMenten into separate components

* separate Biochem.Reactions.MassAction.Reversible into separate components

* decompose package Reactions.MassAction.Irreversible into separate components

* Decompose Reactions.Inhibition into separate components

* decompoase Reactions.FastEquilibrium into separate components

* Decompose package Reactions into separate components

* ignore backup files

* annotations for version 1.0.2

* Revert "ignore backup files"

This reverts commit 898a667.

* remove backup files

* announcing version 1.0.2

* missing partial declaration

* missing "partial" declaration

* "partial" missing

* Update ReadMe (MSL library version)

MSL 3.2.3 for version 1.0.2

* fix merging error. partial keyword retained

* reorganizing units and substances package icons into Icons directory

* MSL 4.0.0 instead of 3.2.3

* Icons package extends the standard Icon package of MSL 4.0.0

* notes on the difference between Biochem.Icons and Modelica.Icons.* in the documentation

* revision information

* making use of Modelica.Icons.InterfacesPackage

* Making use of Modelica.Icons.* when needed, however preferring Biochem Icons when available

* Back to MSL 3.2.3

Usage of MSL 4.0.0 after applying the conversion script

* Move annotations to the correct position in a class (#18)

The Modelica grammar does not allow annotations except at the end of a class.

* Convert to MSL 4.0.0 (#19)

* Convert to MSL 4.0.0

* Update version number to 1.0.3

* resolve conflict due to BioChem 1.0.3

* resolve conflict due to BioChem V 1.0.3

Co-authored-by: Martin Sjölund <martin@sjoelund.se>
AtiyahElsheikh added a commit that referenced this pull request Apr 17, 2021
* fix merging error. partial keyword retained

* reorganizing units and substances package icons into Icons directory

* MSL 4.0.0 instead of 3.2.3

* Icons package extends the standard Icon package of MSL 4.0.0

* notes on the difference between Biochem.Icons and Modelica.Icons.* in the documentation

* revision information

* making use of Modelica.Icons.InterfacesPackage

* Making use of Modelica.Icons.* when needed, however preferring Biochem Icons when available

* Back to MSL 3.2.3

Usage of MSL 4.0.0 after applying the conversion script

* Move annotations to the correct position in a class (#18)

The Modelica grammar does not allow annotations except at the end of a class.

* Convert to MSL 4.0.0 (#19)

* Convert to MSL 4.0.0

* Update version number to 1.0.3

* resolve conflict due to BioChem 1.0.3

* resolve conflict due to BioChem V 1.0.3

* Let UsersGuide package be the first one

* Base Icon for almost many components

* Icons for physical units

* removing unused older files

* Backward incompatible notes added

Co-authored-by: Martin Sjölund <martin@sjoelund.se>
AtiyahElsheikh added a commit that referenced this pull request Apr 29, 2021
* fix merging error. partial keyword retained

* reorganizing units and substances package icons into Icons directory

* MSL 4.0.0 instead of 3.2.3

* Icons package extends the standard Icon package of MSL 4.0.0

* notes on the difference between Biochem.Icons and Modelica.Icons.* in the documentation

* revision information

* making use of Modelica.Icons.InterfacesPackage

* Making use of Modelica.Icons.* when needed, however preferring Biochem Icons when available

* Back to MSL 3.2.3

Usage of MSL 4.0.0 after applying the conversion script

* Move annotations to the correct position in a class (#18)

The Modelica grammar does not allow annotations except at the end of a class.

* Convert to MSL 4.0.0 (#19)

* Convert to MSL 4.0.0

* Update version number to 1.0.3

* resolve conflict due to BioChem 1.0.3

* resolve conflict due to BioChem V 1.0.3

* Icons for package

* missing

* remove unnecessary annotations

* extra file not needed

* Icons within the Interfaces.Substances package

* order physical units alphabetically

* correct alphabetical order

* Alphabetical order

* employ Modelica.Icons.IconsPackage

* Variants of BioChem.Icons.Library

* move package annotations to BioChem.Icons.Substances instead of additional subpackage

* no need for extra package PackageIcon

* Move compartments annotations to a new Icons.Compartments package

* documentation

* Move Interfaces.Substances annotations to BioChem.Icons

* moving BioChem.Interfaces.Nodes.* annotation to the BioChem.Icons.Interfaces package

* complete package names after extend statements

* improve documentation

* Due to the implementation of OMEdit, interchange the two extend statements so that the icon remain in green as in previous release

* move annotations from BioChem.Interfaces.Compartments tp BioChem.Icons.Interfaces.Compartments

* mpve unit package annotations to BioChem.Icons.Units

* move graphical annotations of BioChem.Interfaces to BioChem.Icons.Interfaces

* remove unnecessary extra models

* complete package names

* Move graphical annotations of reactions to BioChem.Icons.Interfaces.Reactions package

* fix

* clean

* complete package name and remove unnecessary annotations

* clean

* icons to be classes instead of models. delete unnecessary icons.

Co-authored-by: Martin Sjölund <martin@sjoelund.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants