Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6f43c07
Add empty test and update GH actions
nikhilwoodruff Jan 24, 2025
132bcda
Update versioning
nikhilwoodruff Jan 24, 2025
30e3ade
Update package version
nikhilwoodruff Jan 24, 2025
b7ee9be
Move to python functions (standardised)
nikhilwoodruff Jan 24, 2025
bd8fa3a
Merge branch 'type-hints' of https://github.com/PolicyEngine/policyen…
nikhilwoodruff Jan 24, 2025
15216d0
Update docs
nikhilwoodruff Jan 24, 2025
7c612cc
Fix imports for type checking
nikhilwoodruff Jan 24, 2025
1162315
Update bug fix
nikhilwoodruff Jan 24, 2025
97f72b8
Update actions
nikhilwoodruff Jan 24, 2025
b82c817
Update actions
nikhilwoodruff Jan 24, 2025
efecd9e
Format
nikhilwoodruff Jan 24, 2025
366c298
Update versioning action
nikhilwoodruff Jan 24, 2025
410d9c3
Add typed functions
nikhilwoodruff Jan 24, 2025
17c765f
Format
nikhilwoodruff Jan 24, 2025
4a3ead3
Adjust name of action
nikhilwoodruff Jan 24, 2025
29f2c1a
Add type hints
nikhilwoodruff Jan 27, 2025
ec2c9a7
Add fully-typed simulation starters
nikhilwoodruff Jan 28, 2025
374399e
Update docs
nikhilwoodruff Jan 28, 2025
58d2981
Add budget, inequality and distributional impacts
nikhilwoodruff Jan 28, 2025
fd2765b
Add poverty metrics
nikhilwoodruff Jan 28, 2025
5153bc3
Format
nikhilwoodruff Jan 28, 2025
34aacd1
Remove original API placeholder code
nikhilwoodruff Jan 28, 2025
09ddb5f
Add basic household outputs
nikhilwoodruff Jan 28, 2025
cf36e25
Format
nikhilwoodruff Jan 28, 2025
b040960
Update docs
nikhilwoodruff Jan 28, 2025
4db0673
Add tests
nikhilwoodruff Jan 28, 2025
f393975
Fix bug identified by tests
nikhilwoodruff Jan 28, 2025
0a788d9
Add dep
nikhilwoodruff Jan 28, 2025
6e337db
Use UV
nikhilwoodruff Jan 28, 2025
ab16484
Add system flag
nikhilwoodruff Jan 28, 2025
bc2c095
Add secret ref
nikhilwoodruff Jan 28, 2025
fb70173
Add zero-division check
nikhilwoodruff Jan 28, 2025
1ba4b70
Add missing dep
nikhilwoodruff Jan 28, 2025
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
13 changes: 12 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## Updating the versioning

Please add to `changelog.yaml` and then run `make changelog` before committing the results ONCE in this PR.
Please add to `changelog_entry.yaml` an entry in the format:

```yaml
- bump: minor
changes:
added:
- New feature.
fixed:
- Bug fix.
changed:
- Change.
```
26 changes: 26 additions & 0 deletions .github/workflows/any_changes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Workflow that runs on code changes to a pull request.

name: Any changes
on:
pull_request:
branches:
- main

jobs:
docs:
name: Test documentation builds
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install package
run: make install

- name: Test documentation builds
run: make documentation
41 changes: 41 additions & 0 deletions .github/workflows/code_changes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Workflow that runs on code changes to a pull request.

name: Code changes
on:
pull_request:
branches:
- main

paths:
- policyengine/**
- tests/**

jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
uses: "lgeiger/black-action@master"
with:
args: ". -l 79 --check"
Test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install package
run: uv pip install .[dev] --system

- name: Run tests
run: make test
env:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
48 changes: 0 additions & 48 deletions .github/workflows/pr.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Push
on:
push:
branches: [ main ]
paths:
- pyproject.toml

jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Publish a git tag
run: ".github/publish-git-tag.sh || true"
- name: Install package
run: make install
- name: Build package
run: make
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
skip-existing: true
69 changes: 0 additions & 69 deletions .github/workflows/push.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/versioning.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Workflow that runs on versioning metadata updates.

name: Versioning updates
on:
push:
branches:
- main

paths:
- changelog_entry.yaml

jobs:
Versioning:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
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@v5
with:
python-version: 3.12
- 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@v9
with:
add: "."
message: Update package version
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ cython_debug/
#.idea/

*.ipynb

!docs/**/*.ipynb
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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).

## [2.5.0] - 2025-01-24 00:08:26

### Changed

- Moved to strong typing.

## [2.4.1] - 2025-01-09 10:52:28

### Fixed
Expand Down Expand Up @@ -70,6 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[2.5.0]: https://github.com/PolicyEngine/policyengine.py/compare/2.4.1...2.5.0
[2.4.1]: https://github.com/PolicyEngine/policyengine.py/compare/2.4.0...2.4.1
[2.4.0]: https://github.com/PolicyEngine/policyengine.py/compare/2.3.0...2.4.0
[2.3.0]: https://github.com/PolicyEngine/policyengine.py/compare/2.2.2...2.3.0
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ changelog:

build:
python -m build

test:
pytest tests
5 changes: 5 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@
fixed:
- Subsetting bug with time periods.
date: 2025-01-09 10:52:28
- bump: minor
changes:
changed:
- Moved to strong typing.
date: 2025-01-24 00:08:26
Binary file added docs/.DS_Store
Binary file not shown.
7 changes: 6 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ copyright: "2025"
logo: logo.png

execute:
execute_notebooks: force
execute_notebooks: cache
stderr_output: error
timeout: 600

Expand All @@ -14,6 +14,8 @@ repository:
branch: master
path_to_book: docs

title: Python documentation

sphinx:
config:
html_js_files:
Expand All @@ -24,3 +26,6 @@ sphinx:
- style.css
extra_extensions:
- "sphinx.ext.autodoc"
- "sphinxcontrib.autodoc_pydantic"

only_build_toc_files: true
10 changes: 8 additions & 2 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:[email protected]&family=Roboto:wght@300&display=swap');

h1, h2, h3, h4, h5, h6 {

h1, h2, h3, h4, h5, p.rubric {
font-family: "Roboto";
font-weight: 200;
}

body {
font-family: "Roboto Serif";
}
}

.sidebar-brand-text {
text-align: left;
}
4 changes: 0 additions & 4 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
format: jb-book
root: index
parts:
- caption: Maintenance
chapters:
- file: maintaining
- caption: Reference
chapters:
- file: reference/simulation
- file: reference/calculate
Loading
Loading