-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from PolicyEngine/type-hints
Move to Pythonic functions with strict models
- Loading branch information
Showing
69 changed files
with
1,402 additions
and
39,452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,3 +160,5 @@ cython_debug/ | |
#.idea/ | ||
|
||
*.ipynb | ||
|
||
!docs/**/*.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,6 @@ changelog: | |
|
||
build: | ||
python -m build | ||
|
||
test: | ||
pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.