Skip to content

Commit

Permalink
Merge branch 'master' into feat/support-custom-votings
Browse files Browse the repository at this point in the history
  • Loading branch information
abeforgit committed Oct 31, 2024
2 parents b941d8d + 10c1e98 commit 3b9e8c1
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 90 deletions.
77 changes: 0 additions & 77 deletions .drone.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .woodpecker/.latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
steps:
build-latest:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: "${CI_REPO_OWNER}/${CI_REPO_NAME}"
tags: latest
platforms: linux/amd64
# Can enable arm64 when moving to mu-javascript-template version >1.8
# platforms: linux/amd64, linux/arm64
secrets: [ docker_username, docker_password ]
when:
branch: master
event: push
13 changes: 13 additions & 0 deletions .woodpecker/.release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
steps:
build-release:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: "${CI_REPO_OWNER}/${CI_REPO_NAME}"
tags: "${CI_COMMIT_TAG##v}" # drops v from version tag
platforms: linux/amd64
# Can enable arm64 when moving to mu-javascript-template version >1.8
# platforms: linux/amd64, linux/arm64
secrets: [ docker_username, docker_password ]
when:
event: tag
ref: refs/tags/v*
23 changes: 23 additions & 0 deletions .woodpecker/.test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
steps:
install:
image: node:14-alpine
commands:
- npm i
# Our lockfile is incompatible with the version of npm used with node:14. The old scripts just
# `npm i`, so we do that. We should update to a sane node version and change this.
# - npm ci
lint:
image: node:14-alpine
commands:
- npm run lint
build-dry-run:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: "${CI_REPO_OWNER}/${CI_REPO_NAME}"
platforms: linux/amd64
# Can enable arm64 when moving to mu-javascript-template version >1.8
# platforms: linux/amd64, linux/arm64
dry_run: true
when:
event:
- pull_request
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@



## v2.4.1 (2024-10-31)

* [#109](https://github.com/lblod/notulen-prepublish-service/pull/109) Switch template version to semtech version 1.5.0-beta.3
* [#117](https://github.com/lblod/notulen-prepublish-service/pull/117) Move to woodpecker CI


## 2.4.0 (2024-10-30)

#### :rocket: Enhancement
* [#116](https://github.com/lblod/notulen-prepublish-service/pull/116) Add agendapoint number to the output of treatment extracts [@piemonkey](https://github.com/piemonkey)

#### Committers: 1
- [@piemonkey](https://github.com/piemonkey)


## 2.3.3 (2024-09-20)
[#114](https://github.com/lblod/notulen-prepublish-service/pull/114) Handle logical file uris with no related physical file information

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvdk/mu-javascript-template
FROM semtech/mu-javascript-template:1.5.0-beta.3
LABEL [email protected]
# disable logging of sparql queries for performance
ENV LOG_SPARQL_ALL "false"
3 changes: 3 additions & 0 deletions models/treatment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { query, sparqlEscapeString, sparqlEscapeUri } from 'mu';
import Attachment from './attachment';

export default class Treatment {
/** @returns {Promise<Treatment[]>} */
static async findAll({ meetingUuid }) {
const queryString = `
${prefixMap.get('besluit').toSparqlString()}
Expand Down Expand Up @@ -55,6 +56,7 @@ export default class Treatment {
}
}

/** @returns {Promise<Treatment>} */
static async findUri(uri) {
const queryString = `
${prefixMap.get('besluit').toSparqlString()}
Expand Down Expand Up @@ -102,6 +104,7 @@ export default class Treatment {
}
}

/** @returns {Promise<Treatment>} */
static async find(treatmentUuid) {
const queryString = `
${prefixMap.get('besluit').toSparqlString()}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notulen-prepublish-service",
"version": "2.3.3",
"version": "2.4.1",
"description": "mu-semtech service to extract knowledge from documents",
"main": "app.js",
"dependencies": {
Expand Down
21 changes: 17 additions & 4 deletions support/extract-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ import validateMeeting from './validate-meeting';
import validateTreatment from './validate-treatment';
import VersionedExtract from '../models/versioned-behandeling';
import { handleVersionedResource } from './pre-importer';
import { DOCUMENT_PUBLISHED_STATUS, IS_FINAL } from './constants';
import { DOCUMENT_PUBLISHED_STATUS, IS_FINAL, IS_PREVIEW } from './constants';

// This file contains helpers for exporting, signing and publishing an extract of the meeting notes
// an extract is the treatment of one agendapoint and all it's related info

/**
* This file contains helpers for exporting, signing and publishing an extract of the meeting notes
* an extract is the treatment of one agendapoint and all it's related info
* @param {Treatment} treatment
* @param {Meeting} meeting
* @param {string[]} meetingErrors
* @param {*} participantCache
*/

async function buildExtractForTreatment(
treatment,
meeting,
Expand All @@ -35,6 +39,7 @@ async function buildExtractForTreatment(
const data = await buildExtractDataForTreatment(
treatment,
meeting,
IS_PREVIEW,
true,
participantCache
);
Expand Down Expand Up @@ -89,6 +94,13 @@ export async function buildExtractData(
);
}

/**
* @param {Treatment} treatment
* @param {Meeting} meeting
* @param {string} previewType
* @param {boolean} [isPublic=true]
* @param {any} [participantCache=null]
*/
export async function buildExtractDataForTreatment(
treatment,
meeting,
Expand Down Expand Up @@ -148,6 +160,7 @@ export async function buildExtractDataForTreatment(
participationList,
votes,
content,
articleNumber: Number(treatment.position) + 1,
};
}

Expand Down
13 changes: 8 additions & 5 deletions support/templates/partials/treatment.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
<span class="au-c-template-private">Besloten behandeling van agendapunt</span>
{{/if}}
</p>
<h3 resource="{{this.treatment.agendapoint}}" property="dc:subject">
<span property="dc:title">{{this.agendapoint.title}}</span>
{{#if this.agendapoint.type}}
(<span property="besluit:Agendapunt.type" resource="{{this.agendapoint.type}}" typeof="skos:Concept">{{this.agendapoint.typeName}}</span>)
{{/if}}
<h3>
{{articleNumber}}.&ensp;<span
resource="{{this.treatment.agendapoint}}" property="dc:subject">
<span property="dc:title">{{this.agendapoint.title}}</span>
{{#if this.agendapoint.type}}
(<span property="besluit:Agendapunt.type" resource="{{this.agendapoint.type}}" typeof="skos:Concept">{{this.agendapoint.typeName}}</span>)
{{/if}}
</span>
</h3>
{{#if this.participationList}}
<h4>Aanwezigen bij agendapunt</h4>
Expand Down

0 comments on commit 3b9e8c1

Please sign in to comment.