Skip to content

Commit

Permalink
Prepare for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
klakegg committed Oct 29, 2020
1 parent a00e9a1 commit 98059d0
Show file tree
Hide file tree
Showing 18 changed files with 110 additions and 66 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ jobs:
with:
name: target

- name: Upload validation artifact
uses: klakegg/[email protected]
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "validator/no.anskaffelser.ehf.preaward.g2-${TAG}.asice"
label: "Validation artifacts for VEFA Validator 2.x"
type: "application/vnd.difi.validator.v2+zip"

- name: Upload examples files
uses: klakegg/[email protected]
if: startsWith(github.ref, 'refs/tags/')
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!make

IDENTIFIER = ehf-preaward-g2
RULES_IDENT = no.difi.ehf.preaward.g2
RULES_IDENT = no.anskaffelser.ehf.preaward.g2
RELEASE = 2020-10-29

include tools/ehf.makefile
6 changes: 6 additions & 0 deletions project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
<Tag>dps-qualification</Tag>
<Tag>document-folder-1.0</Tag>
<Tag>supplier-list-1.0</Tag>
<Tag>supplier-list-light-1.0</Tag>
</Resource>
<Resource>
<Type>native:File</Type>
Expand All @@ -194,6 +195,7 @@
<Tag>dps-qualification</Tag>
<Tag>document-folder-1.0</Tag>
<Tag>supplier-list-1.0</Tag>
<Tag>supplier-list-light-1.0</Tag>
</Resource>

<!-- Code lists-->
Expand Down Expand Up @@ -267,6 +269,8 @@
<Title>Unawarded Notification</Title>
<Description>Process to notify loosing parties in a DPS procurement.</Description>
</Tag> -->

<!--
<Tag>
<Identifier>document-folder-1.0</Identifier>
<Title>EHF Document Folder 1.0 RC1</Title>
Expand All @@ -275,6 +279,8 @@
<Identifier>supplier-list-1.0</Identifier>
<Title>EHF Supplier List 1.0 RC1</Title>
</Tag>
-->

<Tag>
<Identifier>supplier-list-light-1.0</Identifier>
<Title>EHF Supplier List Light 1.0 RC1</Title>
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
6 changes: 2 additions & 4 deletions src/supplier-list-light-1.0/buildconfig.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildConfigurations xmlns="http://difi.no/xsd/vefa/validator/1.0">

<package>EHF Supplier List 1.0 RC1</package>

<testfolder>example</testfolder>
<testfolder>docs/guide/snippets</testfolder>
<testfolder>rules/unit</testfolder>

<configuration>
<identifier>ehf-preaward-g2-t14l-1.0</identifier>
<title>EHF Supplier List 1.0 (Light)</title>
<title>EHF Supplier List Light 1.0</title>
<declaration type="xml">urn:fdc:anskaffelser.no:2019:ehf:schema:ParticipantList-1::ParticipantList</declaration>
<inherit>ehf-schemas</inherit>
<file source="rules/sch/T14L-SUPPLIER-LIST-1.0.sch" path="sch/T14L-SUPPLIER-LIST-1.0.sch" />
<file source="rules/sch/T14L-SUPPLIER-LIST-1.0.sch" path="sch/supplier-list-light-1.0/T14L-SUPPLIER-LIST-1.0.sch" />
</configuration>

</buildConfigurations>
71 changes: 35 additions & 36 deletions src/supplier-list-light-1.0/docs/guide/snippets/supplierlist.xml
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<ParticipantList xmlns="urn:fdc:anskaffelser.no:2019:ehf:schema:ParticipantList-1">

<CustomizationID>urn:fdc:anskaffelser.no:2020:ehf:preaward:g2:supplier-list:1.0</CustomizationID>
<ProfileID>urn:fdc:anskaffelser.no:2020:ehf:preaward:g2:process:light:1.0</ProfileID>
<CustomizationID>urn:fdc:anskaffelser.no:2020:ehf:preaward:g2:supplier-list:1.0</CustomizationID>
<ProfileID>urn:fdc:anskaffelser.no:2020:ehf:preaward:g2:process:light:1.0</ProfileID>

<ID>1</ID>
<UUID>7c15a808-decc-4382-a0d1-d5ff2c605f1</UUID>
<IssueDate>2019-09-09</IssueDate>
<IssueTime>15:00:00</IssueTime>
<ID>1</ID>
<UUID>7c15a808-decc-4382-a0d1-d5ff2c605f1</UUID>
<IssueDate>2019-09-09</IssueDate>
<IssueTime>15:00:00</IssueTime>

<!-- tag::Reference[] -->
<!-- tag::Reference-TED[] -->
<FolderReference>
<ID scheme="TED">1458</ID> <!--1-->
</FolderReference>
<!-- end::Reference-TED[] -->
<!-- tag::Reference-DOFFIN[] -->
<FolderReference>
<ID scheme="DOFFIN">518</ID> <!--1-->
</FolderReference>
<!-- end::Reference-DOFFIN[] -->
<!-- end::Reference[] -->
<!-- tag::Reference[] -->
<!-- tag::Reference-TED[] -->
<FolderReference>
<ID scheme="TED">1458</ID> <!--1-->
</FolderReference>
<!-- end::Reference-TED[] -->
<!-- tag::Reference-DOFFIN[] -->
<FolderReference>
<ID scheme="DOFFIN">518</ID> <!--1-->
</FolderReference>
<!-- end::Reference-DOFFIN[] -->
<!-- end::Reference[] -->


<!-- tag::ParticipatingParty[] -->
<ParticipatingParty>
<Party>
<CompanyID scheme="0192">987654325</CompanyID> <!--1-->
<Name>Delta AS</Name> <!--2-->
<ElectronicMail>[email protected]</ElectronicMail>
<Contact> <!--3-->
<Name>Helge Eriksson</Name>
<Telephone>+4798765432</Telephone>
<ElectronicMail>[email protected]</ElectronicMail>
</Contact>
</Party>
<FolderReference> <!--4-->
<ID scheme="LOT">01</ID>
</FolderReference>
</ParticipatingParty>
<!-- end::ParticipatingParty[] -->
<!-- tag::ParticipatingParty[] -->
<ParticipatingParty>
<Party>
<CompanyID scheme="0192">987654325</CompanyID> <!--1-->
<Name>Delta AS</Name> <!--2-->
<ElectronicMail>[email protected]</ElectronicMail>
<Contact> <!--3-->
<Name>Helge Eriksson</Name>
<Telephone>+4798765432</Telephone>
<ElectronicMail>[email protected]</ElectronicMail>
</Contact>
</Party>
<FolderReference> <!--4-->
<ID scheme="LOT">01</ID>
</FolderReference>
</ParticipatingParty>
<!-- end::ParticipatingParty[] -->

</ParticipantList>
21 changes: 21 additions & 0 deletions src/supplier-list-light-1.0/rules/sch/T14L-SUPPLIER-LIST-1.0.sch
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@
<!-- Basic rules -->
<include href="../../../../target/generated/t14l-basic-1.0.sch"/>

<pattern>
<!-- Rules: Empty elements -->

<rule context="es:ParticipantList | es:FolderReference | es:ParticipatingParty | es:Party | es:ElectronicMail | es:Telephone">
<!-- Skipping -->
</rule>

<rule context="es:Contact">
<assert id="EHF-T14L-R021"
test="count(*) != 0"
flag="fatal">Document MUST not contain empty elements.</assert>
</rule>

<rule context="es:*">
<assert id="EHF-T14L-R022"
test="normalize-space() != ''"
flag="fatal">Document MUST not contain empty elements.</assert>
</rule>

</pattern>

<pattern>
<!-- Rules: References -->

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Example of Participating Party
[source, xml, indent=0]
----
include::src/supplier-list-light-1.0/docs/guide/snippets/supplierlist.xml[tags=ParticipatingParty]
----
5 changes: 5 additions & 0 deletions src/supplier-list-light-1.0/syntax/docs/reference.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Example of Reference
[source, xml, indent=0]
----
include::src/supplier-list-light-1.0/docs/guide/snippets/supplierlist.xml[tags=Reference]
----
19 changes: 12 additions & 7 deletions src/supplier-list-light-1.0/syntax/t14l-supplier-list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Element cardinality="1..2">
<Term>es:FolderReference</Term>
<Name>Folder Reference</Name>
<Property key="doc">structure/docs/supplier-list-1.0/reference.adoc</Property>
<Property key="doc">src/supplier-list-light-1.0/syntax/docs/reference.adoc</Property>

<Element>
<Term>es:ID</Term>
Expand All @@ -76,20 +76,20 @@
</Element>
</Element>


<Element cardinality="0..n">
<Term>es:ParticipatingParty</Term>
<Name>Participating Party in DPS</Name>
<Property key="doc">structure/docs/supplier-list-1.0/participating-party.adoc</Property>
<Property key="doc">src/supplier-list-light-1.0/syntax/docs/participating-party.adoc</Property>

<Element>
<Term>es:Party</Term>
<Name>Party information</Name>

<Element cardinality="0..1">
<Element>
<Term>es:CompanyID</Term>
<Name>Company Identifier</Name>
<Description>Company Identifier of the Participating Party in DPS.</Description>
<Reference type="RULE">EHF-T14L-R011</Reference>

<Attribute>
<Term>scheme</Term>
Expand All @@ -100,7 +100,7 @@
<Value type="EXAMPLE">999999995</Value>
</Element>

<Element cardinality="0..1">
<Element>
<Term>es:Name</Term>
<Name>Name</Name>
<Description>The name of the Participating party in DPS.</Description>
Expand All @@ -111,13 +111,14 @@
<Term>es:ElectronicMail</Term>
<Name>Company Email Address</Name>
<Value type="EXAMPLE">[email protected]</Value>
<Reference type="RULE">EHF-T14L-R012</Reference>
</Element>

<Element cardinality="0..1">
<Term>es:Contact</Term>
<Name>Contact Person of the Participating Party</Name>

<Element cardinality="0..1">
<Element>
<Term>es:Name</Term>
<Name>Contact Name</Name>
<Description>Contact person's name.</Description>
Expand All @@ -129,13 +130,15 @@
<Name>Contact Telephone number</Name>
<Description>Contact person's telephone number.</Description>
<Value type="EXAMPLE">+4799663366</Value>
<Reference type="RULE">EHF-T14L-R013</Reference>
</Element>

<Element cardinality="0..1">
<Element>
<Term>es:ElectronicMail</Term>
<Name>Contact Email Address</Name>
<Description>Contact person's e-mail address.</Description>
<Value type="EXAMPLE">[email protected]</Value>
<Reference type="RULE">EHF-T14L-R012</Reference>
</Element>
</Element>
</Element>
Expand All @@ -148,6 +151,8 @@
<Term>es:ID</Term>
<Name>Lot Reference</Name>
<Description>The Dynamic purchase system's Lot Reference number. Only Lot reference is allowed.</Description>
<Reference type="RULE">EHF-T14L-R001</Reference>
<Reference type="RULE">EHF-T14L-R002</Reference>

<Attribute>
<Term>scheme</Term>
Expand Down
16 changes: 1 addition & 15 deletions tools/ehf.makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@ RULES_FOLDER := $(if $(RULES_FOLDER),$(RULES_FOLDER),rules)
RULES_IDENT := $(if $(RULES_IDENT),$(RULES_IDENT),rules)
BUILD = structure example schematron xsd rules docs scripts
.DEFAULT_GOAL = default
define docker_pull
@docker pull $(1)
endef
define docker_run
$(call fold_start,$(1),$(2))
@docker run --rm -i $(3) || touch $(PROJECT)/.failed
@if [ -e $(PROJECT)/.failed ]; then \
rm $(PROJECT)/.failed; \
echo "\033[1;31mFailed\033[0m"; \
fi
endef
define fold_start
@echo "\033[33;1m$(2)\033[0m"
endef
Expand All @@ -42,9 +31,6 @@ init:
serve:
$(call fold_start,serve,Serve serve)
@ruby -run -e httpd target --bind-address 0.0.0.0 --port 8000
pull:
$(call fold_start,docker_pull,Pulling Docker images)
$(call docker_pull,$(IMAGE))
env: init
$(call fold_start,environment,Creating environment file)
@sh tools/ehf.sh trigger_environment
Expand All @@ -55,7 +41,7 @@ RULE_RULES=$(shell find $(PROJECT) -name buildconfig.xml | wc -l | xargs test "0
rules: init
ifeq "$(RULE_RULES)" "true"
$(call fold_start,rules,Running vefa-validator)
validator build -x -t -n $(RULES_IDENT) -target target/validator /work
@validator build -x -t -n $(RULES_IDENT) -b $(RELEASE) -target target/validator $(PROJECT)
else
$(call skip,rules)
endif
Expand Down
14 changes: 11 additions & 3 deletions tools/ehf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,22 @@ rm -rf target/examples
mkdir -p target/examples target/site/files
test ! -r tools/template/examples-readme || cat tools/template/examples-readme | envsubst > target/examples/README
for folder in $(find rules -mindepth 2 -maxdepth 2 -name example -type d); do
if [ ! -e "$folder/.skip" ]; then
mkdir -p target/examples/$(echo $folder | cut -d '/' -f 2)
cp -r $folder/* target/examples/$(echo $folder | cut -d '/' -f 2)/
fi
done
for folder in $(find src -mindepth 2 -maxdepth 2 -name example -type d); do
if [ ! -e "$folder/.skip" ]; then
mkdir -p target/examples/$(echo $folder | cut -d '/' -f 2)
cp -r $folder/* target/examples/$(echo $folder | cut -d '/' -f 2)/
fi
done
test ! -r tools/script/examples.sh || . tools/script/examples.sh
rm -rf target/examples.zip
current=$(pwd)
cd target/examples
zip -9r ../examples.zip *
zip -D9r ../examples.zip *
cp $current/target/examples.zip $current/target/site/files/examples.zip
)
trigger_schematron() (
Expand All @@ -39,22 +43,26 @@ rm -rf target/schematron
mkdir -p target/schematron target/site/files
test ! -r tools/template/schematron-readme || cat tools/template/schematron-readme | envsubst > target/schematron/README
for sch in $(ls rules/*/sch/*.sch); do
if [ ! -e "$(dirname $sch)/.skip" ]; then
echo "Prepare: $sch"
mkdir -p target/schematron/$(echo $sch | cut -d '/' -f 2)
saxon -s:$sch -xsl:/usr/share/xslt/iso-schematron/iso_dsdl_include.xsl \
| saxon -s:- -xsl:/usr/share/xslt/iso-schematron/iso_abstract_expand.xsl -o:target/schematron/$(echo $sch | cut -d '/' -f 2)/$(basename $sch)
fi
done
for sch in $(ls src/*/rules/sch/*.sch); do
if [ ! -e "$(dirname $sch)/.skip" ]; then
echo "Prepare: $sch"
mkdir -p target/schematron/$(echo $sch | cut -d '/' -f 2)
saxon -s:$sch -xsl:/usr/share/xslt/iso-schematron/iso_dsdl_include.xsl \
| saxon -s:- -xsl:/usr/share/xslt/iso-schematron/iso_abstract_expand.xsl -o:target/schematron/$(echo $sch | cut -d '/' -f 2)/$(basename $sch)
fi
done
test ! -r tools/script/schematron.sh || . tools/script/schematron.sh
rm -rf target/schematron.zip
current=$(pwd)
cd target/schematron
zip -9 -r ../schematron.zip *
zip -D9r ../schematron.zip *
cp $current/target/schematron.zip $current/target/site/files/schematron.zip
)
trigger_xsd() (
Expand All @@ -69,7 +77,7 @@ cp -r $folder /tmp/$name
cd /tmp/$name
test ! -e prepare.sh || . prepare.sh
rm -rf prepare.sh
zip -9 -r $current/target/xsd/$name.zip *
zip -D9r $current/target/xsd/$name.zip *
cp $current/target/xsd/$name.zip $current/target/site/files/xsd-$name.zip
cd $current
done
Expand Down

0 comments on commit 98059d0

Please sign in to comment.