Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #490 from welfare-state-analytics/dep
Browse files Browse the repository at this point in the history
Deprecate Repo
  • Loading branch information
BobBorges authored May 3, 2024
2 parents 134f94b + 87d3b4d commit 7ac3575
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[![Unit tests](https://github.com/welfare-state-analytics/riksdagen-corpus/actions/workflows/push.yml/badge.svg)](https://github.com/welfare-state-analytics/riksdagen-corpus/actions/workflows/push.yml)
[![Validate Parla-Clarin XML](https://github.com/welfare-state-analytics/riksdagen-corpus/actions/workflows/validate.yml/badge.svg)](https://github.com/welfare-state-analytics/riksdagen-corpus/actions/workflows/validate.yml)

# DEPRECATION NOTICE

The Swedish Parliament Corpus has moved over to the [SWERIK Project](https://github.com/swerik-project/the-swedish-parliament-corpus) github page. v.0.14.0 was the last release under this repository. Please visit the new repo for the most up-to-date releases.

# Swedish parliamentary proceedings --- 1867--today --- v0.14.0

Expand Down
5 changes: 5 additions & 0 deletions test/chairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def get_duplicated_items(self, l):
# -------------------------------------------
#
# check chair IDs are unique
@unittest.skip
def test_unique_chair_id(self):
print("Testing: chairs have unique IDs")
chairs = self.get_chairs()
Expand All @@ -175,6 +176,7 @@ def test_unique_chair_id(self):
self.assertEqual(len(chair_ids), len(set(chair_ids)))

# check no chairs are numbered higher than the max chair nr for that chamber
@unittest.skip
def test_chair_nrs_in_range(self):
print("Testing: chairs within max range for chamber")
chairs = self.get_chairs()
Expand All @@ -190,6 +192,7 @@ def test_chair_nrs_in_range(self):
# --------------------------------
#
# check chair IDs in chair_mp are the same set as chairs
@unittest.skip
def test_chair_id_sets(self):
print("Testing: chair ids are the same set in chairs.csv and chair_mp.csv")
chairs = self.get_chairs()
Expand All @@ -201,6 +204,7 @@ def test_chair_id_sets(self):
self.assertEqual(len(chair_ids_a), len(chair_ids_b))

# check no chairs from tvåkammartiden are used in enkammartid and vice-versa
@unittest.skip
def test_chair_chambertime_concurrence(self):
print("Testing: no chairs from tvåkammartiden are used in enkammartid and vice-versa")
chairs = self.get_chairs()
Expand Down Expand Up @@ -233,6 +237,7 @@ def test_chair_chambertime_concurrence(self):
# check that chairs are within acceptable range for a given year
# and that every seat within that range is present at least once
# in the chair_mp file (whether filled or not)
@unittest.skip
def test_chair_nrs_in_range_for_year(self):
print("Testing: chairs are within acceptable range for a given year\n and that every seat within that range is present at least once")
chairs = self.get_chairs()
Expand Down
10 changes: 7 additions & 3 deletions test/pytestconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
This is a mini module for repetitive functions related to this strategy for passing params to unittests.
"""
import json


import inspect, json, os

def caller():
for frame in inspect.stack()[1:]:
if frame.filename[0] != '<':
print(os.path.dirname(os.path.relpath(frame.filename)))
break

def fetch_config(test):
caller()
try:
with open("test/_test_config/test.json", 'r') as j:
d = json.load(j)
Expand Down

0 comments on commit 7ac3575

Please sign in to comment.