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

python 3.10 collections test suite update #312

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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/actions/build_distribution/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "build_distribution"

description: "Build and export the distribution"

runs:
using: composite
steps:
- name: Set up Git repository
uses: actions/checkout@v2

- name: Collect any new commits
shell: bash
run: |
git pull # get any pushes made since the trigger began; without this job-to-job connections may fail

- name: Set up Node.js 14
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt

- name: Build distribution
shell: bash
run: python3 scripts/build_distribution.py

- name: Commit changes, ready to push
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add *.nt *.md *.fasta *.gb
git diff-index --quiet HEAD . || git commit -m "Build distribution"

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
55 changes: 55 additions & 0 deletions .github/actions/build_packages/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "build_packages"

description: "Build and validate final packages"
runs:
using: composite
steps:
- name: Set up Git repository
uses: actions/checkout@v2

- name: Collect any new commits
shell: bash
run: |
git pull # get any pushes made since the trigger began; without this job-to-job connections may fail

- name: Set up Node.js 14
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt

- name: Collate packages
shell: bash
run: python3 scripts/collate_packages.py

- name: Create vector build plans
shell: bash
run: python3 scripts/expand_combinations.py

- name: Generate markdown from packages
shell: bash
run: python3 scripts/generate_markdown.py

- name: Commit changes, ready to push
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add */views/*.nt */README.md
git diff-index --quiet HEAD . || git commit -m "Collate and summarize packages"

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
49 changes: 49 additions & 0 deletions .github/actions/directories_and_excel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

name: "directories_and_excel"

description: "Updates data files and commits"

runs:
using: composite
steps:
- name: Collect any new commits
shell: bash
run: |
git pull # get any pushes made since the trigger began; without this job-to-job connections may fail

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt

- name: Regularize directories
shell: bash
run: python3 scripts/regularize_directories.py

- name: Update CSVs
shell: bash
run: python3 scripts/export_csvs.py

- name: Update SBOL
shell: bash
run: python3 scripts/export_sbol.py

- name: Commit changes, ready to push
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add */views
git diff-index --quiet HEAD . || git commit -m "Automatically update exports"

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
33 changes: 33 additions & 0 deletions .github/actions/make-sbol/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# An action to convert excel to sbol file
name: "make_sbol"

description: "Installs the required dependencies, python3.9 and sbol-utilities,
that are needed to convert the package xlsx file to a SBOL
compatible reference"

runs:
using: "composite"
steps:
# Check out and install the latest sbol-utilities package
- name: "Check out experimental package code for SBOL utilities"
uses: "actions/checkout@v3"
with:
repository: "SynBioDex/sbol-utilities"
ref: "sep054"
path: "sbol-utilities"

# Set python3.9 up for latest compatability
- name: "Set up Python"
uses: "actions/setup-python@v4"
with:
python-version: 3.9

# Install SBOL utlities to use excel-to-sbol
- name: "Install SBOL utilities"
shell: "bash"
run: "pip install -e sbol-utilities"

# Run excel-to-sbol, if pass exports correctly
- name: "Test if we can export correctly"
shell: "bash"
run: "excel-to-sbol -c ./.github/workflows/sheet_config.json Vectors.xlsx"
52 changes: 52 additions & 0 deletions .github/actions/retrieve_parts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "retrieve_parts"

description: "Imports parts and devices and converts any legacy parts to SBOL3"

runs:
using: composite
steps:
- name: Set up Git repository
uses: actions/checkout@v2

- name: Collect any new commits
shell: bash
run: |
git pull # get any pushes made since the trigger began; without this job-to-job connections may fail

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Set up Node.js 14
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt

- name: Import parts and devices
shell: bash
run: python3 scripts/import_parts.py

- name: Convert SBOL2 imports to SBOL3
shell: bash
run: python3 scripts/convert_sbol_2to3.py

- name: Commit changes, ready to push
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add */*.gb */*.fasta */*.nt
git diff-index --quiet HEAD . || git commit -m "Automatically import referenced parts"

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
37 changes: 37 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build packages

on: [push]

jobs:
directories_and_excel:
name: Check package structure and export from Excel files
runs-on: ubuntu-latest
steps:
- name: Check out this repository for building
uses: actions/checkout@v3
- name: directories_and_excel
uses: ./.github/actions/directories_and_excel

retrieve_parts:
name: Retrieve missing parts
needs: directories_and_excel
runs-on: ubuntu-latest
steps:
- name: retrieve_parts
uses: ./.github/actions/retrieve_parts

build_packages:
name: Build and validate final packages
needs: retrieve_parts
runs-on: ubuntu-latest
steps:
- name: build_packages
uses: ./.github/actions/build_packages

build_distribution:
name: Build and export distribution
needs: build_packages
runs-on: ubuntu-latest
steps:
- name: build_distriubtion
uses: ./.github/actions/build_distriubtion
8 changes: 4 additions & 4 deletions .github/workflows/python_linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -37,9 +37,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: flake8 lint
Expand Down
Loading