Skip to content

Commit

Permalink
Merge pull request #3 from datasciencecampus/api
Browse files Browse the repository at this point in the history
Implement MST class
  • Loading branch information
matweldon authored Dec 4, 2023
2 parents feccf48 + 02496f6 commit a7a11f3
Show file tree
Hide file tree
Showing 14 changed files with 1,606 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
pull_request:
push:
branches:
- main
- "dev*"

jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
py-major: [3]
py-minor: [8, 11]
env:
python-version: |
${{ format('{0}.{1}', matrix.py-major, matrix.py-minor) }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}
cache: "pip"
- name: Update pip and install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[test]" pytest-sugar
- name: Run tests (<3.9)
if: matrix.py-minor < 9
run: |
python -m pytest --cov=centhesus tests
- name: Run tests (>=3.11)
if: matrix.py-minor >= 11
run: |
python -m pytest --cov=centhesus --cov-fail-under=100 tests
- name: Install and run linters
if: matrix.os == 'ubuntu-latest' && matrix.py-minor == 11
run: |
python -m pip install ".[lint]"
python -m black --check .
python -m ruff .
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.coverage
.hypothesis

__pycache__

*.egg-info

scrap
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ readme = "README.md"
requires-python = ">=3.7"
license = {text = "MIT License"}
dependencies = [
"census21api@git+https://github.com/MichaelaLawrenceONS/[email protected]",
"dask[complete]",
"numpy",
"pandas",
"private-pgm@git+https://github.com/ryan112358/private-pgm",
Expand All @@ -30,7 +32,7 @@ test = [
"pytest-randomly",
]
lint = [
"black>=22.6.0,<23",
"black<24",
"ruff>=0.1.1",
]
dev = [
Expand Down
4 changes: 3 additions & 1 deletion src/centhesus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Synthesising the 2021 England and Wales Census with public data."""

from .mst import MST

__version__ = "0.0.1"

__all__ = ["__version__"]
__all__ = ["MST", "__version__"]
Loading

0 comments on commit a7a11f3

Please sign in to comment.