ppuzio commited on
Commit
11ab4b4
·
1 Parent(s): ad9fbf4

govpl: card names the licence basis and the earlier footers (v2#106) (#171)

Browse files

- govpl: card names the licence basis and the earlier footers (v2#106) (7012c992ed0403fa0f139fc56eb70729d8027f24)

data/govpl/govpl.md CHANGED
@@ -11,7 +11,7 @@ gov.pl — Polish government press releases
11
  - **Added:** 2026-07-19; PAP reprints removed 2026-10-06; other third-party texts removed 2026-10-19
12
 
13
  ## Licensing — traceable basis
14
- gov.pl publishes its text under CC BY-SA 4.0 (site footer and https://www.gov.pl/web/gov/prawa-autorskie: "Treści tekstowe publikowane w serwisie … są udostępniane na licencji CC BY-SA 4.0"). The same page excludes works whose copyright belongs to third parties; using those needs the owners' consent. Articles crediting PAP and other third-party texts are therefore dropped (legal note).
15
 
16
  ## Provenance
17
  Ministry/agency press releases fetched directly from gov.pl (editor-content per article, HTML stripped) by src/fetch_govpl.py. Subsites + their non-uniform news-section paths are enumerated by src/discover_govpl.py into the committed manifest src/govpl_subsites.json (gov.pl has no sitemap/API). v0.2.6 removes PAP reprints and the third-party texts listed in govpl.third-party-review.csv from the v0.2.5 Parquet with src/clean_govpl.py, which also writes govpl.attribution.jsonl: each row's gov.pl URL, subsite, title and date.
 
11
  - **Added:** 2026-07-19; PAP reprints removed 2026-10-06; other third-party texts removed 2026-10-19
12
 
13
  ## Licensing — traceable basis
14
+ gov.pl offers its text under CC BY-SA 4.0. The site footer and https://www.gov.pl/web/gov/prawa-autorskie say: "Treści tekstowe publikowane w serwisie (z wyłączeniem treści audiowizualnych), są udostępniane na licencji typu Creative Commons: uznanie autorstwa - na tych samych warunkach 4.0 (CC BY-SA 4.0)." All rows rely on this offer as it stood when they were fetched (2026-07-19). Wayback captures of the page from 2026-07-18 (https://web.archive.org/web/20260718065324/https://www.gov.pl/web/gov/prawa-autorskie) and 2026-10-15 (https://web.archive.org/web/20261015193442/https://www.gov.pl/web/gov/prawa-autorskie) show the same text. Earlier footers were different: CC BY 3.0 PL from the first capture (2019-08-05) to 2022-08-17, CC BY-NC-ND 3.0 PL from 2022-08-19 to 2025-12-12, and today's text from 2025-12-18. By the date listed on gov.pl, 40,708 rows date from the CC BY-NC-ND 3.0 PL period, 26,974 from the CC BY 3.0 PL period and 9,910 from before 2019-08-05. That today's offer also covers texts first published under an earlier footer is our reading; it is not certain. The same page excludes works whose copyright belongs to third parties; using those needs the owners' consent. Articles crediting PAP and other third-party texts are therefore dropped (legal note).
15
 
16
  ## Provenance
17
  Ministry/agency press releases fetched directly from gov.pl (editor-content per article, HTML stripped) by src/fetch_govpl.py. Subsites + their non-uniform news-section paths are enumerated by src/discover_govpl.py into the committed manifest src/govpl_subsites.json (gov.pl has no sitemap/API). v0.2.6 removes PAP reprints and the third-party texts listed in govpl.third-party-review.csv from the v0.2.5 Parquet with src/clean_govpl.py, which also writes govpl.attribution.jsonl: each row's gov.pl URL, subsite, title and date.
src/sources.py CHANGED
@@ -752,13 +752,26 @@ SOURCES = {
752
  "pretty": "gov.pl — Polish government press releases",
753
  "license": "CC-BY-SA-4.0",
754
  "license_spdx": "CC-BY-SA-4.0",
755
- "traceable": "gov.pl publishes its text under CC BY-SA 4.0 (site footer and "
756
- "https://www.gov.pl/web/gov/prawa-autorskie: \"Treści tekstowe "
757
- "publikowane w serwisie … są udostępniane na licencji CC BY-SA "
758
- "4.0\"). The same page excludes works whose copyright belongs to "
759
- "third parties; using those needs the owners' consent. Articles "
760
- "crediting PAP and other third-party texts are therefore "
761
- "dropped (legal note).",
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  "upstream": "https://www.gov.pl/",
763
  "provenance": "Ministry/agency press releases fetched directly from gov.pl "
764
  "(editor-content per article, HTML stripped) by "
 
752
  "pretty": "gov.pl — Polish government press releases",
753
  "license": "CC-BY-SA-4.0",
754
  "license_spdx": "CC-BY-SA-4.0",
755
+ "traceable": "gov.pl offers its text under CC BY-SA 4.0. The site footer and "
756
+ "https://www.gov.pl/web/gov/prawa-autorskie say: \"Treści tekstowe "
757
+ "publikowane w serwisie (z wyłączeniem treści audiowizualnych), są "
758
+ "udostępniane na licencji typu Creative Commons: uznanie autorstwa - na "
759
+ "tych samych warunkach 4.0 (CC BY-SA 4.0).\" All rows rely on this offer "
760
+ "as it stood when they were fetched (2026-07-19). Wayback captures of the "
761
+ "page from 2026-07-18 "
762
+ "(https://web.archive.org/web/20260718065324/https://www.gov.pl/web/gov/prawa-autorskie) "
763
+ "and 2026-10-15 "
764
+ "(https://web.archive.org/web/20261015193442/https://www.gov.pl/web/gov/prawa-autorskie) "
765
+ "show the same text. Earlier footers were different: CC BY 3.0 PL from "
766
+ "the first capture (2019-08-05) to 2022-08-17, CC BY-NC-ND 3.0 PL from "
767
+ "2022-08-19 to 2025-12-12, and today's text from 2025-12-18. By the date "
768
+ "listed on gov.pl, 40,708 rows date from the CC BY-NC-ND 3.0 PL period, "
769
+ "26,974 from the CC BY 3.0 PL period and 9,910 from before 2019-08-05. "
770
+ "That today's offer also covers texts first published under an earlier "
771
+ "footer is our reading; it is not certain. The same page excludes works "
772
+ "whose copyright belongs to third parties; using those needs the owners' "
773
+ "consent. Articles crediting PAP and other third-party texts are "
774
+ "therefore dropped (legal note).",
775
  "upstream": "https://www.gov.pl/",
776
  "provenance": "Ministry/agency press releases fetched directly from gov.pl "
777
  "(editor-content per article, HTML stripped) by "
src/test_govpl_contract.py CHANGED
@@ -5,6 +5,7 @@ import re
5
  import sys
6
  import unittest
7
  from collections import Counter
 
8
  from pathlib import Path
9
 
10
  import pyarrow.parquet as pq
@@ -187,6 +188,29 @@ class GovplReleaseContractTest(unittest.TestCase):
187
  for key in ("traceable", "provenance", "legal_note"):
188
  self.assertIn(SOURCES["govpl"][key], md, key)
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  def test_sidecar_gives_every_row_a_govpl_url(self):
191
  self.assertEqual([a["id"] for a in self.sidecar], self.table.column("id").to_pylist())
192
  for a in self.sidecar:
 
5
  import sys
6
  import unittest
7
  from collections import Counter
8
+ from datetime import date, datetime
9
  from pathlib import Path
10
 
11
  import pyarrow.parquet as pq
 
188
  for key in ("traceable", "provenance", "legal_note"):
189
  self.assertIn(SOURCES["govpl"][key], md, key)
190
 
191
+ def test_footer_period_counts_match_card(self):
192
+ # Footer licence by Wayback capture of /web/gov/prawa-autorskie (v2 evidence/govpl_prawa-autorskie_2026-10-19.md):
193
+ # first capture 2019-08-05, CC BY 3.0 PL to 2022-08-17, CC BY-NC-ND 3.0 PL 2022-08-19 to 2025-12-12.
194
+ # A row dated on a capture day counts with that capture's footer; typo dates (year < 2000, after the crawl) are left out.
195
+ periods = Counter()
196
+ for a in self.sidecar:
197
+ try:
198
+ d = datetime.strptime(a["date"], "%d.%m.%Y").date()
199
+ except ValueError:
200
+ continue
201
+ if d.year < 2000 or d > date(2026, 7, 19):
202
+ continue
203
+ if d < date(2019, 8, 5):
204
+ periods["before 2019-08-05"] += 1
205
+ elif d <= date(2022, 8, 17):
206
+ periods["CC BY 3.0 PL"] += 1
207
+ elif date(2022, 8, 19) <= d <= date(2025, 12, 12):
208
+ periods["CC BY-NC-ND 3.0 PL"] += 1
209
+ traceable = SOURCES["govpl"]["traceable"]
210
+ self.assertIn(f"{periods['CC BY-NC-ND 3.0 PL']:,} rows date from the CC BY-NC-ND 3.0 PL period", traceable)
211
+ self.assertIn(f"{periods['CC BY 3.0 PL']:,} from the CC BY 3.0 PL period", traceable)
212
+ self.assertIn(f"{periods['before 2019-08-05']:,} from before 2019-08-05", traceable)
213
+
214
  def test_sidecar_gives_every_row_a_govpl_url(self):
215
  self.assertEqual([a["id"] for a in self.sidecar], self.table.column("id").to_pylist())
216
  for a in self.sidecar: