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
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Every file is owned by the maintainer; pull requests need their review.
* @genedan
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,34 @@ permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Ruff
run: |
pip install ruff
ruff check .
ruff format --check .

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install
run: pip install ".[dev]"
- name: Pyright
run: pyright
- name: Type completeness
run: pyright --verifytypes fcaz --ignoreexternal

test:
runs-on: ubuntu-latest
strategy:
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.idea/
.venv/docs/_build/
docs/api/generated/
.venv/
build/
dist/
docs/_build/
docs/api/generated/
*.egg-info/
__pycache__/
coverage.xml
.coverage

27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
default_install_hook_types:
- pre-commit
- pre-push

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.1
hooks:
- id: ruff-check
- id: ruff-format

- repo: local
hooks:
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
pass_filenames: false
stages: [pre-push]
- id: pytest
name: pytest
entry: python -m pytest -q --doctest-modules fcaz tests
language: system
types: [python]
pass_filenames: false
stages: [pre-push]
Empty file added docs/_static/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ API reference
:maxdepth: 1

stats
typing
13 changes: 13 additions & 0 deletions docs/api/typing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
fcaz.typing
===========

.. automodule:: fcaz.typing

.. autosummary::
:toctree: generated

ArrayLikeFloat
FloatOrArray
SupportsPdfSf
SupportsLogSf
FrozenDistribution
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import os
import sys

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(
0,
os.path.abspath('..'),
)

from fcaz.constants import BUILD_VERSION

Expand Down
7 changes: 7 additions & 0 deletions fcaz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Property and casualty actuarial modeling."""

from fcaz import stats

__all__ = [
'stats',
]
4 changes: 3 additions & 1 deletion fcaz/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# The build version is referenced by the setup file and documentation.
"""Package-wide constants."""

# The build version is referenced by pyproject.toml and the documentation.

BUILD_VERSION = '0.0.0'
Empty file added fcaz/py.typed
Empty file.
Loading
Loading