From fe7376f94545d5382aeaf26c9c95d1391a057b59 Mon Sep 17 00:00:00 2001 From: Kevin Ngai Date: Thu, 23 Jan 2025 22:56:36 +0000 Subject: [PATCH] Update main.yml - Fix trailing " as syntax error - Fix to use ubuntu-20.04 as per https://github.com/actions/runner-images/issues/10636 - Update to use actions/checkout@v3 and actions/setup-python@v5 - Relax to using python 3.8 in debian/packaging - Add python3.8 and python 3.8-dev specifically - Update debian/changelog to ensure correct debian build with Ubuntu:focal --- .github/workflows/main.yml | 31 +++++++++++++++++-------------- debian/changelog | 8 ++++++++ debian/control | 4 ++-- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f844058..08dd8588 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,10 +1,10 @@ name: build ⚙️ -on: [ push, pull_request ] +on: [push, pull_request] jobs: main: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 env: WDR_LOGGING_LOGLEVEL: ERROR WDR_LOGGING_LOGFILE: /tmp/woudc-data-registry.log @@ -23,24 +23,28 @@ jobs: WDR_ERROR_CONFIG: woudc_data_registry/tests/config/errors.csv WDR_ALIAS_CONFIG: data/aliases.yml WDR_EXTRA_CONFIG: data/extra-options.yml - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: matrix: - python-version: [3.8] + python-version: ["3.8"] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v5 name: Setup Python ${{ matrix.python-version }} with: python-version: ${{ matrix.python-version }} - name: Install system dependencies 📦 run: sudo apt-get install -y dh-python devscripts fakeroot debhelper python3-all python3-setuptools + - name: Ensure Python 3.8 is Installed + run: sudo apt-get install -y python3.8 python3.8-dev python3.8-venv + - name: Install Debian Build Dependencies + run: sudo apt-get update && sudo apt-get build-dep -y . - name: Install woudc-extcsv requirement 📦 run: | git clone https://github.com/woudc/woudc-extcsv.git cd woudc-extcsv pip install -r requirements.txt - python setup.py install + python3 setup.py install cd .. - name: Install requirements 📦 run: | @@ -50,21 +54,20 @@ jobs: pip install coveralls - name: Install package 📦 run: python3 setup.py install - - name: run tests ⚙️ + - name: Run tests ⚙️ run: python3 setup.py test - - name: run flake8 + - name: Run flake8 run: find . -type f -name "*.py" | xargs flake8 - - name: build docs + - name: Build docs run: cd docs && make html && cd .. - - name: test coverage ⚙️ + - name: Test coverage ⚙️ continue-on-error: true run: | coverage run -a --source=woudc_data_registry -m unittest woudc_data_registry.tests.test_data_registry coverage run -a --source=woudc_data_registry -m unittest woudc_data_registry.tests.test_report_generation coverage report -m coveralls --service=github - - name: build Python package 🏗️ + - name: Build Python package 🏗️ run: python3 setup.py bdist_wheel --universal - - name: build Debian package 🏗️ + - name: Build Debian package 🏗️ run: sudo debuild -b -uc -us - diff --git a/debian/changelog b/debian/changelog index 93cda8dc..fcc42649 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +woudc-data-registry (0.2.0) focal; urgency=medium + + * Updates for Ubuntu:focal + * Updates for ElasticSearch 8 + * Updated rules + + -- Kevin Ngai Tue, 04 Feb 2025 19:12:00 +0000 + woudc-data-registry (0.1.0) trusty; urgency=medium * Initial release. diff --git a/debian/control b/debian/control index bf798281..7dcfb0bf 100644 --- a/debian/control +++ b/debian/control @@ -2,14 +2,14 @@ Source: woudc-data-registry Section: python Priority: optional Maintainer: WOUDC -Build-Depends: debhelper (>= 9), python3 (>= 3.8.10), python3-setuptools +Build-Depends: debhelper (>= 9), python3 (>= 3.8), dh-python, python3-all, python3-setuptools Standards-Version: 3.9.5 X-Python-Version: >= 3.8 Vcs-Git: https://github.com/woudc/woudc-data-registry.git Package: woudc-data-registry Architecture: all -Depends: elasticsearch (>= 8.12.0), postgresql, python3-click, python3-elasticsearch, python3-psycopg2, python3-requests, python3-sqlalchemy, woudc-extcsv +Depends: ${misc:Depends}, ${python3:Depends}, elasticsearch (>= 8.12.0), postgresql, python3-click, python3-elasticsearch, python3-psycopg2, python3-requests, python3-sqlalchemy, woudc-extcsv Homepage: https://woudc.org Description: WOUDC Data Registry is a platform that manages Ozone and Ultraviolet Radiation data in support of the World Ozone and Ultraviolet