Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
58 changes: 58 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build wheels

on: [pull_request, release]

jobs:

build_wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # windows-latest

steps:
- uses: actions/checkout@v4

- uses: pypa/cibuildwheel@v2.16

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
# if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v5
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
# To test uploads to TestPyPI, uncomment the following:
with:
skip-existing: true
# password: ${{ secrets.PYPI_TEST_TOKEN }}
repository-url: https://test.pypi.org/legacy/
294 changes: 147 additions & 147 deletions .github/workflows/epidata_main.yml
Original file line number Diff line number Diff line change
@@ -1,158 +1,158 @@
name: Epidata-CI
# name: Epidata-CI

on:
schedule:
- cron: "40 1 * * *"
push:
branches:
- 'main'
tags:
- version-*
paths:
- '**/memilio-epidata/**'
- '.github/**'
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- '**/memilio-epidata/**'
- '.github/**'
workflow_dispatch:
# on:
# schedule:
# - cron: "40 1 * * *"
# push:
# branches:
# - 'main'
# tags:
# - version-*
# paths:
# - '**/memilio-epidata/**'
# - '.github/**'
# pull_request:
# types: [opened, reopened, synchronize, ready_for_review]
# paths:
# - '**/memilio-epidata/**'
# - '.github/**'
# workflow_dispatch:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.1
# jobs:
# pre-commit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.12
# - uses: pre-commit/action@v3.0.1

build-py-epidata:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-py
with:
package: epidata
# build-py-epidata:
# runs-on: ubuntu-latest
# container: quay.io/pypa/manylinux_2_28_x86_64
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/build-py
# with:
# package: epidata

build-py-plot:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-py
with:
package: plot
# build-py-plot:
# if: github.event.pull_request.draft == false
# runs-on: ubuntu-latest
# container: quay.io/pypa/manylinux_2_28_x86_64
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/build-py
# with:
# package: plot

test-py-epidata:
needs: build-py-epidata
strategy:
matrix:
version: ["3.8", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-py
with:
version: ${{ matrix.version }}
package: epidata
coverage: ON
# test-py-epidata:
# needs: build-py-epidata
# strategy:
# matrix:
# version: ["3.8", "3.12"]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/test-py
# with:
# version: ${{ matrix.version }}
# package: epidata
# coverage: ON

test-py-plot:
if: github.event.pull_request.draft == false
needs: [build-py-plot, build-py-epidata]
strategy:
matrix:
version: ["3.8", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-py
with:
version: ${{ matrix.version }}
package: plot
coverage: ON
# test-py-plot:
# if: github.event.pull_request.draft == false
# needs: [build-py-plot, build-py-epidata]
# strategy:
# matrix:
# version: ["3.8", "3.12"]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/test-py
# with:
# version: ${{ matrix.version }}
# package: plot
# coverage: ON

merge-artifacts:
runs-on: ubuntu-latest
strategy:
matrix:
packages: [epidata, plot]
needs: [test-py-plot, test-py-epidata]
steps:
- name: merge epidata reports
uses: actions/upload-artifact/merge@v4
with:
name: test-py-coverage-reports-${{ matrix.packages }}
pattern: test-py-coverage-reports-${{ matrix.packages }}-*
# merge-artifacts:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# packages: [epidata, plot]
# needs: [test-py-plot, test-py-epidata]
# steps:
# - name: merge epidata reports
# uses: actions/upload-artifact/merge@v4
# with:
# name: test-py-coverage-reports-${{ matrix.packages }}
# pattern: test-py-coverage-reports-${{ matrix.packages }}-*

test-pylint-epidata:
needs: build-py-epidata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-pylint
with:
package: epidata
# test-pylint-epidata:
# needs: build-py-epidata
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/test-pylint
# with:
# package: epidata

test-pylint-plot:
needs: build-py-plot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-pylint
with:
package: plot
# test-pylint-plot:
# needs: build-py-plot
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/test-pylint
# with:
# package: plot

download-data:
needs: build-py-epidata
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq -y install python3-pip gnupg
python -m pip install --upgrade pip
- name: Download Python Wheels
uses: actions/download-artifact@v4
with:
name: python-wheels-epidata
path: pycode/wheelhouse
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Python Wheels
run: |
for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
- name: Download Data
run: |
mkdir -p data_dl
getcasedata -o data_dl --no-progress-indicators
getpopuldata -o data_dl --no-progress-indicators
getjhdata -o data_dl --no-progress-indicators
getdividata -o data_dl --no-progress-indicators
getcommutermobility -o data_dl --no-progress-indicators
getvaccinationdata -o data_dl --no-progress-indicators
gethospitalizationdata -o data_dl --no-progress-indicators
- name: Upload Data
uses: actions/upload-artifact@v4
with:
name: data
path: |
data_dl/*.json
data_dl/Germany/*.json
data_dl/Spain/*.json
data_dl/France/*.json
data_dl/Italy*.json
data_dl/SouthKorea/*.json
data_dl/US/*.json
data_dl/China/*.json
retention-days: 1
# download-data:
# needs: build-py-epidata
# runs-on: ubuntu-latest
# continue-on-error: true
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: |
# sudo apt-get -qq update
# sudo apt-get -qq -y install python3-pip gnupg
# python -m pip install --upgrade pip
# - name: Download Python Wheels
# uses: actions/download-artifact@v4
# with:
# name: python-wheels-epidata
# path: pycode/wheelhouse
# - name: Set up Python 3.12
# uses: actions/setup-python@v5
# with:
# python-version: 3.12
# - name: Install Python Wheels
# run: |
# for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
# for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
# - name: Download Data
# run: |
# mkdir -p data_dl
# getcasedata -o data_dl --no-progress-indicators
# getpopuldata -o data_dl --no-progress-indicators
# getjhdata -o data_dl --no-progress-indicators
# getdividata -o data_dl --no-progress-indicators
# getcommutermobility -o data_dl --no-progress-indicators
# getvaccinationdata -o data_dl --no-progress-indicators
# gethospitalizationdata -o data_dl --no-progress-indicators
# - name: Upload Data
# uses: actions/upload-artifact@v4
# with:
# name: data
# path: |
# data_dl/*.json
# data_dl/Germany/*.json
# data_dl/Spain/*.json
# data_dl/France/*.json
# data_dl/Italy*.json
# data_dl/SouthKorea/*.json
# data_dl/US/*.json
# data_dl/China/*.json
# retention-days: 1

Loading
Loading