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

b2w rewrite to Python #84

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on: [push]

jobs:
tests:
runs-on: ubuntu-latest
name: Tests
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run test cases
id: hello
uses: ./
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Autotools cruft (NEVER check this into VCS)
Makefile
!docs/Makefile
Makefile.in
.version
aclocal.m4
Expand All @@ -21,16 +22,10 @@ missing
py-compile
ar-lib
test-driver
/shorah

# generated tarball
shorah*.tar.bz2

# executables
b2w
diri_sampler
fil

# samtools lib
libbam.a

Expand All @@ -42,11 +37,11 @@ __pycache__/
# OS X temporary files that should never be committed
.DS_Store
*.swp
*.lock
profile

# other intermediate stuff
build
_build
.eggs
src/ShoRAH.egg-info/

Expand Down
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

75 changes: 0 additions & 75 deletions CHANGELOG.md

This file was deleted.

17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.10

ENV POETRY_VERSION=1.1.12

RUN apt-get update -y && \
apt-get install -y libhts-dev libboost-random-dev

RUN pip install "poetry==$POETRY_VERSION"

COPY . /usr/app/

# GitHub Actions chimes in here and sets docker's WORKDIR=${GITHUB_WORKSPACE}
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#workdir

ENTRYPOINT ["./entrypoint.sh"]

CMD cd ./tests && poetry run pytest
100 changes: 0 additions & 100 deletions Makefile.am

This file was deleted.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,19 @@ file in directory


## Coding style
All changes to the C++ code in `src/cpp` should always be formatted according to the included `.clang-format` style by doing
All changes to the C++ code in `lib` should always be formatted according to the included `.clang-format` style by doing

clang-format -style=file -i src/cpp/*.[ch]pp

in the root of the repository.

All changes to the python code in `src/shorah` should always be formatted conforming to the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide. To this end, we advise to use [autopep8](https://pypi.python.org/pypi/autopep8).
All changes to the python code in `shorah` should always be formatted conforming to the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide. To this end, we advise to use [autopep8](https://pypi.python.org/pypi/autopep8).

## Development/CI with Docker
The following command will run the CI locally within Docker.
```bash
docker run --rm -w="/usr/app" -it $(docker build -q .) bash
```

## Contact

Expand Down
7 changes: 7 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: 'Test container'
outputs:
out:
description: 'The output'
runs:
using: 'docker'
image: 'Dockerfile'
Loading