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
4 changes: 1 addition & 3 deletions .github/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ def get_current_version(pyproject_path: Path) -> str:

def infer_bump(changelog_dir: Path) -> str:
fragments = [
f
for f in changelog_dir.iterdir()
if f.is_file() and f.name != ".gitkeep"
f for f in changelog_dir.iterdir() if f.is_file() and f.name != ".gitkeep"
]
if not fragments:
print("No changelog fragments found", file=sys.stderr)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Check formatting
uses: "lgeiger/black-action@master"
with:
args: ". -l 79 --check"
run: uvx ruff format --check .
check-changelog:
name: Check changelog fragment
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
&& (github.event.head_commit.message == 'Update PolicyEngine Core')
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Check formatting
uses: "lgeiger/black-action@master"
with:
args: ". -l 79 --check"
run: uvx ruff format --check .
versioning:
name: Update versioning
if: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ documentation:
python docs/add_plotly_to_book.py docs/_build

format:
black . -l 79
ruff format .

install:
pip install -e ".[dev]" --config-settings editable_mode=compat
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![codecov](https://codecov.io/gh/PolicyEngine/policyengine-core/branch/master/graph/badge.svg?token=BLoCjCf5Qr)](https://codecov.io/gh/PolicyEngine/policyengine-core)
[![PyPI version](https://badge.fury.io/py/policyengine-core.svg)](https://badge.fury.io/py/policyengine-core)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

This package, a fork of [OpenFisca-Core](https://github.com/OpenFisca/OpenFisca-Core), powers PolicyEngine country models and apps.

Expand Down Expand Up @@ -64,7 +64,7 @@ We also ask that you add tests for any new features or bug-fixes you add, so we

### Step 2: Formatting

In addition to the tests, we use [Black](https://github.com/psf/black) to lint our codebase, so before opening a pull request, Step 2 is to lint the code by running
In addition to the tests, we use [Ruff](https://github.com/astral-sh/ruff) to format our codebase, so before opening a pull request, Step 2 is to format the code by running

```
make format
Expand Down
1 change: 1 addition & 0 deletions changelog.d/switch-to-ruff.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switched code formatter from black to ruff format.
4 changes: 1 addition & 3 deletions docs/usage/datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
" # Specify metadata used to describe and store the dataset.\n",
" name = \"country_template_dataset\"\n",
" label = \"Country template dataset\"\n",
" file_path = (\n",
" COUNTRY_DIR / \"data\" / \"storage\" / \"country_template_dataset.h5\"\n",
" )\n",
" file_path = COUNTRY_DIR / \"data\" / \"storage\" / \"country_template_dataset.h5\"\n",
" data_format = Dataset.TIME_PERIOD_ARRAYS\n",
"\n",
" # The generation function is the most important part: it defines\n",
Expand Down
Loading