Skip to content

Commit

Permalink
trigger doc builder (#393)
Browse files Browse the repository at this point in the history
* trigger doc builder

* restrict poetry version

* try without explicit version control on numpy

* force numpy to 1.26.0 (as on my local env)

* try without dev group

* with --only arg

* without the update

* explicit add poetry run for sphinx build

* poetry with default deps

* new test with recent poetry version

* without np explicit

* set back to requirements

* pfff again utils error ... is this a poetry bug?

* add python3 -m explicit before pip

* test doc building in the python matrix of the master test script

* add pandoc to doc dep group

* pandoc version update

* try with pandoc docker

* update pandoc version

* install pandoc system wide test1

* remove docker

* test deploying

* updated the workflows

* test the version check

* test2

* test3

* test4

* test5

* test6

* test7

* test8

* test9

* test10

* test11

* test12

* test14

* test15

* test func

* what is happening?

* hunk

* strange ...

* with some gpt help maybe?

* trigger error

* bring all checks together

* cleanup identation

* without all extras for tests

* cleanup

* combine to one workflow file

* fix identation

* syntax test

* syntax fixes

* Update master_test.yml

* all in one workflow'

* Update main_workflow.yml

* trigger os testing

* possible fix

* os testing without titan

* Update main_workflow.yml

* Update main_workflow.yml

* Update main_workflow.yml

* test without titan in pyproject

* test with poetry update --without titan

* cleanup
  • Loading branch information
vergauwenthomas authored Nov 10, 2023
1 parent 48ba0ab commit cc31a23
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 119 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build_and_deploy_doc.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/build_and_deploy_doc_dev.yml

This file was deleted.

178 changes: 178 additions & 0 deletions .github/workflows/main_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: Test pushed version

on: [push]

jobs:
#---- Run tests -----#
run-tests:
name: run test scripts
runs-on: ${{ matrix.os }}
strategy:
# You can use PyPy versions in python-version.
# For example, pypy-2.7 and pypy-3.8
matrix:
python-version: ["3.9", "3.10"]
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
node-version: [12.x]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#cache: 'poetry'
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install poetry
run: |
pip install poetry
- name: Install dependencies and build
run: |
poetry update
poetry install
- name: Run tests
run: |
poetry run python tests/push_test/gap_and_fill_test.py
poetry run python tests/push_test/IO_test.py
poetry run python tests/push_test/qc_test.py
poetry run python tests/push_test/breaking_test.py
#poetry run python tests/push_test/gui_launch_test.py
poetry run python tests/push_test/analysis_test.py
#--- Package os installation ---
mac_install_testing:
name: Installation on Mac latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python39
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install poetry
run: |
pip install poetry
- name: Install dependencies and build
run: |
poetry update --without titan,documentation
poetry install --without titan,documentation
- name: Run tests
run: |
poetry run python tests/push_test/import_test.py
windows_install_testing:
name: Installation on Windows latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python39
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install poetry
run: |
pip install poetry
- name: Install dependencies and build
run: |
poetry update --without titan,documentation
poetry install --without titan,documentation
- name: Run tests
run: |
poetry run python tests\push_test\import_test.py
#---- Version Control -----#
versiontest:
name: check if version is valid
needs: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: get version
id: 'version_info'
run: |
CURRENT_VERSION="$(grep -oP '__version__ = "\K\d+\.\d+\.\d+' metobs_toolkit/__init__.py)"
echo "current version (init) = ${CURRENT_VERSION}"
echo "::set-output name=current_version::$CURRENT_VERSION"
PYPROJECT_VERSION="$(grep -oP 'version = "\K\d+\.\d+\.\d+' pyproject.toml)"
echo "current version (pyproject) = ${PYPROJECT_VERSION}"
echo "::set-output name=pyproject_version::$PYPROJECT_VERSION"
- name: version-is-correct
if: ${{ steps.version_info.outputs.current_version != steps.version_info.outputs.pyproject_version }}
run: |
echo "version tags are not aligned!"
exit 1
#---- Documentation build -----#
doctests:
name: documentation-test
#needs: versiontest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python39
uses: actions/setup-python@v4
with:
python-version: '3.9'
#cache: 'poetry'
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: install pandoc (system wide)
run: |
sudo apt-get -y install pandoc
- name: Install poetry
run: |
pip install poetry
- name: Install dependencies and build
run: |
poetry update
poetry install --all-extras
poetry build
- name: Build documentation
run: |
poetry show
poetry run sphinx-build -a -E docs _build
#---- Deploy documentation -----#
deploy_doc:
name: Deploy main documentation
needs: [doctests,run-tests,versiontest,mac_install_testing, windows_install_testing]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: deploy artifact
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true

deploy_doc_dev:
name: Deploy dev documentation
needs: [doctests]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev'
steps:
- uses: actions/checkout@v3
- name: deploy artifact
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages-dev
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true







48 changes: 0 additions & 48 deletions .github/workflows/master_test.yml

This file was deleted.

32 changes: 26 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cc31a23

Please sign in to comment.