-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a major rewrite of the package for better consistency with the IRanges R/Bioconductor package. - Using pybind11, reimplement inter-range methods to a cpp implementation using code derived from the R package. - Better Start/End/Width resolver that is similar to the R implementation. - Overhaul of many of the find overlaps and search methods to better align with R's expectations of how they work. - Update docstrings, more tests.
- Loading branch information
Showing
30 changed files
with
2,278 additions
and
1,082 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build documentation | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
test: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
cache: 'pip' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
pip install cmake pybind11 numpy tox | ||
- name: Build docs | ||
run: | | ||
python setup.py build_ext --inplace | ||
cp build/lib*/iranges/lib_iranges* src/iranges/ | ||
tox -e docs | ||
touch ./docs/_build/html/.nojekyll | ||
- name: GH Pages Deployment | ||
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: ./docs/_build/html | ||
clean: true # Automatically remove deleted files from the deploy branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# macos-13 is an intel runner, higher macos's are apple silicon | ||
# At some point, maybe get this to work on windows-latest | ||
os: [ubuntu-latest, macos-13, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Build wheels | ||
uses: pypa/cibuildwheel@v2.22.0 | ||
env: | ||
CIBW_ARCHS_LINUX: x86_64 # remove this later so we build for all linux archs | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9" | ||
CIBW_SKIP: pp* | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@v1.12.2 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Test the library | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
|
||
name: Python ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
|
||
- name: Get latest CMake | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Test with tox | ||
run: | | ||
pip install tox | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
|
||
project(iranges | ||
VERSION 1.0.0 | ||
DESCRIPTION "Building the rds shared library" | ||
LANGUAGES CXX) | ||
|
||
find_package(pybind11 CONFIG) | ||
|
||
# pybind11 method: | ||
pybind11_add_module(iranges | ||
src/coverage.cpp | ||
src/interranges.cpp | ||
src/init.cpp | ||
) | ||
|
||
set_property(TARGET iranges PROPERTY CXX_STANDARD 17) | ||
|
||
target_link_libraries(iranges PRIVATE pybind11::pybind11) | ||
|
||
set_target_properties(iranges PROPERTIES | ||
OUTPUT_NAME lib_iranges | ||
PREFIX "" | ||
) |
Oops, something went wrong.