Skip to content

Commit

Permalink
Updated to latest version of dataset manager
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Oct 31, 2023
1 parent 4d1ce42 commit c387ce7
Show file tree
Hide file tree
Showing 205 changed files with 337 additions and 6,239,793 deletions.
94 changes: 0 additions & 94 deletions .github/actions/cached-build/action.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/actions/in-dev-container/action.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ jobs:
submodules: 'recursive'

- name: Run tests and try and build project
uses: ./.github/actions/in-dev-container
uses: mysociety/run-in-devcontainer@v1
with:
run: |
export PATH="/root/.local/bin:$PATH"
script/test
dataset build --all
dataset version auto --auto-ban major --all --publish
dataset publish --all
- name: Push new data
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
submodules: 'recursive'

- name: Run project tests
uses: ./.github/actions/in-dev-container
uses: mysociety/run-in-devcontainer@v1
with:
run: |
export PATH="/root/.local/bin:$PATH"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ _render/_parts
_render/_papermills
docs/_site
data/raw/people.json
docs/_site
docs/data
docs/_*
11 changes: 6 additions & 5 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM ghcr.io/mysociety/data_common:sha-280e8f3
FROM ghcr.io/mysociety/data_common:sha-d6eabdb

# Make an empty project directory so the 'self' setup doesn't fail and scripts can be setup
# Override the .pth created at previous stages to point to where the working directory will land
COPY pyproject.toml poetry.loc[k] /setup/
COPY src/data_common/pyproject.toml src/data_common/poetry.loc[k] /setup/src/data_common/
RUN mkdir /setup/src/politician_data \
&& touch /setup/src/politician_data/__init__.py \
ENV WORKSPACE_NAME politician_data
RUN mkdir /setup/src/$WORKSPACE_NAME \
&& touch /setup/src/$WORKSPACE_NAME/__init__.py \
&& mkdir --parents /setup/src/data_common/src/data_common \
&& touch /setup/src/data_common/src/data_common/__init__.py \
&& export PATH="/root/.local/bin:$PATH" \
&& cd /setup/ && poetry install \
&& echo "/workspaces/politician_data/src/" > /usr/local/lib/python3.10/site-packages/politician_data.pth \
&& echo "/workspaces/politician_data/src/data_common/src" > /usr/local/lib/python3.10/site-packages/data_common.pth
&& echo "/workspaces/$WORKSPACE_NAME/src/" > /usr/local/lib/python3.10/site-packages/$WORKSPACE_NAME.pth \
&& echo "/workspaces/$WORKSPACE_NAME/src/data_common/src" > /usr/local/lib/python3.10/site-packages/data_common.pth
Binary file modified data/packages/uk_politician_data/membership_identifiers.parquet
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Alternative membership identifiers
description: Map between our membership IDs and other schemes
custom:
row_count: 40946
row_count: 41345
path: membership_identifiers.parquet
name: membership_identifiers
profile: data-resource
Expand Down Expand Up @@ -30,10 +30,10 @@ schema:
constraints:
unique: false
enum:
- peeragetype
- datadotparl_id
- pims_id
- historichansard_id
- peeragetype
- pims_id
- wikidata
example: datadotparl_id
hash: 28b3ab9695270053d82dc3f0cf63bf09
hash: 07f1d7400433e9deb533c230afb8f841
Binary file modified data/packages/uk_politician_data/memberships.parquet
Binary file not shown.
4 changes: 2 additions & 2 deletions data/packages/uk_politician_data/memberships.resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ title: Memberships
description: Table of memberships (a membership is connection between a person, post
and time)
custom:
row_count: 46067
row_count: 46490
path: memberships.parquet
name: memberships
profile: data-resource
Expand Down Expand Up @@ -91,4 +91,4 @@ schema:
constraints:
unique: false
example: changed_party
hash: a925e786b61607f883adaf78fe4dc2b3
hash: 37ab4acf8e98ef35ee62d962d8acd5e8
Binary file modified data/packages/uk_politician_data/organization_identifiers.parquet
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Organization identifiers
description: Map between our organization IDs and other schemes
custom:
row_count: 5
row_count: 10
path: organization_identifiers.parquet
name: organization_identifiers
profile: data-resource
Expand All @@ -17,23 +17,33 @@ schema:
constraints:
unique: true
enum:
- blaenau-gwent-peoples-voice
- brexit-alliance
- conservative
- independent
- john-marek-independent-party
- labour
- liberal-democrat
- non-attached
- plaid-cymru
- ukip
example: brexit-alliance
example: blaenau-gwent-peoples-voice
- name: identifier
type: string
description: The identifier of the organization in the other scheme
constraints:
unique: true
enum:
- Q10647
- Q10691
- Q2415493
- Q327591
- Q4923798
- Q61586635
- Q6246716
- Q9624
- Q9626
- Q9630
- Q9624
- Q10647
example: Q10647
- name: scheme
type: string
Expand All @@ -43,4 +53,4 @@ schema:
enum:
- wikidata
example: wikidata
hash: 020bf1a377da252e7c99a27a4f1ff36e
hash: e66893264309a7c74c5805f95625c958
Binary file modified data/packages/uk_politician_data/organizations.parquet
Binary file not shown.
4 changes: 2 additions & 2 deletions data/packages/uk_politician_data/organizations.resource.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Organizations
description: List of organizations (parties)
custom:
row_count: 46
row_count: 50
path: organizations.parquet
name: organizations
profile: data-resource
Expand Down Expand Up @@ -29,4 +29,4 @@ schema:
constraints:
unique: true
example: Alba
hash: 6ff4731e1f8b4bd0a57870348e323913
hash: 3b106e01a477cbe8283a5a023363c99b
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Person names
description: Multiple names for people
custom:
row_count: 14864
row_count: 15026
path: person_alternative_names.parquet
name: person_alternative_names
profile: data-resource
Expand Down Expand Up @@ -35,8 +35,8 @@ schema:
constraints:
unique: false
enum:
- Main
- Alternate
- Main
example: Alternate
- name: end_date
type: string
Expand Down Expand Up @@ -122,4 +122,4 @@ schema:
constraints:
unique: false
example: Ahmad
hash: cb5d22401c4f2b0ea4b5e8fd06399eb4
hash: 5ca3c52449fe13341474373e9e59a238
Binary file modified data/packages/uk_politician_data/person_identifiers.parquet
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Person identifiers
description: Map between our person IDs and other schemes
custom:
row_count: 21040
row_count: 21310
path: person_identifiers.parquet
name: person_identifiers
profile: data-resource
Expand Down Expand Up @@ -29,12 +29,13 @@ schema:
constraints:
unique: false
enum:
- historichansard_person_id
- data.niassembly.gov.uk
- datadotparl_id
- yournextmp
- historichansard_person_id
- historichansard_url
- pims_id
- senedd
- wikidata
- historichansard_url
- data.niassembly.gov.uk
- yournextmp
example: data.niassembly.gov.uk
hash: cb909a3ee7cf9c5a34eb05dfc706b93c
hash: e35a43c953c5bb21744ef49e9dc9d33c
Binary file modified data/packages/uk_politician_data/persons.parquet
Binary file not shown.
4 changes: 2 additions & 2 deletions data/packages/uk_politician_data/persons.resource.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Persons table
description: List of people (many specific details are in the memberships table)
custom:
row_count: 14061
row_count: 14218
path: persons.parquet
name: persons
profile: data-resource
Expand Down Expand Up @@ -35,4 +35,4 @@ schema:
constraints:
unique: false
example: Alliance
hash: 0bff7ecdc9b249f2fa089dad4ea1e177
hash: abbc31b4b64a4af9eec4832c211567ef
Binary file modified data/packages/uk_politician_data/post_identifiers.parquet
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Post Identifiers
description: Map between our IDs for posts and alternative schemes
custom:
row_count: 2143
row_count: 2191
path: post_identifiers.parquet
name: post_identifiers
profile: data-resource
Expand Down Expand Up @@ -30,5 +30,6 @@ schema:
unique: false
enum:
- historichansard_id
- wikidata
example: historichansard_id
hash: ca857df8330d3c6600f4ad98ce613f7e
hash: e66954b41cb3fa572af46f5b7b274523
Binary file modified data/packages/uk_politician_data/posts.parquet
Binary file not shown.
Loading

0 comments on commit c387ce7

Please sign in to comment.