Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OONI Data, OONI Pipeline split #60

Merged
merged 25 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d47efee
Add extra dep temporalio
hellais Mar 6, 2024
584306b
Move workers into workflows
hellais Mar 6, 2024
ea54a88
Rewrite observation generation using temporal.io
hellais Mar 6, 2024
de77282
Break up oonidata from oonipipeline
hellais Mar 16, 2024
e89d697
Separate pipeline code from data code
hellais Mar 16, 2024
e43c566
Move integration tests into separate directory, write more unit tests
hellais Mar 16, 2024
e443c17
Fix most import errors with oonipipeline
hellais Mar 16, 2024
167c57a
Fix broken import in cli
hellais Mar 16, 2024
954e9a5
Fix imports in web app
hellais Mar 16, 2024
fc9f320
It's actually better to keep all models in oonidata
hellais Mar 16, 2024
d5c55b9
Attempt at porting analysis over to temporalio
hellais Mar 16, 2024
8311221
Refactor structure of unit and integration tests
hellais Mar 17, 2024
395a742
Set python version to 3.11
hellais Mar 17, 2024
905c616
Fix oonidata tests
hellais Mar 17, 2024
0156f12
Fix tests for oonipipeline
hellais Mar 17, 2024
b6c947a
In pipeline tests we also need clickhouse
hellais Mar 17, 2024
c40dba2
Fix raw measurement cache path
hellais Mar 17, 2024
57b57bc
We don't actually have a makefile yet
hellais Mar 17, 2024
ab5f34e
Add note about why oonipipeline has only 1 python version in the test…
hellais Mar 17, 2024
be685b0
Drop python version from oonidata pyproject.yml
hellais Apr 12, 2024
3ca3e0d
Update .gitignores
hellais Apr 12, 2024
92fa8b5
Uncomment fixtures
hellais Apr 12, 2024
814b78a
Drop un-used deps from oonidata
hellais Apr 12, 2024
1edda8e
Drop EOL 3.7 python
hellais Apr 12, 2024
dd71014
Improvements to the tests
hellais Apr 12, 2024
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
48 changes: 48 additions & 0 deletions .github/workflows/test_oonidata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: test oonidata
on: push
jobs:
run_tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [Ubuntu]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install hatch
run: pip install hatch

- name: Set up datadir cache
uses: actions/cache@v3
with:
path: oonidata/tests/data/datadir/
key: oonidata-tests-data-datadir

- name: Set up measurements cache
uses: actions/cache@v3
with:
path: oonidata/tests/data/measurements/
key: oonidata-tests-data-measurements

- name: Set up raw_measurements cache
uses: actions/cache@v3
with:
path: oonidata/tests/data/raw_measurements/
key: oonidata-tests-data-raw_measurements-${{ hashFiles('tests/conftest.py') }}

- name: Run all tests
run: hatch run cov
working-directory: ./oonidata/

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
flags: oonidata
working-directory: ./oonidata/
55 changes: 55 additions & 0 deletions .github/workflows/test_oonipipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: test oonipipeline
on: push
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# Contrary to oonidata, which is a tool for end users, oonipipeline
# targets a single python version to minimize the likelyhood of breakage
# in production.
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install hatch
run: pip install hatch

- name: Set up datadir cache
uses: actions/cache@v3
with:
path: oonipipeline/tests/data/datadir/
key: oonipipeline-tests-data-datadir

- name: Set up measurements cache
uses: actions/cache@v3
with:
path: oonipipeline/tests/data/measurements/
key: oonipipeline-tests-data-measurements

- name: Set up raw_measurements cache
uses: actions/cache@v3
with:
path: oonipipeline/tests/data/raw_measurements/
key: oonipipeline-tests-data-raw_measurements-${{ hashFiles('tests/conftest.py') }}

- name: Install clickhouse
run: |
sudo apt-get install -y apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754
echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \
/etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y clickhouse-server clickhouse-client

- name: Run all tests
run: hatch run cov
working-directory: ./oonipipeline/

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
flags: oonipipeline
working-directory: ./oonipipeline/
86 changes: 0 additions & 86 deletions .github/workflows/tests.yml

This file was deleted.

13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
__pycache__
/.coverage
/coverage.xml
/tests/data/datadir/*
/tests/data/raw_measurements/*
/tests/data/measurements/*
.coverage
.coverage.*
coverage.xml

.ipynb_checkpoints/

/dist
/datadir
/output
/attic
/prof
.ipynb_checkpoints/
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.defaultInterpreterPath": "${workspaceFolder}/oonipipeline/.venv",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
Expand Down
6 changes: 0 additions & 6 deletions oonidata/__init__.py

This file was deleted.

Loading
Loading