Skip to content

Commit

Permalink
Merge pull request #31 from swerik-project/dev
Browse files Browse the repository at this point in the history
prerelease: patch version
  • Loading branch information
BobBorges authored Jan 15, 2025
2 parents ae79b84 + ae7e3c1 commit efc40a3
Show file tree
Hide file tree
Showing 22 changed files with 195,599 additions and 53 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Get most recent release
run: |
LATEST_RELEASE=$(echo "$(curl -L https://api.github.com/repos/swerik-project/pyriksdagen/releases/latest)" | jq -r .tag_name)
LATEST_RELEASE=$(echo "$(curl -L https://api.github.com/repos/swerik-project/riksdagen-motions/releases/latest)" | jq -r .tag_name)
if [[ "$LATEST_RELEASE" == null ]] ; then LATEST_RELEASE="v0.0.0" ; fi
echo "LAST_RELEASE=$LATEST_RELEASE" >> $GITHUB_ENV
Expand All @@ -69,6 +69,8 @@ jobs:
- name: Validate CITATION.cff
uses: dieghernan/cff-validator@v3
with:
install-r: true

- name: Build documentation
run: |
Expand All @@ -85,10 +87,26 @@ jobs:
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add test/results
git commit -m "chore: update test results"
git add docs
git commit -m "chore: update docs"
if [[ `git status CITATION.cff --porcelain --untracked-files=no` ]]; then
git add CITATION.cff
git commit -m "chore (workflow): bump version nr in cff file"
else
echo ""
echo "::warning:: WARNING!!! No changes to CITATION.cff file."
echo " Double check the version nr is correct."
echo ""
git commit --allow-empty -m "chore (workflow): no changes to CITATION.cff"
fi
if [[ `git status docs/ --porcelain --untracked-files=no` ]]; then
git add docs
git commit -m "chore (workflow): update documentation"
else
echo ""
echo "::warning:: WARNING!!! No changes to documentation files."
echo " Double check the version nr and everything else is up to date."
echo ""
git commit --allow-empty -m "chore (workflow): no changes to documentation"
fi
- name: Push changes
uses: ad-m/github-push-action@master
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/qe_N-motions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Riksdagen Motions: Number of motions"

on:
pull_request:
branches:
- 'dev'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
- name: Count number of Motions
run: |
python quality/qe_N-motions.py
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [[ `git status quality/estimates/N-motions/ --porcelain --untracked-files=no` ]]; then
git add quality/estimates/N-motions/
git commit -m "chore (workflow): update Motion Counts"
else
echo ""
echo "::warning:: WARNING!!! No changes detected in quality/estimates/N-motions/."
echo " Double check the version nr and everything else is up to date."
echo ""
git commit --allow-empty -m "chore (workflow): no changes to motion counts"
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ jobs:
run: |
zip -r motions.zip data
- name: zip quality estimates
run: zip -r quality.zip quality/estimates

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: motions.zip
file: ./*.zip
tag: ${{ github.ref }}
file_flob: true
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cff-version: 1.2.0
message: To cite this reposository, please use these metadata.
title: "The Swedish Parliament Corpus: Riksdagen Motions"
version: v0.0.0
version: v0.2.1
authors:
- given-names: Väinö
family-names: Yrjänäinen
Expand Down
1 change: 1 addition & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""
.. include:: README.md
"""
6 changes: 4 additions & 2 deletions docs/riksdagen-motions.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ <h2>Contents</h2>

<h2>Submodules</h2>
<ul>
<li><a href="riksdagen-motions/quality.html">quality</a></li>
<li><a href="riksdagen-motions/test.html">test</a></li>
</ul>


<footer>v1.7.0</footer>
<footer>v0.2.1</footer>

<a class="attribution" title="pdoc: Python API documentation generator" href="https://pdoc.dev" target="_blank">
built with <span class="visually-hidden">pdoc</span><img
Expand Down Expand Up @@ -93,7 +94,8 @@ <h2 id="how-to-cite">How to cite?</h2>

<div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos">1</span></a><span class="sd">&quot;&quot;&quot;</span>
</span><span id="L-2"><a href="#L-2"><span class="linenos">2</span></a><span class="sd">.. include:: README.md</span>
</span><span id="L-3"><a href="#L-3"><span class="linenos">3</span></a><span class="sd">&quot;&quot;&quot;</span>
</span><span id="L-3"><a href="#L-3"><span class="linenos">3</span></a>
</span><span id="L-4"><a href="#L-4"><span class="linenos">4</span></a><span class="sd">&quot;&quot;&quot;</span>
</span></pre></div>


Expand Down
269 changes: 269 additions & 0 deletions docs/riksdagen-motions/quality.html

Large diffs are not rendered by default.

368 changes: 368 additions & 0 deletions docs/riksdagen-motions/quality/qe_N-motions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/riksdagen-motions/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h2>Submodules</h2>
</ul>


<footer>v1.7.0</footer>
<footer>v0.2.1</footer>

<a class="attribution" title="pdoc: Python API documentation generator" href="https://pdoc.dev" target="_blank">
built with <span class="visually-hidden">pdoc</span><img
Expand Down
Loading

0 comments on commit efc40a3

Please sign in to comment.