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
4 changes: 2 additions & 2 deletions .github/workflows/build-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
attestations: write
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ inputs.ref }}
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: Packages
path: dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-version-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
tag_name: ${{ steps.bump-version.outputs.tag_name }}
steps:
- name: Checkout the repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -60,6 +60,8 @@ jobs:
echo "build_package=false" >> $GITHUB_OUTPUT
;;
esac
env:
GH_TOKEN: ${{ github.token }}

call-build-python:
needs: bump-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ inputs.ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
packages: write
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
name: Checkout the repository
with:
fetch-depth: 0
Expand All @@ -30,7 +30,7 @@ jobs:
target-version: ${{ inputs.ref }}

- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: Packages
path: dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
python-version: ["3.12", "3.13"]

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
Expand Down
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* [Using Vendor Extensions](tutorials/extensions.md)
* [Architecture Overview](architecture/index.md)
* [Core Components](architecture/components.md)
* [API Reference](reference/index.md)
* [API Reference](reference/)
* [Development Guide](development.md)
* [Explanation](explanation.md)
* [How-Tos](howtos/index.md)
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ See the [Installation Guide](installation.md) for more options.
- **[How-Tos](howtos/index.md)** - Solutions to specific problems

### Reference
- **[API Reference](reference/index.md)** - Complete API documentation
- **[API Reference](reference/api/)** - Complete API documentation
- **[Architecture](architecture/index.md)** - System design and internals

### Extending
Expand Down
1 change: 1 addition & 0 deletions docs/reference/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[API](api/)
3 changes: 0 additions & 3 deletions docs/reference/index.md

This file was deleted.

14 changes: 0 additions & 14 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,3 @@ extra_css:

watch:
- pybpmn_parser

nav:
- Home: index.md
- Installation: installation.md
- Quick Start: quickstart.md
- Tutorials: tutorials/index.md
- Examples Gallery: examples/index.md
- Plugin Guide: plugins/index.md
- Architecture Overview: architecture/index.md
- Core Components: architecture/components.md
- Reference: reference/index.md
- Development Guide: development.md
- Explanation: explanation.md
- How-Tos: howtos/index.md
1 change: 1 addition & 0 deletions pybpmn_parser/bpmn/activities/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class Activity(FlowNode): # Is Abstract
default=None,
metadata={
"type": "Attribute",
"is_reference": True,
},
)
"""The Sequence Flow that receives a token when `conditionExpression`s on other outgoing Sequence Flows are false.
Expand Down
4 changes: 4 additions & 0 deletions pybpmn_parser/bpmn/activities/loop_characteristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class MultiInstanceLoopCharacteristics(LoopCharacteristics):
"name": "loopDataInputRef",
"type": "Element",
"namespace": "http://www.omg.org/spec/BPMN/20100524/MODEL",
"is_reference": True,
},
)
loop_data_output_ref: Optional[str] = field(
Expand All @@ -57,6 +58,7 @@ class MultiInstanceLoopCharacteristics(LoopCharacteristics):
"name": "loopDataOutputRef",
"type": "Element",
"namespace": "http://www.omg.org/spec/BPMN/20100524/MODEL",
"is_reference": True,
},
)
input_data_item: Optional[DataInput] = field(
Expand Down Expand Up @@ -109,13 +111,15 @@ class MultiInstanceLoopCharacteristics(LoopCharacteristics):
metadata={
"name": "oneBehaviorEventRef",
"type": "Attribute",
"is_reference": True,
},
)
none_behavior_event_ref: Optional[str] = field(
default=None,
metadata={
"name": "noneBehaviorEventRef",
"type": "Attribute",
"is_reference": True,
},
)

Expand Down
2 changes: 2 additions & 0 deletions pybpmn_parser/bpmn/activities/receive_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ class ReceiveTask(Task):
metadata={
"name": "messageRef",
"type": "Attribute",
"is_reference": True,
},
)
operation_ref: Optional[str] = field(
default=None,
metadata={
"name": "operationRef",
"type": "Attribute",
"is_reference": True,
},
)

Expand Down
2 changes: 2 additions & 0 deletions pybpmn_parser/bpmn/activities/send_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ class SendTask(Task):
metadata={
"name": "messageRef",
"type": "Attribute",
"is_reference": True,
},
)
operation_ref: Optional[str] = field(
default=None,
metadata={
"name": "operationRef",
"type": "Attribute",
"is_reference": True,
},
)

Expand Down
1 change: 1 addition & 0 deletions pybpmn_parser/bpmn/common/resource_parameter_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ResourceParameterBinding(BaseElement):
"name": "parameterRef",
"type": "Attribute",
"required": True,
"is_reference": True,
}
)

Expand Down
15 changes: 5 additions & 10 deletions pybpmn_parser/element_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def descriptor_from_class(element_class: Any) -> ElementDescriptor:
return ElementDescriptor(type=element_class, name=q_name.local, q_name=q_name, properties=property_name_map)


def type_hint_to_property(name: str, type_hint: Any, field_metadata: dict[str, str]) -> ElementProperty:
def type_hint_to_property(name: str, type_hint: Any, field_metadata: dict[str, Any]) -> ElementProperty:
"""
Converts a type hint represented as a dictionary into an `ElementProperty` object.

Expand Down Expand Up @@ -131,6 +131,7 @@ def type_hint_to_property(name: str, type_hint: Any, field_metadata: dict[str, s
is_attr = field_metadata.get("type", "Element") == "Attribute"
is_optional = origin == Union and type(None) in args
is_many = origin is list or (origin == Union and list in args)
is_reference: bool = field_metadata.get("is_reference", False)
base_type = get_base_type(type_)
q_name = QName(uri=base_type.Meta.namespace, local=base_type.Meta.name) if hasattr(base_type, "Meta") else None

Expand All @@ -141,6 +142,7 @@ def type_hint_to_property(name: str, type_hint: Any, field_metadata: dict[str, s
is_attr=is_attr,
is_optional=is_optional,
is_many=is_many,
is_reference=is_reference,
)


Expand Down Expand Up @@ -235,13 +237,6 @@ def get_base_type(type_: type) -> Any:

# Handle list type
if origin is list:
if not args:
return list
return get_base_type(args[0])

return get_base_type(args[0]) if args else list
# Handle dict type
if origin is dict:
return dict

# Handle other generic types
return type_
return dict if origin is dict else type_
Loading
Loading