Skip to content

Commit

Permalink
make release depend on build and docker (#129)
Browse files Browse the repository at this point in the history
* install gimmemotifs from bioconda

* test-release depends on Build and Docker

* run docker build and push and pr

* remove post-release install in gh runner

* lint from upstream
  • Loading branch information
cameronraysmith authored Mar 24, 2023
1 parent 810ab66 commit c8bea5a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 28 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ name: Docker
on:
workflow_dispatch:
push:
paths:
- "dockerfiles/**"
- "src/**"
- "pyproject.toml"
pull_request:

env:
REGISTRY: ghcr.io
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,3 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check PyPI package installation
if: ${{ inputs.release_enabled }}
run: |
sleep 120 &&
version=$(hatch -q version) &&
pip install \
dnadiffusion==$version &&
pip list | grep dnadiffusion
16 changes: 4 additions & 12 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Test Release
on:
workflow_dispatch:
workflow_run:
workflows: [Build]
workflows:
- Build
- Docker
branches: main
types:
- completed
Expand Down Expand Up @@ -66,14 +68,4 @@ jobs:
tag: ${{ steps.check-version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check TestPyPI package installation
run: |
sleep 120 &&
version=$(hatch -q version) &&
echo $version &&
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
dnadiffusion==$version &&
pip list | grep dnadiffusion

6 changes: 5 additions & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ COPY . .
RUN mamba init
RUN mamba info && \
mamba install python=3.10 --yes && \
mamba install -c conda-forge -c bioconda --yes pybigwig
mamba install \
-c conda-forge \
-c bioconda \
--yes \
gimmemotifs
RUN pip install -e .
2 changes: 1 addition & 1 deletion src/dnadiffusion/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from hydra.core.config_store import ConfigStore
from hydra_zen import MISSING, builds, make_custom_builds_fn
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.loggers.wandb import WandbLogger
from pytorch_lightning.loggers.wandb import WandbLogger

from dnadiffusion.callbacks.sampling import Sample
from dnadiffusion.data.dataloader import LoadingDataModule
Expand Down
2 changes: 1 addition & 1 deletion src/dnadiffusion/data/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import random
from typing import Any, Dict, List, Optional, Tuple

import pytorch_lightning as pl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pytorch_lightning as pl
import torch
import torchvision.transforms as T
from pytorch_lightning.utilities import rank_zero_only
Expand Down

0 comments on commit c8bea5a

Please sign in to comment.