Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/repodna.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: DEVSimPy - Repository DNA Analysis

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1"

permissions:
contents: read

jobs:
repodna:
name: Analyze DEVSimPy
runs-on: ubuntu-latest

steps:
- name: Checkout DEVSimPy
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Analyze repository with RepoDNA
id: repodna
uses: sanskarIN/RepoDNA@v1.4.5

Check failure on line 27 in .github/workflows/repodna.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=capocchi_DEVSimPy&issues=AaHqnjpoZs3qvAPmYvOV&open=AaHqnjpoZs3qvAPmYvOV&pullRequest=426
with:
path: .
profile: standard
fail-on: never
annotate: true
report: ${{ runner.temp }}/repodna-report

- name: Upload RepoDNA report
uses: actions/upload-artifact@v4
with:
name: DEVSimPy-RepoDNA-Analysis
path: |
${{ steps.repodna.outputs.report }}
${{ steps.repodna.outputs.analysis }}
retention-days: 30
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ $RECYCLE.BIN/
local.properties
*.pfx
*.publishsettings
.freebuff

#################
# OpenCode
Expand Down
2 changes: 1 addition & 1 deletion devsimpy/AI/functions_prompt/init_function.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ DEVSimPy API:
- Do not call initPhase from a transition method.
- Do not create ports in an atomic CodeBlock constructor. DEVSimPy creates IPorts/OPorts from the CodeBlock's diagram metadata after construction. Explicit port creation belongs only to standalone models whose interface is not supplied by a CodeBlock.
- Add the `Message` import only if this constructor itself needs it; output functions normally construct messages.
- The generated class name must be a valid Python identifier derived from model_name.
- The generated class name must be exactly `model_name` from the JSON specifications (a valid Python identifier), with no prefix or suffix. It names the code block that represents the model.
- Add imports only when required by the described behavior. Output code only, with tabs for indentation.
1 change: 1 addition & 0 deletions devsimpy/AI/json_gen_prompt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Return these exact top-level keys and shapes:

Rules:
- Infer the smallest useful set of states, ports, and properties from the request. Do not invent requirements. input_port/output_port are counts, not port names.
- `model_name` is the Python class name of the model: use the name given in the request exactly, as a valid identifier with no spaces, prefix or suffix.
- Every state has a clear name and a time-advance meaning. `initial_state` must exactly match one entry in `states`.
- Represent an indefinite/passive state time as the string "INFINITY". A symbolic delay should use a property name; numeric delays should remain JSON numbers.
- `model_properties` describes instance data needed by the behavior. `var_type` is a concise Python type name and `value` is a JSON-compatible default. Do not put functions in model_properties.
Expand Down
Loading
Loading