canada-ca / canada-ca/architecture

Automate Creation of EA Artifacts from GC policy sources

Open
#7 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
44
Forks
20
PR merge metrics
No merged PRs in 30d

Description

## User Story

As a GC EA Architect
I want to generate EA artifacts automatically from authoritative sources
So that EA components can be automatically generated, and updated instead of each EA Architect needing to re-model these components

## EA Artifact Sources
* Web Sources
* Parliamentary Bills: [All Bills for the Current Session (42nd Parliament, 1st Session)](https://www.parl.ca/LEGISINFO/Home.aspx?ParliamentSession=42-1)
* [Laws and Legislation](https://laws-lois.justice.gc.ca/eng/acts/): eg [Security of Information Act](https://laws-lois.justice.gc.ca/eng/acts/O-5/)
* Regulations: eg [Grosse Isle, P.Q., Prohibited Place Order](https://laws-lois.justice.gc.ca/eng/regulations/C.R.C.,_c._1245/page-1.html#h-499875)
* Codes: [Values and Ethics Code for the Public Sector](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=25049)
* Policy Frameworks: eg [Policy Framework for Information and Technology](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=12452)
* Policies: Eg [Policy on Management of Information Technology](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=12755)
* Directives: eg [Directive on Management of Information Technology](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=15249)
* standards: eg [Standard on Web Interoperability](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=25875)
* Guidelines: Eg [Guideline on Service Management](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=28422)
* Tools: Related policies, directives, standards, guidelines, etc.

* Open Data Sources:
* Departments:
* [List of legal department names and their respective numbers](https://open.canada.ca/data/en/dataset/22090865-f8a6-4b83-9bad-e9d61f26a821)
* Legislation:
* [List of Acts and Regulations ](https://open.canada.ca/data/en/dataset/6d1d5e4d-9ce0-45c5-8859-148e4b6b81e3)
* [Consolidated Acts and regulations in XML ](https://open.canada.ca/data/en/dataset/eb0dee21-9123-4d0d-b11d-0763fa1fb403)
* [Consolidated federal Acts and regulations - Bulk XML file ](https://open.canada.ca/data/en/dataset/ff56de85-f8b9-4719-8dff-ecf362adf0af)
* policies:
* All policies are linked together by way of an [HTML encoded policy hierarchy](https://www.tbs-sct.gc.ca/pol/hierarch-eng.aspx#id25049)

## Background
*It should be possible to generate a new baseline GC EA architecture at the business and motivation level on a daily basis. This is one proposal how
* Each law has a HTML representation (eg https://laws-lois.justice.gc.ca/eng/acts/C-15.31/)
* For each law with an HTML representation there is a machine readable XML version (eg. https://laws-lois.justice.gc.ca/eng/XML/C-15.31.xml)
* XSLT is a transformation language to convert XML into various others forms including other XML formats. (https://www.w3schools.com/xml/xsl_intro.asp)
* [Archimate](http://pubs.opengroup.org/architecture/archimate3-doc/) is an openly documented modeling language specification
* The [Archimate Model Exchange File Format](https://www.opengroup.org/open-group-archimate-model-exchange-file-format) is an XML representation of an archimate model
* software compliant to the Archimate exchange format can import and export Archimate exchange files
* [Archi](https://www.archimatetool.com/) is an example of such an open source compliant tool
* Archi has a [collaboration extension](https://github.com/archimatetool/archi-modelrepository-plugin/wiki) that allows architects to use [Git](https://git-scm.com/) as a version controlled EA repository Repository to manage EA elements
* [canada-ca/architecture](https://github.com/canada-ca/architecture) repository leverages [GitHub](https://github.com) as an example of a public implementation of Git
* [GCCode](https://gccode.ssc-spc.gc.ca) **Internal Link** is an internal Git repository that uses [GitLab Community Edition]( as the interface
* The Archimate collaboration plugin converts each EA object into a mini Archimate Model Exchange file format. For example this is what a [Requirement Element in the canada-ca/architecture model](https://github.com/canada-ca/architecture/blob/master/model/motivation/82b0c6e4-7d7d-40f4-b0cf-57ceb231d423/Requirement_02ff40fd-da1f-4970-955a-4937850196a8.xml) looks like:
```

```

* converting various EA elements from their native XML representation (eg policies and laws) to the archimate exchange format can aid with easily updating EA elements
* These processes, if automated can run regularly (eg daily)

Therefore, it should be possible to generate a new baseline GC EA architecture at the business and motivation level on a daily basis.

## Initial Implementation Details
* [ ] Start with [Values and Ethics Code for the Public Sector](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=25049) and then work down each level of the hierarchy
* [ ] Test with a small sample of elements
* [ ] Use Python as a human friendly scripting language that has a lower barrier to entry to handle the management of the creation of these elements
* [ ] Develop an XSLT transformation for the EA elements
* [ ] Run the transfomation
* [ ] Create separate elements that can be added to the canada-ca/architecture repository
* [ ] Create a single Archimate exchange file containing ALL the elements for easy import outside of the canada-ca/architecture repository

## Future upgrades
* [ ] add relationships to linked elements within a "policy"
* [ ] "Related Laws"
* [ ] "Supporting Tools"
* [ ] "More information"
* [ ] "Hierarchy"
* [ ] break large elements (eg a policy) into smaller components (eg sections and sub-sections)
* [ ] provide XSLT transformations to the managers of the web locations and assets so that canada.ca can provide native XML as well as Archimate compliant XML representations of all of GC EA elements

## Future work
* [ ] Create a plugin for Archi that can Create, Read, Update, Delete elements in a model based on various "Policy" sources (as listed above)
* [ ]scan internet sources
* [ ] search for changes,
* [ ] read sources,
* [ ] transform from native formats to archimate,
* [ ] import one or more elements into the model,
* [ ] update the model,

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository files, tests, or entry points are identified. Start by narrowing the initial implementation to the Values and Ethics Code for the Public Sector, a small sample, Python, and an XSLT transformation; define the generated ArchiMate outputs and validation criteria before tackling relationships or the future plugin.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, python, xml
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.