Skip to content

Commit

Permalink
Merge branch 'main-isik-stufe-3' into update/firely-pipeline-040
Browse files Browse the repository at this point in the history
  • Loading branch information
ylboerner authored Nov 25, 2023
2 parents 1661e09 + 9eb937a commit cd9fd4f
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 53 deletions.
33 changes: 7 additions & 26 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
<!--- Provide a general summary of your changes in the Title above -->
Please go the the `Preview` tab and select the appropriate sub-template:

## Description
<!--- Describe your changes in detail -->
[**Contributor PR**](?expand=1&template=PR_Template_Contributor.md)

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
<!--- If it full fills an open feature request, please link to the feature request here. -->
[Version Upgrade **(for Admins)**](?expand=1&template=PR_Template_VersionUpgrade.md)

## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, especially -->
<!--- the software you teste your change with. -->
<!--- Are other areas of the specification affected? -->

## Snippets or Screenshots (if necessary):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this IG / specification.
- [ ] My change requires a change to the documentation or narrative (intend) of the IG.
- [ ] I have already updated the documentation / narrative (intend) accordingly.
<!--- If you have no idea, time, what so ever, you can also continue here without using a pull request template-->
<!--- Please keep in mind that if you use this short cut, your PR is lees likely to be merged, because of missing information.-->
## Pull Request Short Cut
<!--- Describe your changes briefly. If you need some space to describe, please use the contributor template as mentioned at the top-->
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/PR_Template_Contributor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# Contributor Pull Request
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
<!--- If it full fills an open feature request, please link to the feature request here. -->

## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, especially -->
<!--- the software you teste your change with. -->
<!--- Are other areas of the specification affected? -->

## Snippets or Screenshots (if necessary):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this IG / specification.
- [ ] My change requires a change to the documentation or narrative (intend) of the IG.
- [ ] I have already updated the documentation / narrative (intend) accordingly.
54 changes: 54 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/PR_Template_VersionUpgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Version Upgrade Template
<!--- parameters of your upgrade -->

Version:

Date:

## Description
<!--- CAVEAT: You to be an admin to perform all the necessary jobs. -->
This is a Pullreuqest that requires an increase in the Version number. Therefore, multiple outside-github, related Task have to be performed and checked.

All jobs with an `x` in the boxes were performed to the best of knowledge.

## Pre-Merge Activities
<!--- Lets check everything before we continue. -->
- [ ] This PR refers to a versioned Branch with a name and a version number in the form of N.n.n, e.g. "TC_3.2.1".
- [ ] This PR has a clean meaningful committ history. Minor committs or committs without descirption have been squashed, at the latest now.
- [ ] The _./github/workflows/main.yml_ refers to the correct Firetly Terminal and SUSHI Version.
> **_Firely Terminal Pipeline_** 0.4.0.
> **_SUSHI Versions_** 3.5.0.
- [ ] By running the _Release_Publish.py_ script, release version and date was updated accordingly. The script ran without errors.
- [ ] Eventually, increase the dependency of to newer Basis Modul (package and sushi-config)
- [ ] New Release Notes were created, aglined to the committ history and cleaned. In Github, go to
- [ ] _-> Releases_ then _-> Draft a new release_ with the _Modul Name and Version_, then
- [ ] _-> Target the main-Branch_ and _->enter a new Tag according to the Version_, then click.
- [ ] Click _-> Generate Release notes_ , _->Adjust them if necessary_ and _-> Copy/Paste the Details in the RealeaseNotes.md_ of the very Branch you want to merge.
- [ ] Finally _-> Save as Draft_

## Merge and Publishing
<!--- Now lets do the merge. -->
<!--- Include details of your testing environment, especially -->
- [ ] With the updated Version, Dates, and Release Notes (as described above) with the last committ into the Branch you want to merge.
- [ ] In GitHub _-> Actions_ the _->CI (FHIR Validation)_ workflow terminates successfully.
- [ ] Add the Approve / the PR gets posivitly reviewed by a collegue.
- [ ] Merge (without squash) the PR, delete the Branch.


## Post-Merge Activities
<!--- Do some update, refreshe and cleanup of related resources. -->

- [ ] Go to the corresponding SIMPLIFIER Project and _-> Github -> Reimport_ the project.
- [ ] Go to the corresponding SIMPLIFIER Project and _-> Packages -> Expand the Dropdown for Create -> Create new package_ for the project.
- [ ] With the corresponding version number, and
- [ ] The Release notes (from above) and a compare-link to the previous Release.
- [ ] Publish the previosuly drafteted Release, including version number, on GitHub.
- [ ] Provide / Archive the IG in the corresponding _gh-pages_ branch of the GitHub project.
- [ ] Checkout the Branch (no need to merge it later).
- [ ] Export from Simplifier via _-> Guides -> Expand the Modul ... -> Export_
- [ ] Unpack the zip, remove the packages folder (because its kinda big), and move everything else to a (version coressponding) new folder in the branch folder structure.
- [ ] committ the branch.


## Finished
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ name: CI (FHIR Validation)

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push or pull request events
push:
branches: [ master-isik-stufe-2 ]
pull_request:
branches: [ master-isik-stufe-2 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/fhirpkg.lock.json
.vscode/*
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Zum Zeitpunkt der Erstellung dieses Leitfadens waren keine geeigneten Basis-Profile zur Darstellung von Angehörigen bekannt.

Instanzen, die gegen dieses Profil valide sind, sind auch valide gegen:
* [Profil Bezugsperson der KBV Archiv- und Wechselschnittstelle - v1.2.0](https://simplifier.net/pvs-archivierungs-undwechselschnittstelle/kbvprawbezugsperson)
* [Profil Bezugsperson der KBV Archiv- und Wechselschnittstelle - v1.2.0](https://simplifier.net/packages/kbv.ita.aws/1.2.0)
* sofern für den Angehörigen mindestens ein Vor- und Nachname angegeben wurde.
* wenn die Ressource einen Narrative enthält und in den Metadaten die Canonical-URL des KBV-Profile angegeben wird

Expand Down
2 changes: 1 addition & 1 deletion Resources/sushi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FSHOnly: true
applyExtensionMetadataToRoot: false
id: Implementierungsleitfaden ISiK-Basismodul Stufe 3 3.0.0
name: Implementierungsleitfaden ISiK-Basismodul Stufe 3 3.0.0
status: draft
status: active
version: "3.0.0"
publisher:
name: Gematik GmbH
Expand Down
26 changes: 26 additions & 0 deletions scripts/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package.json:
- type: version
regex: '("version":\s*")([\d\.]+.*)(")'
sushi-config.yaml:
- type: version
regex: '(version:\s*)(\d+\.\d+\.\d+.*)()'
ruleset.fsh:
- type: version
regex:
- '(\*\s*version\s*=\s*")([\d\.]+.*)(")'
- '(\*\s*\^version\s*=\s*")([\d\.]+.*)(")'
- '(\*\s*implementationGuide\s*=\s*".*\|)([\d\.]+.*)(")'
- type: date
regex:
- '(\*\s*date\s*=\s*")(\d+\-\d+\-\d+)(")'
- '(\*\s*\^date\s*=\s*")(\d+\-\d+\-\d+)(")'
format: '%Y-%m-%d'
Einfuehrung.md:
- type: version
regex: '(Version: \s*)(\d+\.\d+\.\d+.*)()'
- type: date
regex: '(Datum:\s*)(\d+\.\d+\.\d+.*)()'
format: '%d.%m.%Y'
ImplementierungsleitfadenIsiK_basismodul.json:
- type: version
regex: '("version":\s*")(\d+\.\d+\.\d+.*)(",)'
18 changes: 9 additions & 9 deletions scripts/release_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import yaml


class FileToUpdate:
class FileTypeCombinationToUpdate:
def __init__(self, filename, content_type, regex_list, format=None) -> None:
self.filename = filename
self.content_type = content_type
Expand All @@ -33,7 +33,7 @@ def create_files_to_update_list(config):
for filename, replacements in config.items():
for replacement in replacements:
files_to_update.append(
FileToUpdate(
FileTypeCombinationToUpdate(
filename,
replacement["type"],
replacement["regex"] if isinstance(replacement["regex"], list) else [replacement["regex"]],
Expand Down Expand Up @@ -68,14 +68,14 @@ def replace_content_in_files(files: list, new_release_version: str, new_date: da
print("Error: No files found!")
return

for file in files:
if file.content_type == "version":
replace_version_in_file(file, new_release_version)
elif file.content_type == "date":
replace_date_in_file(file, new_date)
for FileTypeCombination in files:
if FileTypeCombination.content_type == "version":
replace_version_in_file(FileTypeCombination, new_release_version)
elif FileTypeCombination.content_type == "date":
replace_date_in_file(FileTypeCombination, new_date)


def replace_version_in_file(file: FileToUpdate, new_release_version: str):
def replace_version_in_file(file: FileTypeCombinationToUpdate, new_release_version: str):
with open(file.location, 'r') as input_file:
input_text = input_file.read()

Expand All @@ -88,7 +88,7 @@ def replace_version_in_file(file: FileToUpdate, new_release_version: str):
output_file.write(input_text)


def replace_date_in_file(file: FileToUpdate, new_date: datetime):
def replace_date_in_file(file: FileTypeCombinationToUpdate, new_date: datetime):
with open(file.location, 'r') as input_file:
input_text = input_file.read()

Expand Down
13 changes: 0 additions & 13 deletions scripts/update_version.sh

This file was deleted.

0 comments on commit cd9fd4f

Please sign in to comment.