-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
47,841 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
|
||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, caste, color, religion, or sexual | ||
identity and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the overall | ||
community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or advances of | ||
any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email address, | ||
without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official email address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at | ||
[email protected] or [email protected]. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.1, available at | ||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## How to contribute to PlantUML Interactive Editor | ||
#### **Did you find a bug?** | ||
|
||
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/Ericsson/PlantUML-Interactive-Editor/issues). | ||
|
||
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/Ericsson/PlantUML-Interactive-Editor/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. | ||
|
||
#### **Did you write a patch that fixes a bug?** | ||
|
||
* Open a new GitHub pull request with the patch. | ||
|
||
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. | ||
|
||
#### **Do you intend to add a new feature or change an existing one?** | ||
|
||
* Suggest your change by opening an [issue](https://github.com/Ericsson/PlantUML-Interactive-Editor/issues/new) on GitHub and tagging it with the label **"enhancement"**. Clearly describe your idea and its benefits to gather feedback from the community. | ||
|
||
* **Do not submit a pull request** until you have received positive feedback and community approval through the issue. | ||
|
||
#### **Do you have questions about the source code?** | ||
|
||
* Ask any question by opening an [issue](https://github.com/Ericsson/PlantUML-Interactive-Editor/issues/new) on GitHub and tagging it with the label **"question"**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Deploying a new version to https://pdupc-pcsmplantuml.sero.wh.rnd.internal.ericsson.se | ||
|
||
1. Update README.md and FEATURES.md | ||
2. Update `__version__` in `src/plantuml_gui/__about__.py` | ||
3. Commit, push to Gerrit, review and submit | ||
4. `su -l efuncpcsm` | ||
5. Paste password and press Enter | ||
6. `cd /proj/pdupc_webdocs/sites/pdupc-pcsmplantuml/plantuml_gui` | ||
7. `git pull --rebase` | ||
8 `../.venv/bin/pip install -e .` | ||
9. `touch ../wsgi.py` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# PlantUML Activity Diagrams | ||
|
||
PlantUML Activity Diagram documentation: [Activity Diagram (New Syntax) on plantuml.com](https://plantuml.com/activity-diagram-beta) | ||
|
||
|
||
# Activity diagram features | ||
|
||
## Supported Features | ||
### General Features | ||
- Automatic Indentation | ||
- Syntax Highlighting | ||
- Copy / Paste buttons to replace from or copy to clipboard | ||
- Undo / Redo using buttons or CTRL + X / CTRL + Y | ||
- Syntax and server error popups | ||
|
||
|
||
|
||
### Creating and editing | ||
|
||
- Activities | ||
- Colored | ||
- Embedded Link | ||
- If statements | ||
- Embedded Link | ||
- While statements | ||
- Repeat While Statements | ||
- Fork statements | ||
- Start/Stop/End | ||
- Connectors | ||
- Notes | ||
- Titles | ||
- Detach elements | ||
- Break elements | ||
- Switch Statements | ||
|
||
## Partially Supported Features | ||
|
||
- Groups & Partitions | ||
- Can be deleted and edited, but cannot be created or moved interactively | ||
- Break is currently only supported for Activities, but could easily be added for more types. | ||
- Arrow labels and switch cases are fully supported as long as they are not identical. | ||
- Split Processing actions are editable and removable but cannot interactively created or deleted. | ||
|
||
## Unsupported Features | ||
|
||
Unsupported in this context means activity diagram features that cannot be interacted with in the diagram, | ||
but adding them to the PlantUML code should still work. | ||
|
||
- Goto and Label Processing | ||
- Swimlanes | ||
- SDL (Specification and Description Language) | ||
- Lines without arrows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,78 @@ | ||
# PlantUML-Interactive-Editor | ||
A graphical editor for PlantUML diagrams | ||
# plantuml-interactive-editor | ||
|
||
Welcome to PlantUML Interactive Editor! This application is designed to provide an intuitive and interactive environment for editing PlantUML code and generating diagrams in real-time. Whether you're creating a huge activity diagram or a single while loop, our tool streamlines the process, allowing you to focus on design rather than syntax. | ||
|
||
With PlantUML Interactive Editor, you can: | ||
|
||
- Edit PlantUML activity diagrams by directly interacting with the diagram | ||
- Also change the diagram by editing the PlantUML code, just like other PlantUML editors, allowing you to choose code or interactive editing depending on what is easier in the moment | ||
- Instantly preview diagrams as you type | ||
- Easily share the created diagram | ||
|
||
## Usage | ||
|
||
- Right-click on elements to open context menu | ||
- Double-click on elements to edit the text | ||
- Submit edited text with the button or using CTRL + ENTER | ||
- Left-click and drag in the diagram to pan | ||
- Use mouse wheel or pinch on touch pad to zoom | ||
- Delete the text of a title, note or group/partition to delete the element | ||
- To share a diagram, just copy the URL in the address bar | ||
- Hover over elements to see the corresponding line highlighted in the editor | ||
- Clicking on a line with an activity in the editor highlights the corresponding activity in the diagram | ||
|
||
## Detailed list of supported and unsupported features | ||
|
||
[FEATURES.md](./FEATURES.md) | ||
|
||
## Pre-requisites | ||
|
||
- Python 3.11 | ||
- PlantUML, https://plantuml.com/starting | ||
- The path to the PlantUML must be set in an .env file, see .env.example | ||
|
||
|
||
## Installing and running the server | ||
|
||
In the target python environment: | ||
|
||
``` | ||
pip install . | ||
python -m plantuml_gui | ||
``` | ||
|
||
|
||
## Development | ||
|
||
### Pre-requisites | ||
|
||
- hatch | ||
|
||
### Setup | ||
|
||
Commands to be run in the hatch shell, started by typing `hatch shell`. | ||
|
||
``` | ||
pre-commit install -t pre-commit -t pre-push | ||
``` | ||
|
||
### Running tests | ||
|
||
#### Python | ||
|
||
##### Without coverage | ||
|
||
``` | ||
pytest | ||
``` | ||
|
||
##### With coverage | ||
|
||
``` | ||
python -m pytest --cov --cov-report=html | ||
``` | ||
|
||
#### Javascript | ||
|
||
1. Run `python -m http.server` and open the server in a browser | ||
2. In the browser, open tests/js/SpecRunner.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
[build-system] | ||
build-backend = "hatchling.build" | ||
requires = ["hatchling"] | ||
|
||
[project] | ||
authors = [ | ||
{ name = "Bertil Varenhorst", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [ | ||
"flask==3.0.3", | ||
"pytest==8.2.2", | ||
"pyquery==2.0.0", | ||
"ruff==0.4.8", | ||
"pre-commit==3.7.1", | ||
"mypy==1.10.0", | ||
"pytest-cov==5.0.0", | ||
"python-dotenv==1.0.1", | ||
"loguru==0.7.2", | ||
] | ||
description = '' | ||
dynamic = ["version"] | ||
keywords = [] | ||
license = "MIT" | ||
name = "plantuml-gui" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/Bertil Varenhorst/plantuml-gui#readme" | ||
Issues = "https://github.com/Bertil Varenhorst/plantuml-gui/issues" | ||
Source = "https://github.com/Bertil Varenhorst/plantuml-gui" | ||
|
||
[tool.hatch.version] | ||
path = "src/plantuml_gui/__about__.py" | ||
|
||
[tool.hatch.envs.types] | ||
extra-dependencies = ["mypy>=1.0.0"] | ||
[tool.hatch.envs.types.scripts] | ||
check = "mypy --install-types --non-interactive {args:src/plantuml_gui tests}" | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/plantuml_gui"] | ||
|
||
[tool.coverage.run] | ||
branch = false | ||
omit = ["src/plantuml_gui/__about__.py"] | ||
parallel = true | ||
|
||
[tool.coverage.paths] | ||
plantuml_gui = ["src/plantuml_gui"] | ||
tests = ["tests"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] | ||
|
||
[tool.ruff.lint] | ||
ignore = ["E501"] | ||
select = ["E", "F", "I", "N"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# MIT License | ||
# | ||
# Copyright (c) 2024 Ericsson | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
__version__ = "0.24" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# MIT License | ||
# | ||
# Copyright (c) 2024 Ericsson | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
|
||
from .app import app | ||
|
||
if __name__ == "__main__": | ||
app.run(debug=True) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.