Skip to content

Commit

Permalink
merge changes from dev_bjorn
Browse files Browse the repository at this point in the history
  • Loading branch information
BjornFJohansson committed Nov 15, 2023
2 parents 5378d6a + e86d9bb commit 47cd72f
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 155 deletions.
41 changes: 18 additions & 23 deletions .github/workflows/pydna_test_and_coverage_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,38 @@ jobs:
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"

defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:

- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0

- name: ⬇️ Checkout
uses: actions/checkout@v3

- name: 🌍 Install conda environment from pydna_test_environment.yml
uses: mamba-org/setup-micromamba@v1
- name: 🔩 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
environment-file: pydna_test_environment.yml
create-args: python=${{ matrix.python-version }}
cache-downloads: true
cache-environment: true
python-version: ${{ matrix.python-version }}

- name: 🐍 micromamba info
shell: bash -l {0}
run: micromamba info
- name: 🐍 Display Python version
run: python -c "import sys; print(sys.version)"

- name: 🐍 micromamba list
shell: bash -l {0}
run: micromamba list
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs.prefer-active-python: true

- name: 🔩 Set version
shell: bash -l {0}
run: poetry dynamic-versioning
- name: 🔩 list Poetry settings
run: poetry config --list

- name: 🔩 Install from source
shell: bash -l {0}
run: pip install --editable . --no-deps
- name: 🔩 Install with Poetry
run: poetry install --all-extras --with test

- name: 🔎 python run_test.py
shell: bash -l {0}
run: python run_test.py
- name: 🔎 poetry run python run_test.py
run: poetry run python run_test.py

- name: 🔼 Upload coverage to Codecov
if: (matrix.codecov)
Expand Down
95 changes: 14 additions & 81 deletions poetry.lock

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

9 changes: 0 additions & 9 deletions pydna_build_environment.yml

This file was deleted.

36 changes: 0 additions & 36 deletions pydna_test_environment.yml

This file was deleted.

2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ pillow = { version = ">=8.4.0", optional = true }
pyparsing = { version = ">=2.4.7", optional = true }
requests = { version = ">=2.26.0", optional = true }
cai2 = { version = ">=1.0.5", optional = true }
pyqt5 = { version = ">=5.15.0", optional = true }
[tool.poetry.extras]
clipboard = ["pyperclip"]
gel = ["scipy", "matplotlib", "pillow"]
download = ["pyparsing", "requests"]
gui = ["pyqt5"]
express = ["cai2"]
[build-system]
requires = ["poetry-core",
Expand Down
4 changes: 2 additions & 2 deletions run_test.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import os
import logging
import tempfile
import pytest
import pathlib

import pytest

pathlib.Path("coverage.xml").unlink(missing_ok=True)
pathlib.Path(".coverage").unlink(missing_ok=True)
Expand Down
1 change: 0 additions & 1 deletion src/pydna/dseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ def from_full_sequence_and_overhangs(cls, full_sequence: str, crick_ovhg: int, w

return Dseq(watson, crick=crick, ovhg=crick_ovhg)


# @property
# def ovhg(self):
# """The ovhg property. This cannot be set directly, but is a
Expand Down
3 changes: 2 additions & 1 deletion tests/test_module_dseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,10 @@ def test_translate():

def test_from_full_sequence_and_overhangs():
from pydna.dseq import Dseq

test_cases = [
(2, 2, "AAAA", "TTTT"),
(-2, 2, "AAAAAA", "TT" ),
(-2, 2, "AAAAAA", "TT"),
(2, -2, "AA", "TTTTTT"),
(-2, -2, "AAAA", "TTTT"),
(0, 0, "AAAAAA", "TTTTTT"),
Expand Down

0 comments on commit 47cd72f

Please sign in to comment.