Skip to content

Commit c8bea5a

Browse files
make release depend on build and docker (#129)
* 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
1 parent 810ab66 commit c8bea5a

6 files changed

Lines changed: 12 additions & 28 deletions

File tree

.github/workflows/docker.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ name: Docker
33
on:
44
workflow_dispatch:
55
push:
6-
paths:
7-
- "dockerfiles/**"
8-
- "src/**"
9-
- "pyproject.toml"
6+
pull_request:
107

118
env:
129
REGISTRY: ghcr.io

.github/workflows/release.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,3 @@ jobs:
5353
prerelease: false
5454
env:
5555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
57-
- name: Check PyPI package installation
58-
if: ${{ inputs.release_enabled }}
59-
run: |
60-
sleep 120 &&
61-
version=$(hatch -q version) &&
62-
pip install \
63-
dnadiffusion==$version &&
64-
pip list | grep dnadiffusion

.github/workflows/test-release.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Test Release
33
on:
44
workflow_dispatch:
55
workflow_run:
6-
workflows: [Build]
6+
workflows:
7+
- Build
8+
- Docker
79
branches: main
810
types:
911
- completed
@@ -66,14 +68,4 @@ jobs:
6668
tag: ${{ steps.check-version.outputs.tag }}
6769
env:
6870
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69-
70-
- name: Check TestPyPI package installation
71-
run: |
72-
sleep 120 &&
73-
version=$(hatch -q version) &&
74-
echo $version &&
75-
pip install \
76-
--index-url https://test.pypi.org/simple/ \
77-
--extra-index-url https://pypi.org/simple/ \
78-
dnadiffusion==$version &&
79-
pip list | grep dnadiffusion
71+

dockerfiles/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ COPY . .
66
RUN mamba init
77
RUN mamba info && \
88
mamba install python=3.10 --yes && \
9-
mamba install -c conda-forge -c bioconda --yes pybigwig
9+
mamba install \
10+
-c conda-forge \
11+
-c bioconda \
12+
--yes \
13+
gimmemotifs
1014
RUN pip install -e .

src/dnadiffusion/configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from hydra.core.config_store import ConfigStore
55
from hydra_zen import MISSING, builds, make_custom_builds_fn
66
from pytorch_lightning.callbacks import ModelCheckpoint
7-
from pytorch_lightning.loggers.wandb import WandbLogger
7+
from pytorch_lightning.loggers.wandb import WandbLogger
88

99
from dnadiffusion.callbacks.sampling import Sample
1010
from dnadiffusion.data.dataloader import LoadingDataModule

src/dnadiffusion/data/dataloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import random
44
from typing import Any, Dict, List, Optional, Tuple
55

6-
import pytorch_lightning as pl
76
import matplotlib.pyplot as plt
87
import numpy as np
98
import pandas as pd
9+
import pytorch_lightning as pl
1010
import torch
1111
import torchvision.transforms as T
1212
from pytorch_lightning.utilities import rank_zero_only

0 commit comments

Comments
 (0)