Skip to content

Merge pull request #36 from zivy/addressFutureWarning #116

Merge pull request #36 from zivy/addressFutureWarning

Merge pull request #36 from zivy/addressFutureWarning #116

Workflow file for this run

name: IBEX Knowledge-Base Utility Code Package Testing
on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
jobs:
preliminary_test: # run all pre-commit tests (see .pre-commit-config.yaml)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run pre-commit tests
run: |
pip install pre-commit
pre-commit run --all-files
build_test_and_upload:
needs: preliminary_test
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
brew update
brew install pandoc
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Build install and test package
run: |
python -m build
ls -la dist
pip install dist/ibex_imaging_knowledge_base_utilities-*any.whl
bib2md -h
reagent_resources_csv_2_md_url -h
fluorescent_probes_csv_2_md -h
update_index_md_stats -h
data_dict_glossary_2_contrib_md -h
zenodo_json_2_thewho_md -h
protocols_csv_2_md -h
videos_csv_2_md -h
csv2supporting -h
validate_zenodo_json -h
validate_bibfile -h
validate_basic -h
validate_videos -h
validate_image_resources -h
validate_reagent_resources -h
data_software_csv_2_md -h
python -m pytest -v --tb=short
- name: Upload wheels
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: ibex_imaging_python_wheels
path: dist/ibex_imaging_knowledge_base_utilities-*any.whl
github_release:
needs: build_test_and_upload
if: startsWith(github.ref, 'refs/tags/v')
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Prepare release notes
run: |
python create_release_notes.py ${{ github.repository }} ibex_imaging_knowledge_base_utilities ${{ github.ref_name }}
- uses: actions/download-artifact@v4
id: download
with:
name: ibex_imaging_python_wheels
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ibex_imaging_knowledge_base_utilities-*any.whl
body_path: release_notes.txt