-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add v3 docs (and convenience scripts for working with docs) (#327)
- Loading branch information
1 parent
6b47d6f
commit ee70f75
Showing
10 changed files
with
996 additions
and
6 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,35 @@ | ||
# Read the Docs configuration file for Sphinx projects | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
# You can also specify other tool versions: | ||
# nodejs: "20" | ||
# rust: "1.70" | ||
# golang: "1.20" | ||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs | ||
# builder: "dirhtml" | ||
# Fail on all warnings to avoid broken references | ||
# fail_on_warning: true | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
# formats: | ||
# - epub | ||
|
||
# Optional but recommended, declare the Python requirements required | ||
# to build your documentation | ||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
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
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,3 +1,4 @@ | ||
Sphinx==3.0.3 | ||
sphinx-rtd-theme==0.4.3 | ||
sphinx-copybutton==0.3.0 | ||
Jinja2<3.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
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
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
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,77 @@ | ||
import { Assessment, UMLElement, UMLRelationship } from '../typings'; | ||
import { UMLModelCompat } from './typings'; | ||
/** | ||
* | ||
* Finds an element in the model by id | ||
* | ||
* @param {UMLModelCompat} model the model to search | ||
* @param {string} id the id of the element to find | ||
* @returns {UMLElement | undefined} the element or undefined if not found | ||
*/ | ||
export declare function findElement(model: UMLModelCompat, id: string): UMLElement | undefined; | ||
/** | ||
* | ||
* Adds given element to given model. If element with same id already exists, it will be replaced. | ||
* | ||
* @param {UMLModelCompat} model the model to update | ||
* @param {UMLElement} element the element to add or update | ||
*/ | ||
export declare function addOrUpdateElement(model: UMLModelCompat, element: UMLElement): void; | ||
/** | ||
* | ||
* Finds a relationship in the model by id | ||
* | ||
* @param {UMLModelCompat} model the model to search | ||
* @param {string} id the id of the relationship to find | ||
* @returns {UMLRelationship | undefined} the relationship or undefined if not found | ||
*/ | ||
export declare function findRelationship(model: UMLModelCompat, id: string): UMLRelationship | undefined; | ||
/** | ||
* | ||
* Adds given relationship to given model. If relationship with same id already exists, it will be replaced. | ||
* | ||
* @param {UMLModelCompat} model the model to update | ||
* @param {UMLRelationship} relationship the relationship to add or update | ||
*/ | ||
export declare function addOrUpdateRelationship(model: UMLModelCompat, relationship: UMLRelationship): void; | ||
/** | ||
* | ||
* Finds an assessment in the model by id | ||
* | ||
* @param {UMLModelCompat} model the model to search | ||
* @param {string} id the id of the assessment to find | ||
* @returns {Assessment | undefined} the assessment or undefined if not found | ||
*/ | ||
export declare function findAssessment(model: UMLModelCompat, id: string): Assessment | undefined; | ||
/** | ||
* | ||
* Adds given assessment to given model. If assessment with same id already exists, it will be replaced. | ||
* | ||
* @param {UMLModelCompat} model the model to update | ||
* @param {Assessment} assessment the assessment to add or update | ||
*/ | ||
export declare function addOrUpdateAssessment(model: UMLModelCompat, assessment: Assessment): void; | ||
/** | ||
* @returns true if the element is interactive, false otherwise. | ||
*/ | ||
export declare function isInteractiveElement(model: UMLModelCompat, id: string): boolean; | ||
/** | ||
* Sets the interactive state of the element. | ||
* | ||
* @param {UMLModelCompat} model the model to update | ||
* @param {string} id the id of the element to set interactive state | ||
* @param {boolean} interactive the interactive state to set | ||
*/ | ||
export declare function setInteractiveElement(model: UMLModelCompat, id: string, interactive: boolean): void; | ||
/** | ||
* @returns true if the relationship is interactive, false otherwise. | ||
*/ | ||
export declare function isInteractiveRelationship(model: UMLModelCompat, id: string): boolean; | ||
/** | ||
* Sets the interactive state of the relationship. | ||
* | ||
* @param {UMLModelCompat} model the model to update | ||
* @param {string} id the id of the relationship to set interactive state | ||
* @param {boolean} interactive the interactive state to set | ||
*/ | ||
export declare function setInteractiveRelationship(model: UMLModelCompat, id: string, interactive: boolean): void; |
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,10 @@ | ||
.. _uml-model-helpers: | ||
|
||
################ | ||
UML Model Helpers | ||
################ | ||
|
||
Use the following helper functions to read and modify UML models: | ||
|
||
.. literalinclude:: api/helpers.d.ts | ||
:language: typescript |
Oops, something went wrong.