File tree Expand file tree Collapse file tree
policyengine_uk_data/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 HUGGING_FACE_TOKEN : ${{ secrets.HUGGING_FACE_TOKEN }}
7171 - name : Publish a git tag
7272 run : " .github/publish-git-tag.sh || true"
73- - name : Publish a Python distribution to PyPI
74- uses : pypa/gh-action-pypi-publish@release/v1
75- with :
76- user : __token__
77- password : ${{ secrets.PYPI }}
78- skip-existing : true
79- verbose : true
Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ install:
1212 pip install -e " .[dev]" --config-settings editable_mode=compat
1313
1414install-uv :
15- uv pip install --system policyengine-uk
16- uv pip install --system policyengine> =2.40.2
15+ uv pip install --system " jupyter-book>=2.0.0a0"
1716 uv pip install --system -e " .[dev]" --config-settings editable_mode=compat
1817
1918download :
3736 python policyengine_uk_data/datasets/frs/local_areas/constituencies/calibrate.py
3837 python policyengine_uk_data/datasets/frs/local_areas/local_authorities/calibrate.py
3938 python policyengine_uk_data/utils/create_multi_year_dataset.py
39+ python policyengine_uk_data/storage/migrate_to_uk_single_year_datasets.py
4040
4141efrs :
4242 python policyengine_uk_data/datasets/frs/enhanced_frs.py
Original file line number Diff line number Diff line change 1+ - bump : patch
2+ changes :
3+ fixed :
4+ - Migrated to more efficient dataset version.
Original file line number Diff line number Diff line change 1+ from policyengine_uk .data import UKSingleYearDataset
2+ from policyengine_uk import Microsimulation
3+ from policyengine_core .data import Dataset
4+ from policyengine_uk_data .datasets import EnhancedFRS_2023_24 , FRS_2023_24
5+
6+
7+ def migrate_to_uk_single_year_dataset (file_path : str ):
8+ sim = Microsimulation (dataset = Dataset .from_file (file_path ))
9+
10+ single_year_dataset = UKSingleYearDataset .from_simulation (
11+ sim , fiscal_year = 2023
12+ )
13+
14+ single_year_dataset .save (file_path )
15+
16+
17+ if __name__ == "__main__" :
18+ migrate_to_uk_single_year_dataset (FRS_2023_24 .file_path )
19+ migrate_to_uk_single_year_dataset (EnhancedFRS_2023_24 .file_path )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ dependencies = [
2222 " google-cloud-storage" ,
2323 " google-auth" ,
2424 " uk-public-services-imputation" ,
25- " policyengine-uk> =2.40.2" ,
25+ " policyengine-uk= =2.40.2" ,
2626]
2727
2828[project .optional-dependencies ]
@@ -32,7 +32,6 @@ dev = [
3232 " torch" ,
3333 " tables" ,
3434 " furo" ,
35- " jupyter-book" ,
3635 " yaml-changelog>=0.1.7" ,
3736 " itables" ,
3837 " quantile-forest" ,
You can’t perform that action at this time.
0 commit comments