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

Update text annotations to not use deprecated features #4181

Merged
merged 5 commits into from
Sep 5, 2023

Conversation

HansOlsson
Copy link
Contributor

Fixes #4180

Note that it both replaces textColor and removes deprecated attributes.

updateModelicaAnnotations("Modelica",renameTextColor=true)
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Clocked.ClockSignals.Clocks.Logical.PartialLogicalClock.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Clocked.ClockSignals.Interfaces.ClockInput.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Clocked.Examples.Systems.ControlledMixingUnit.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Clocked.Examples.Systems.Utilities.ComponentsThrottleControl.Engine.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Clocked.RealSignals.Periodic.FIRbyCoefficients.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Clocked.RealSignals.Periodic.MovingAverage.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.ComplexBlocks.ComplexMath.ComplexToReal.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Electrical.Analog.Examples.OpAmps.OpAmpCircuits.Buffer.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Electrical.Machines.Sensors.SinCosResolver.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Electrical.Polyphase.Examples.PolyphaseRectifier.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.InductionMachines.ComparisonPolyphase.IMC_DOL_CommonLeakage.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.InductionMachines.ComparisonPolyphase.IMC_DOL_Polyphase.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.InductionMachines.ComparisonPolyphase.IMS_Start_Polyphase.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.ComparisonPolyphase.SMEE_Generator_Polyphase.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.ComparisonPolyphase.SMPM_Inverter_Polyphase.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.ComparisonPolyphase.SMR_Inverter_Polyphase.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FluxTubes.Basic.ElectroMagneticConverter.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.FixedShapes.CuboidSections.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FluxTubes.Interfaces.AbsoluteSensor.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FluxTubes.Interfaces.NegativeMagneticPort.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FluxTubes.Interfaces.PositiveMagneticPort.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FluxTubes.Interfaces.RelativeSensor.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FluxTubes.Sensors.Transient.Permeability.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.InductionMachines.IMC_Conveyor.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.InductionMachines.IMC_Initialize.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.InductionMachines.IMC_Transformer.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.InductionMachines.IMC_YD.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.InductionMachines.IMS_Characteristics.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.SMPM_CurrentSource.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.SMPM_Mains.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.SMPM_OpenCircuit.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.SMR_CurrentSource.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Mechanics.MultiBody.Visualizers.Rectangle.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Mechanics.Translational.Components.Mass.
 
Converting name Text.lineColor to Text.textColor
 in Modelica.Mechanics.Translational.Examples.Friction.
 
Converting name Text.lineColor to Text.textColor
 in Modelica.Mechanics.Translational.Examples.SignConvention.
 
Converting name Text.{fillColor,pattern,fillPattern} to nothing
 in Modelica.Units.SI.

(There might be few unneeded formatting changes, might clear up.)

beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this pull request Aug 16, 2023
Previously, a Text.lineColor annotation was not detected, if there was a closing parenthesis (within a quoted Text.textString annotation), e.g.

```
Text(extent={{-100,80},{-80,60}}, textString="1)", lineColor={0,0,255})
```
@beutlich
Copy link
Member

Converting name Text.lineColor to Text.textColor
in Modelica.Mechanics.Translational.Examples.Friction.

Converting name Text.lineColor to Text.textColor
in Modelica.Mechanics.Translational.Examples.SignConvention.

Thanks for fixing. I adapted the CI check by #4183 to also detect such corner cases.

Copy link
Member

@beutlich beutlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@tobolar tobolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine to me

@beutlich
Copy link
Member

Please note, that I pushed new changes to finally fix #4180 as reported by @abuntrock.

@beutlich beutlich added this to the MSL4.1.0 milestone Aug 29, 2023
@HansOlsson
Copy link
Contributor Author

HansOlsson commented Aug 30, 2023

Please note, that I pushed new changes to finally fix #4180 as reported by @abuntrock.

I was wondering why the conversion didn't catch this, until I noticed that it wasn't named "lineColor", but "color" which has never been correct.

(And the next Dymola version will handle it.)

Co-authored-by: tobolar <tobolar@users.noreply.github.com>
@HansOlsson
Copy link
Contributor Author

I'm a bit unsure who can review it to make it clear for merging, due to "New changes require approval from someone other than the last pusher"? (I guess @tobolar being a co-author on the last one is the issue, but I'm not sure.)

@tobolar tobolar self-requested a review September 5, 2023 13:32
Copy link
Contributor

@tobolar tobolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine to me (again).

@tobolar
Copy link
Contributor

tobolar commented Sep 5, 2023

(I guess @tobolar being a co-author on the last one is the issue, but I'm not sure.)

@HansOlsson Seems you are right. I supposed it was due to @beutlich but "re-requesting" my own review resolved the lock. I guess you can merge this now.

@HansOlsson HansOlsson merged commit 8c4e345 into modelica:master Sep 5, 2023
2 checks passed
@HansOlsson HansOlsson deleted the FixTextColor branch September 5, 2023 13:37
@beutlich beutlich removed the request for review from AHaumer September 5, 2023 15:41
beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this pull request Sep 5, 2023
Previously, a Text.lineColor annotation was not detected, if there was a closing parenthesis (within a quoted Text.textString annotation), e.g.

```
Text(extent={{-100,80},{-80,60}}, textString="1)", lineColor={0,0,255})
```
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.

Remove deprecated Text.color attribute from graphical annotations
3 participants