Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ONSdigital/statistical-methods-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 13.2.0
Choose a base ref
...
head repository: ONSdigital/statistical-methods-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 795 additions and 102 deletions.
  1. +6 −0 .github/dependabot.yml
  2. +39 −35 .github/workflows/ci-checks.yaml
  3. +1 −1 .github/workflows/dependabot-auto-merge.yml
  4. +5 −5 .github/workflows/release-code.yml
  5. +18 −0 catalog-info.yaml
  6. +29 −41 poetry.lock
  7. +3 −3 pyproject.toml
  8. +17 −0 release-notes/13.3.0.md
  9. +84 −12 statistical_methods_library/imputation/engine.py
  10. +3 −0 tests/fixture_data/imputation/engine/unit/manual_construction_back_data.csv
  11. +5 −0 tests/fixture_data/imputation/engine/unit/manual_construction_input.csv
  12. +5 −0 tests/fixture_data/imputation/engine/unit/manual_construction_output.csv
  13. +13 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv
  14. +13 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv
  15. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_input.csv
  16. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv
  17. +21 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_input.csv
  18. +21 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_output.csv
  19. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_input.csv
  20. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_output.csv
  21. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_input.csv
  22. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_output.csv
  23. +9 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_input.csv
  24. +9 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_output.csv
  25. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_input.csv
  26. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_output.csv
  27. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_input.csv
  28. +17 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_output.csv
  29. +13 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_input.csv
  30. +13 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_output.csv
  31. +13 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_MC_R_FIR_input.csv
  32. +13 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_MC_R_FIR_output.csv
  33. +42 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_input.csv
  34. +42 −0 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_output.csv
  35. +25 −0 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_input.csv
  36. +49 −0 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv
  37. +35 −0 tests/imputation/mean_of_ratios.toml
  38. +5 −0 tests/imputation/ratio_of_means.toml
  39. +69 −3 tests/imputation/test_engine.py
  40. +5 −2 tests/imputation/test_scenarios.py
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -6,3 +6,9 @@ updates:
interval: "daily"
ignore:
- dependency-name: pyspark
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: abatilo/actions-poetry
74 changes: 39 additions & 35 deletions .github/workflows/ci-checks.yaml
Original file line number Diff line number Diff line change
@@ -2,6 +2,11 @@ name: CI Checks

on: [push]

permissions:
statuses: write
checks: write
contents: read

jobs:
test:
runs-on: ubuntu-latest
@@ -12,37 +17,36 @@ jobs:
java-version: ['8']
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-java@v2
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
- name: Run image ${{matrix.python-version}}
uses: abatilo/actions-poetry@v2.4.0
with:
poetry-version: 1.3.2
- name: Install dependencies
run: poetry install
- name: test
run: poetry run pytest --tap-stream --cov-report=html --junitxml=junit.xml
- name: Upload Test report
poetry-version: 1.5.1
- name: Test ${{matrix.python-version}}
run: |-
set -e
poetry install
poetry run pytest --tap-stream --cov-report=lcov:lcov-${{matrix.python-version}}.info --junitxml=junit-${{matrix.python-version}}.xml
- name: Upload Test report ${{matrix.python-version}}
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: test-results
path: junit.xml
name: test-results-${{matrix.python-version}}
path: junit-${{matrix.python-version}}.xml
reporter: java-junit
fail-on-error: false
- name: upload-coverage-report
uses: actions/upload-artifact@v2
- name: upload-coverage-report-${{matrix.python-version}}
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
if-no-files-found: warn
name: coverage-report-${{matrix.python-version}}-lcov
path: lcov-${{matrix.python-version}}.info
flake8:
runs-on: ubuntu-latest
strategy:
@@ -51,19 +55,19 @@ jobs:
python-version: [3.7]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
uses: abatilo/actions-poetry@v2.4.0
with:
poetry-version: 1.3.2
- name: Install dependencies
run: poetry install
- name: run flake8
run: poetry run flake8 statistical_methods_library tests
poetry-version: 1.5.1
- name: Run flake8
run: |-
poetry install
poetry run flake8 statistical_methods_library tests
black:
runs-on: ubuntu-latest
strategy:
@@ -72,16 +76,16 @@ jobs:
python-version: [3.7]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
uses: abatilo/actions-poetry@v2.4.0
with:
poetry-version: 1.3.2
- name: Install dependencies
run: poetry install
- name: run black
run: poetry run black --check --diff statistical_methods_library tests
poetry-version: 1.5.1
- name: Run Black
run: |-
poetry install
poetry run black --check --diff statistical_methods_library tests
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Auto-approve Dependabot PR
10 changes: 5 additions & 5 deletions .github/workflows/release-code.yml
Original file line number Diff line number Diff line change
@@ -13,19 +13,19 @@ jobs:
max-parallel: 4
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: 1.3.2
poetry-version: 1.5.1
- name: build
run: poetry build
- name: Create GitHub release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.whl
18 changes: 18 additions & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: statistical-methods-library
description: The Statistical Methods Library (S.M.L.) is a set of approved statistical methods.
annotations:
jira/project-key: SPP
github.com/project-slug: ONSdigital/statistical-methods-library
tags:
- python
- spp
- sml
links:
icon: search
spec:
type: library
lifecycle: production
owner: group:spp-results
Loading