Generate the whole Consumer Trends package from its workbook, before the 22 December release
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- jupyter-notebook, python, yaml
- Lĩnh vực
- data-engineering, tooling
Hướng nghiên cứu
Start with scripts/build_uk_consumption_tax_packages.py and the pinned cpnsa.xlsx; trace how build_ons() combines workbook data with the seven legacy series and package metadata in YAML. Define the edition constants and generate the full package, preserving record order, ids, concepts, labels and notes. Verify that building without the YAML reproduces the committed file byte for byte, then run the five listed Consumer Trends tests and update the three named documentation sections.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
ons-consumer-trends-current-price-september-2026(#384) cannot be built from its workbook alone.build_ons()inscripts/build_uk_consumption_tax_packages.pyreads the package's own YAML. From that file it takes the package skeleton and the 217 record sets of the seven series that predate #322.- From the workbook it only refreshes those series' column headers, CDID guards and shared dimensions, and regenerates every
expanded_record set. - ONS's next Consumer Trends release is 22 December 2026. Its package should come from the workbook, not from another renamed copy of this file.
- Raised in review of #384: round 1, finding 1, and round 2.
How it came about
The workbook gives values, headers and series codes. It does not give Chronicle's naming choices for these series: concepts such as ons.household_expenditure.gas, record-set ids such as 04cn_04_5_2.cy2024, each series' labels and notes, and the "Q1 2020" quarter label. Those choices exist only in the YAML.
- bfd88bd8 (9 September) committed the first Consumer Trends package directly as YAML, with no generator.
- a362d1e8 (10 September) and d921b513 (15 September) edited that YAML to add quarters and the 04.5.1 to 04.5.4 subclasses.
- 01e5316e (8 October, #322) added the first generator. It had to keep the existing facts' ids and concepts unchanged, because Microcosm vendors those rows. So it reads those record sets back from the YAML and generates only the new ones.
- #384 made the September package by copying the June YAML and renaming its ids.
What the script takes from the YAML
The seven older series.
- They are:
- 04.5, electricity, gas and other fuels;
- 04.5.1, electricity;
- 04.5.2, gas;
- 04.5.3, liquid fuels;
- 04.5.4, solid fuels;
- 07.2.2, fuels and lubricants for personal transport equipment;
- 07.3.2, passenger transport by road.
- Their record-set groups are
04cn,04cn_04_5_1to04cn_04_5_4,07cn_07_2_2and07cn_07_3_2.- Each group has 31 periods: calendar years 2020 to 2025 and quarters 2020 Q1 to 2026 Q1.
- Each record set has one row and one measure.
- They keep their specific
ons.household_expenditure.*concepts, where the expanded series useons.household_final_consumption_expenditure. - They come from earlier packages. #384 carried them from the June package to the September one by renaming their ids.
The package skeleton. schema_version, package_id, label, dimension_labels, dimension_value_labels and artifact.
With the YAML deleted, build_ons() fails with FileNotFoundError.
Requested
build_ons()builds the whole package from the pinnedcpnsa.xlsxand constants in the script.- With the YAML deleted, it writes the committed file back byte for byte. The built facts are identical, including their aggregate and semantic keys.
- The seven series keep their current shape, quirks included:
- their quarterly
source_period_labelreads "Q1 2020", where the expanded record sets read "2020 Q1"; - each series has its own measure label and
concept_evidence_notes; - the record sets and their keys keep their order.
- their quarterly
- The edition is a set of constants: package directory, workbook, id prefix, vintage and last quarter. The December package is then a change of constants plus a new archive.
- These now say the package is generated from the workbook:
- the script's docstring and
ONS_COMMENTheader; - "Authoring and verification" in
docs/uk-consumption-tax-facts.md; - section 2 of
docs/data-sources/uk-excise-facts.md.
- the script's docstring and
Out of scope.
- The December release itself, and with it 2026 Q2, which waits for that refresh.
- Any change to the seven series' concepts or ids.
Checks.
- The Consumer Trends tests pass:
tests/test_source_uk_consumption_tax_facts.py;tests/test_issue_254_transport_energy_sources.py;tests/test_issue_257_transport_energy_followups.py;tests/test_issue_270_need_ons_followups.py;tests/test_issue_381_uk_excise_facts.py.
- If the facts are identical, no bundle pin moves.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 3
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 65
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/chronicle
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
PolicyEngine/chronicle#420 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 50/100
PolicyEngine/chronicle#418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
PolicyEngine/chronicle#398 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
PolicyEngine/chronicle#362 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
PolicyEngine/chronicle#346 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PolicyEngine/chronicle
Issue tương tự
-
area: providers/aws priority: p2 size: S type: bug type: testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
finos/open-resource-broker#851 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
sandialabs/atlas-ui-3#1196 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ShaftHQ/SHAFT_ENGINE#7902 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: GraphML export writes invalid XML when a value contains a control character (e.g. form feed)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
topoteretes/cognee#6646 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
DOI-USGS/pywatershed#428 ·