Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Trestle release #1473

Merged
merged 7 commits into from
Oct 26, 2023
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
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,29 @@ The community call will happen every 2 week(s) on Tuesday at 10.00am EST.\
Meeting information:

```
You have been invited to Attend at the following event :
Compliance Trestle Community Call
Every 2nd week on Tuesday; from June 27th, 2023 at 10:00 am EST for 0.5 hour

To join, select from the following options:

1) Web Browser
a) https://primetime.bluejeans.com/a2m/live-event/dcwuavtj

2) Laptop paired with room system (Best Experience)
a) Dial: [email protected] or 104.238.247.247 in the room system.
b) Go to https://primetime.bluejeans.com/a2m/live-event/dcwuavtj/room-system/
c) Enter the pairing code displayed on your room system's screen into your browser.

3) Room System
a) Dial: [email protected] or 104.238.247.247 in the room system.
b) Enter Meeting ID : 499830564 and Passcode : 8231

4) Joining via a mobile device?
a) Open this link : https://primetime.bluejeans.com/a2m/live-event/dcwuavtj
b) Download the app if you don’t have it already
c) Enter event ID : dcwuavtj
Join from the meeting link
https://ibm.webex.com/ibm/j.php?MTID=m030fdef5ac2d09f46f04813bb5e9dc6b
Tuesday, September 5, 2023 10:00 AM | 30 minutes | (UTC-04:00) Eastern Time (US & Canada)
Occurs every 2 week(s) on Tuesday effective 9/5/2023 from 10:00 AM to 10:30 AM, (UTC-04:00) Eastern Time (US & Canada)

Join by meeting number
Meeting number (access code): 146 967 4515

Tap to join from a mobile device (attendees only)
1-844-531-0958,,1469674515#43533276# United States Toll Free
+1-669-234-1178,,1469674515#43533276# United States Toll
Some mobile devices may ask attendees to enter a numeric password.

Join by phone
1-844-531-0958 United States Toll Free
1-669-234-1178 United States Toll
Global call-in numbers | Toll-free calling restrictions

Join from a video system or application
Dial [email protected]
You can also dial 173.243.2.68 and enter your meeting number.

```

Expand Down
55 changes: 55 additions & 0 deletions docs/trestle_author.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,61 @@ Running `trestle author docs validate -tn docs_task -gh="Governed section"` will
- If `--template-version 1.0.0` (`-tv`) is passed the header field `x-trestle-template-version` will be ignored and document will be forcefully validated against template of version `1.0.0`.
Use this for testing purposes _only_ when you need to validate the document against a specific template. By default the template version will be determined based on `x-trestle-template-version` in the document.

### Validating the documents against different templates

Validation against multiple templates can be done when there is a scenario where you have multiple templates that will have multiple instances. In this particular case you can have a 1:1 relationship between the template and the instance document you are creating out of it, so validation can be performed based on template type and version of that particular template defined in headers.

For that to happen you will need to provide your template with the following parameter at the yaml header level, matching the type of template to be implemented so that the validation can occur:

> x-trestle-template-type: insert_template_type_here

Please, take into consideration that for the validation to happen you will also need to provide each instance document in the task folder a field called `x-trestle-template-type: insert_template_type_here` in the yaml header matching with the template name.

```yaml
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: insert_template_type_here
---
```

With that, you will be able to create more than 1 instance document per template and give the instance the desired name.

For instance, let´s consider the next folder structure:

```text
trestle_root
┣ .trestle
┃ ┣ author
┃ ┃ ┣ my_task_2
┃ ┃ ┃ ┣ 0.0.1
┃ ┃ ┃ ┃ ┣ a_template.md
┃ ┃ ┃ ┃ ┣ another_template.md
┃ ┃ ┃ ┃ ┗ arhitecture.drawio
┃ ┗ config.ini

trestle_root
┣ .trestle
┣ my_task_2
┃ ┣ sample_folder_0
┃ ┃ ┣ a_template_1.md
┃ ┃ ┣ a_template_2.md
┃ ┃ ┣ arhitecture_1.drawio
┃ ┃ ┗ another_template_123.md

```

If you noticed, names are no longer needed to match with exact template names, and that´s because validation will run through `x-trestle-template-type` field defined at the instance header, not through the name.

To validate the documents against their respective templates using `x-trestle-template-type`, run:

> trestle author docs validate -tn my_task_name -vtt

Now, `-vtt` stands for validate template type. Validate template type option will provide you the ability to have more than 1 instance per template validated.

</details>

<details markdown>
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dev =
pytest-xdist
pre-commit>=2.4.0
setuptools
urllib3==1.26.17
wheel
yapf
python-semantic-release==7.33.2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: a
x-trestle-template-version: 1.0.0
---
# System architecture

## Overview

## Security model
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: a
x-trestle-template-version: 2.0.0
---
# System architecture

## Overview

## Security model
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
authors: tmp
owner: tmp
valid:
from:
to:
x-trestle-template-type: b
x-trestle-template-version: 1.1.1
---

# Network architectures

## External interconnections

## Corporate interconnections

## Out of scope interconnections
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: a
x-trestle-template-version: 3.0.0
---
# System architecture

## Overview

## Security model
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
authors: tmp
owner: tmp
valid:
from:
to:
x-trestle-template-type: b
x-trestle-template-version: 1.0.0
---

# Network architecture

## External interconnections

## Corporate interconnections

## Out of scope interconnections
14 changes: 14 additions & 0 deletions tests/data/author/docs/a_folder_template/1.0.0/a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: a
x-trestle-template-version: 1.0.0
---
# System architecture

## Overview

## Security model
17 changes: 17 additions & 0 deletions tests/data/author/docs/a_folder_template/1.0.0/b.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
authors: tmp
owner: tmp
valid:
from:
to:
x-trestle-template-type: b
x-trestle-template-version: 1.0.0
---

# Network architecture

## External interconnections

## Corporate interconnections

## Out of scope interconnections
17 changes: 17 additions & 0 deletions tests/data/author/docs/a_folder_template/1.1.1/b.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
authors: tmp
owner: tmp
valid:
from:
to:
x-trestle-template-type: b
x-trestle-template-version: 1.1.1
---

# Network architectures

## External interconnections

## Corporate interconnections

## Out of scope interconnections
14 changes: 14 additions & 0 deletions tests/data/author/docs/a_folder_template/2.0.0/a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: a
x-trestle-template-version: 2.0.0
---
# System architecture

## Overview

## Security model
14 changes: 14 additions & 0 deletions tests/data/author/docs/a_folder_template/3.0.0/a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: a
x-trestle-template-version: 3.0.0
---
# System architecture

## Overview

## Security model
Loading