Skip to content

Commit

Permalink
Merge pull request #27 from ix-ax/dev
Browse files Browse the repository at this point in the history
v0.12
  • Loading branch information
PTKu authored Jan 26, 2023
2 parents 1685eff + fc76a2f commit 25e634f
Show file tree
Hide file tree
Showing 19 changed files with 163 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Microsoft Windows [Version 10.0.18363.1082]]
- ix version
- simatix-ax version [eg. 4024.10]
- simatix-ax version (attach apax.yml file)
- hardware/software target type and version (e.g. S71516, PLCSIM Advanced)
- other tools used (visual studio, vscode)

**Additional context**
Expand Down
3 changes: 3 additions & 0 deletions .github/issue-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mode: chatops
branchName: '${issue.number}-${issue.title}'
openDraftPR: true
17 changes: 17 additions & 0 deletions .github/workflows/create_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
issues:
types: [assigned]
issue_comment:
types: [created]
pull_request:
types: [closed]

jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

12 changes: 4 additions & 8 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ on:
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
pull_request:
branches: [ "dev" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
- '.github/**'
workflow_dispatch:

jobs:
Expand All @@ -33,5 +27,7 @@ jobs:
run: dotnet build cake/Build.csproj

- name: "Run build script"
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 1
env:
GH_TOKEN : ${{ secrets.GH_TOKEN }}
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 2 --do-publish true

4 changes: 3 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ jobs:
run: dotnet build cake/Build.csproj

- name: "Run build script"
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true
env:
GH_TOKEN : ${{ secrets.GH_TOKEN }}
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true --do-publish-release true

31 changes: 31 additions & 0 deletions .github/workflows/pr-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: pr-dev

on:
pull_request:
branches: [ "dev" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
workflow_dispatch:

jobs:
build:
strategy:
matrix:
configuration: [Release]

runs-on: [self-hosted, Windows, X64, L2] # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: "Build script"
run: dotnet build cake/Build.csproj

- name: "Run build script"
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 1

4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ jobs:
run: dotnet build cake/Build.csproj

- name: "Run build script"
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true
env:
GH_TOKEN : ${{ secrets.GH_TOKEN }}
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true --do-publish-release true

2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mode: ContinuousDeployment
next-version: 0.11.0
next-version: 0.12.1
branches:
main:
regex: ^master$|^main$
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# [WIP] RUNNING SOME POST PUBLISH TESTS

![](assets/pics/banner_wider.png)
# IX

Expand Down
3 changes: 3 additions & 0 deletions cake/BuildParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ public class BuildParameters

[Option('l', "test-level", Required = false, Default = 1, HelpText = "Test level 1 - 3")]
public int TestLevel { get; set; }

[Option('r', "do-publish-release", Required = false, Default = false, HelpText = "Publishes release on GH")]
public bool DoPublishRelease { get; set; }
}
22 changes: 20 additions & 2 deletions cake/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Cake.Common.Tools.DotNet.Clean;
using Cake.Core.Diagnostics;
using Cake.Core.IO;
using Cake.Core.Tooling;
using Cake.Frosting;
using Cake.Powershell;
using CliWrap;
Expand Down Expand Up @@ -234,7 +235,24 @@ public override void Run(BuildContext context)

foreach (var templateCsProjFile in templateCsProjFiles)
{
var packagesToUpdate = new List<string>() { "Ix.Abstractions", "Ix.Connector", "Ix.Connector.Sax.WebAPI" };
var packagesToUpdate = new List<string>()
{
"Ix.Abstractions",
"Ix.Connector",
"Ix.Connector.S71500.WebAPI",
"Ix.Presentation.Blazor.Controls",
"Ix.Presentation.Blazor"
};

foreach (var packageId in packagesToUpdate)
{
ix.nuget.update.Program.Update(new Options() { NewVersion = GitVersionInformation.SemVer, PackageId = packageId, FileToUpdate = templateCsProjFile });
}
}
var templateToolDotnetTools = Directory.EnumerateFiles(templatesDirectory, "dotnet-tools.json", SearchOption.AllDirectories);
foreach (var templateCsProjFile in templateToolDotnetTools)
{
var packagesToUpdate = new List<string>() { "ix.ixc" };
foreach (var packageId in packagesToUpdate)
{
ix.nuget.update.Program.Update(new Options() { NewVersion = GitVersionInformation.SemVer, PackageId = packageId, FileToUpdate = templateCsProjFile });
Expand Down Expand Up @@ -377,7 +395,7 @@ public sealed class PublishReleaseTask : FrostingTask<BuildContext>
{
public override void Run(BuildContext context)
{
if (!context.BuildParameters.DoPublish)
if (!context.BuildParameters.DoPublishRelease)
{
context.Log.Warning($"Skipping package release.");
return;
Expand Down
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
www.ixcite.tech
5 changes: 4 additions & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# INDUSTRIAL AUTOMATION EXPANSION

![](_media/readme/logo-color-sm.png)

# INDUSTRIAL AUTOMATION EXPANSION
## OPEN SOURCE FOR INDUSTRIAL AUTOMATION
## Bind SIMATIC AX based projects with .NET ecosystem


2 changes: 1 addition & 1 deletion docs/articles/blazor/RENDERABLECONTENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ testIxComponent: IxComponent;

### **Layouts**
Auto-generated UI can be customized by layouts.
More information about layout is in **[LAYOUTS](LAYOUTS.MD)** file.
More information about layout is in **[LAYOUTS](LAYOUTS.md)** file.
<div id='id-styling'/>

### **Styling**
Expand Down
5 changes: 5 additions & 0 deletions docs/articles/compiler/ATTRIBUTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@ CLASS PUBLIC MyClass
END_VAR
END_CLASS
~~~


### See also

#### [RenderIgnore](../blazor/RENDERABLECONTENT.md#renderignore-and-custom-labels)
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@
Context="@Entry.Plc.weather_readOnly" />


<h1>Render ignore(s)</h1>

<h2>This structures presentation type is Control attribute</h2>
<p>
Members annotated with [RenderIgnore("Control")] must not be displayed.
</p>

<RenderableContentControl Presentation="Control"
Context="@Entry.Plc.weather_wrapped" />


<h2>This structures presentation type is Display attribute</h2>
<p>
Members annotated with [RenderIgnore("Display")] must not be displayed.
</p>

<RenderableContentControl Presentation="Display"
Context="@Entry.Plc.weather_wrapped" />
@code {

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ public partial class weatherBase : Ix.Connector.ITwinObject
[ReadOnce()]
public OnlinerInt StartCounter { get; }

[RenderIgnore()]
public OnlinerString RenderIgnoreAllToghether { get; }

[RenderIgnore("Control")]
public OnlinerString RenderIgnoreWhenControl { get; }

[RenderIgnore("Display")]
public OnlinerString RenderIgnoreWhenDisplay { get; }

[RenderIgnore("Control", "ShadowControl")]
public OnlinerString RenderIgnoreWhenControlAndShadow { get; }

[RenderIgnore("Display", "ShadowDisplay")]
public OnlinerString RenderIgnoreWhenDisplayAndShadow { get; }

public weatherBase(Ix.Connector.ITwinObject parent, string readableTail, string symbolTail)
{
Symbol = Ix.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
Expand All @@ -37,6 +52,16 @@ public weatherBase(Ix.Connector.ITwinObject parent, string readableTail, string
StartCounter = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this, "this has [ReadOnce()] attribute will be readon only once...", "StartCounter");
StartCounter.AttributeName = "this has [ReadOnce()] attribute will be readon only once...";
StartCounter.MakeReadOnce();
RenderIgnoreAllToghether = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "[RenderIgnore()] must not be displayed!", "RenderIgnoreAllToghether");
RenderIgnoreAllToghether.AttributeName = "[RenderIgnore()] must not be displayed!";
RenderIgnoreWhenControl = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "[RenderIgnore(''Control'')]", "RenderIgnoreWhenControl");
RenderIgnoreWhenControl.AttributeName = "[RenderIgnore(''Control'')]";
RenderIgnoreWhenDisplay = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "[RenderIgnore(''Display'')]", "RenderIgnoreWhenDisplay");
RenderIgnoreWhenDisplay.AttributeName = "[RenderIgnore(''Display'')]";
RenderIgnoreWhenControlAndShadow = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "[RenderIgnore(''Control'', ''ShadowControl'')]", "RenderIgnoreWhenControlAndShadow");
RenderIgnoreWhenControlAndShadow.AttributeName = "[RenderIgnore(''Control'', ''ShadowControl'')]";
RenderIgnoreWhenDisplayAndShadow = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "[RenderIgnore(''Display'', ''ShadowDisplay'')]", "RenderIgnoreWhenDisplayAndShadow");
RenderIgnoreWhenDisplayAndShadow.AttributeName = "[RenderIgnore(''Display'', ''ShadowDisplay'')]";
parent.AddChild(this);
parent.AddKid(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@ public partial class weatherBase
public string Description { get; set; } = string.Empty;
public string LongDescription { get; set; } = string.Empty;
public Int16 StartCounter { get; set; }

public string RenderIgnoreAllToghether { get; set; } = string.Empty;
public string RenderIgnoreWhenControl { get; set; } = string.Empty;
public string RenderIgnoreWhenDisplay { get; set; } = string.Empty;
public string RenderIgnoreWhenControlAndShadow { get; set; } = string.Empty;
public string RenderIgnoreWhenDisplayAndShadow { get; set; } = string.Empty;
}
}
16 changes: 16 additions & 0 deletions src/sanbox/integration/ix-integration-plc/src/weatherBase.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,21 @@
{#ix-attr:[ReadOnce()]}
{#ix-set:AttributeName = "this has [ReadOnce()] attribute will be readon only once..."}
StartCounter : INT;

{#ix-attr:[RenderIgnore()]}
{#ix-set:AttributeName = "[RenderIgnore()] must not be displayed!"}
RenderIgnoreAllToghether : STRING;
{#ix-set:AttributeName = "[RenderIgnore(''Control'')]"}
{#ix-attr:[RenderIgnore("Control")]}
RenderIgnoreWhenControl : STRING;
{#ix-set:AttributeName = "[RenderIgnore(''Display'')]"}
{#ix-attr:[RenderIgnore("Display")]}
RenderIgnoreWhenDisplay : STRING;
{#ix-set:AttributeName = "[RenderIgnore(''Control'', ''ShadowControl'')]"}
{#ix-attr:[RenderIgnore("Control", "ShadowControl")]}
RenderIgnoreWhenControlAndShadow : STRING;
{#ix-set:AttributeName = "[RenderIgnore(''Display'', ''ShadowDisplay'')]"}
{#ix-attr:[RenderIgnore("Display", "ShadowDisplay")]}
RenderIgnoreWhenDisplayAndShadow : STRING;
END_VAR
END_CLASS

0 comments on commit 25e634f

Please sign in to comment.