Skip to content

Commit 5dd9be4

Browse files
authored
Merge pull request #193 from andylolz/183-anonymise
Replace personal and org data in test files
2 parents 4220273 + 19e4555 commit 5dd9be4

11 files changed

+89
-89
lines changed

flattentool/tests/fixtures/SOURCES

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ tenders_releases_base.json
1313
Source: Same as tenders_releases_2_releases.json (but with the releases key removed)
1414
License: http://data.gc.ca/eng/open-government-licence-canada
1515

16-
WellcomeTrust-grants_fixed_2_grants.json
17-
Source: http://data.threesixtygiving.org/dataset/welcome-trust-grants-awarded
18-
(but with the key "Grants" changed to "grants" and truncated to to releases)
16+
fundingproviders-grants_fixed_2_grants.json
17+
Source: Edited version of data from http://data.threesixtygiving.org/dataset/welcome-trust-grants-awarded
18+
(converted to different formats; key "Grants" changed to "grants"; truncated to two releases; personal and organization indentifiers replaced)
1919
License: Creative Commons Attribution

flattentool/tests/fixtures/WellcomeTrust-grants_fixed_2_grants.json

Lines changed: 0 additions & 80 deletions
This file was deleted.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"grants": [
3+
{
4+
"currency": "GBP",
5+
"grantProgramme": [
6+
{
7+
"code": "AAC",
8+
"title": "Awards Funding Committee"
9+
}
10+
],
11+
"id": "360G-fundingproviders-000001/X/00/X",
12+
"Co-applicant(s)": "Miss Hypatia Alexandria, Mr Thomas Aquinas",
13+
"title": "Title A",
14+
"fundingOrganization": [
15+
{
16+
"id": "GB-CHC-000000",
17+
"name": "Funding Providers UK"
18+
}
19+
],
20+
"dateModified": "13-03-2015",
21+
"dataSource": "http://www.fundingproviders.co.uk/grants/",
22+
"plannedDates": [
23+
{
24+
"duration": "30"
25+
}
26+
],
27+
"Surname of applicant": "Roe",
28+
"Grant number": "000001/X/00/X",
29+
"amountAwarded": 152505,
30+
"recipientOrganization": [
31+
{
32+
"addressLocality": "London",
33+
"name": "Company Name Limited"
34+
}
35+
],
36+
"Grant type": "Large Awards",
37+
"Full name of applicant": "Miss Jane Roe",
38+
"awardDate": "24/07/2014"
39+
},
40+
{
41+
"recipientOrganization": [
42+
{
43+
"id": "GB-COH-RC000000",
44+
"addressLocality": "Leicester",
45+
"name": "University of UK",
46+
"companyNumber": "RC000000"
47+
}
48+
],
49+
"currency": "GBP",
50+
"grantProgramme": [
51+
{
52+
"code": "AAC",
53+
"title": "Awards Funding Committee"
54+
}
55+
],
56+
"Department": "Department of Studies",
57+
"id": "360G-fundingproviders-000002/X/00/X",
58+
"title": "Title B",
59+
"fundingOrganization": [
60+
{
61+
"id": "GB-CHC-000000",
62+
"name": "Funding Providers UK"
63+
}
64+
],
65+
"dateModified": "13-03-2015",
66+
"dataSource": "http://www.fundingproviders.co.uk/grants/",
67+
"plannedDates": [
68+
{
69+
"duration": "25"
70+
}
71+
],
72+
"Surname of applicant": "Doe",
73+
"Grant number": "000002/X/00/X",
74+
"amountAwarded": 178990,
75+
"Grant type": "Large Awards",
76+
"Full name of applicant": "Prof John Doe",
77+
"awardDate": "24/07/2014"
78+
}
79+
]
80+
}
-5.86 KB
Binary file not shown.
-5.73 KB
Binary file not shown.
-5.86 KB
Binary file not shown.
6.39 KB
Binary file not shown.
6.39 KB
Binary file not shown.
9.37 KB
Binary file not shown.

flattentool/tests/test_roundtrip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_roundtrip(tmpdir, output_format):
3838
@pytest.mark.parametrize('use_titles', [False, True])
3939
@pytest.mark.parametrize('output_format', ['xlsx', 'csv'])
4040
def test_roundtrip_360(tmpdir, output_format, use_titles):
41-
input_name = 'flattentool/tests/fixtures/WellcomeTrust-grants_fixed_2_grants.json'
41+
input_name = 'flattentool/tests/fixtures/fundingproviders-grants_fixed_2_grants.json'
4242
flatten(
4343
input_name=input_name,
4444
output_name=tmpdir.join('flattened').strpath+'.'+output_format,
@@ -64,7 +64,7 @@ def test_roundtrip_360(tmpdir, output_format, use_titles):
6464

6565
@pytest.mark.parametrize('use_titles', [False, True])
6666
def test_roundtrip_360_rollup(tmpdir, use_titles):
67-
input_name = 'flattentool/tests/fixtures/WellcomeTrust-grants_fixed_2_grants.json'
67+
input_name = 'flattentool/tests/fixtures/fundingproviders-grants_fixed_2_grants.json'
6868
output_format = 'csv'
6969
output_name = tmpdir.join('flattened').strpath+'.'+output_format
7070
moved_name = tmpdir.mkdir('flattened_main_only').strpath

0 commit comments

Comments
 (0)