Skip to content

Commit

Permalink
Merge pull request #4 from domonik/new-dev
Browse files Browse the repository at this point in the history
New dev
  • Loading branch information
domonik authored Nov 19, 2024
2 parents 57a2057 + 1537c3c commit d24369f
Show file tree
Hide file tree
Showing 100 changed files with 4,660 additions and 4,339 deletions.
42 changes: 42 additions & 0 deletions .github/test-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

on:
pull_request:
branches:
- main

jobs:
test-package:
runs-on: "ubuntu-22.04"
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: create environment with mamba
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge,defaults,bioconda
auto-activate-base: false
activate-environment: RNAdistEnv
environment-file: environment.yml

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install package
run: |
conda activate RNAdistEnv
pip install ./ --no-deps --no-build-isolation
pip install pytest
- name: test package
run: |
pytest --pyargs RNAdist
1 change: 0 additions & 1 deletion CPExpectedDistance
Submodule CPExpectedDistance deleted from d5ad01
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include versioneer.py
include RNAdist/_version.py
include RNAdist/dp/_dp_calculations.pyx
include *.pyx
include RNAdist/sampling/cpp/*.h
global-include cpp/*.h
global-include tests/*.py
global-include tests/test_data/*
prune */__pycache__/
Expand Down
14 changes: 14 additions & 0 deletions RNAdist/cpp/RNAHelpers.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Created by rabsch on 18.11.24.
//

#include "RNAHelpers.h"



vrna_fold_compound_t *swigFcToFc(PyObject *swig_fold_compound) {
SwigPyObject *swf = (SwigPyObject*) swig_fold_compound;
vrna_fold_compound_t *fc = (vrna_fold_compound_t*) swf->ptr;
return fc;
}

33 changes: 33 additions & 0 deletions RNAdist/cpp/RNAHelpers.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// Created by rabsch on 18.11.24.
//

#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#define PYBIND11_DETAILED_ERROR_MESSAGES

#ifndef RNADIST_RNAHELPERS_H
#define RNADIST_RNAHELPERS_H
#endif //RNADIST_RNAHELPERS_H

#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <pybind11/stl.h>

extern "C"
{
#include "ViennaRNA/fold_compound.h"
}



typedef struct {
PyObject_HEAD
void *ptr;
void *ty;
int own;
PyObject *next;
PyObject *dict;
} SwigPyObject;

vrna_fold_compound_t *swigFcToFc(PyObject *swig_fold_compound);

Loading

0 comments on commit d24369f

Please sign in to comment.