Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/changelog_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

{{changelog}}
2 changes: 2 additions & 0 deletions .github/get-changelog-diff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
last_tagged_commit=`git describe --tags --abbrev=0 --first-parent`
git --no-pager diff $last_tagged_commit -- CHANGELOG.md
8 changes: 7 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build changelog
run: pip install yaml-changelog && make changelog
- name: Preview changelog update
run: ".github/get-changelog-diff.sh"
- name: Check version number has been properly updated
run: ".github/is-version-number-acceptable.sh"
Test:
Expand All @@ -41,7 +47,7 @@ jobs:
- name: Install libyaml
run: pip3 uninstall pyyaml && pip3 install pyyaml --no-cache-dir
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
uses: google-github-actions/setup-gcloud@v0
with:
project_id: uk-policy-engine
service_account_key: ${{ secrets.POLICYENGINE_UK_DATA_READ }}
Expand Down
40 changes: 38 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,48 @@ on:
jobs:
Lint:
runs-on: ubuntu-latest
if: |
(github.repository == 'PolicyEngine/openfisca-uk')
&& (github.event.head_commit.message == 'Update OpenFisca-UK')
steps:
- uses: actions/checkout@v2
- name: Check formatting
uses: "lgeiger/black-action@master"
with:
args: ". -l 79 --check"
versioning:
name: Update versioning
if: |
(github.repository == 'PolicyEngine/openfisca-uk')
&& !(github.event.head_commit.message == 'Update OpenFisca-UK')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.POLICYENGINE_GITHUB }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build changelog
run: pip install yaml-changelog && make changelog
- name: Preview changelog update
run: ".github/get-changelog-diff.sh"
- name: Update changelog
uses: EndBug/add-and-commit@v8
with:
add: "."
committer_name: Github Actions[bot]
author_name: Github Actions[bot]
message: Update PolicyEngine
Test:
runs-on: ${{ matrix.os }}
if: |
(github.repository == 'PolicyEngine/openfisca-uk')
&& (github.event.head_commit.message == 'Update OpenFisca-UK')
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
Expand All @@ -28,7 +62,7 @@ jobs:
- name: Install libyaml
run: pip3 uninstall pyyaml && pip3 install pyyaml --no-cache-dir
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
uses: google-github-actions/setup-gcloud@v0
with:
project_id: uk-policy-engine
service_account_key: ${{ secrets.POLICYENGINE_UK_DATA_READ }}
Expand All @@ -50,7 +84,9 @@ jobs:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/book/_build/html # The folder the action should deploy.
Publish:
if: github.repository == 'PolicyEngine/openfisca-uk'
if: |
(github.repository == 'PolicyEngine/openfisca-uk')
&& (github.event.head_commit.message == 'Update OpenFisca-UK')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand Down
24 changes: 24 additions & 0 deletions .vscode/yaml.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,29 @@
" ${4:expected output here}"
],
"description": "Insert a basic OpenFisca parameter for one person."
},
"2019-2025 (millions) OpenFisca parameter": {
"prefix": "1926bn",
"body": [
"2019-01-01: ${1}_000_000",
"2020-01-01: ${2}_000_000",
"2021-01-01: ${3}_000_000",
"2022-01-01: ${4}_000_000",
"2023-01-01: ${5}_000_000",
"2024-01-01: ${6}_000_000",
"2025-01-01: ${7}_000_000",
]
},
"2019-2025 (thousands) OpenFisca parameter": {
"prefix": "1926mn",
"body": [
"2019-01-01: ${1}_000",
"2020-01-01: ${2}_000",
"2021-01-01: ${3}_000",
"2022-01-01: ${4}_000",
"2023-01-01: ${5}_000",
"2024-01-01: ${6}_000",
"2025-01-01: ${7}_000",
]
}
}
Loading