Skip to content

Commit

Permalink
renaming to pybwa
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Dec 19, 2024
1 parent eb88d83 commit 71cddda
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 46 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ jobs:
- name: Style checking
shell: bash
run: |
poetry run ruff format --check bwapy tests
poetry run ruff format --check pybwa tests
- name: Run lint
shell: bash
run: |
poetry run ruff check bwapy tests
poetry run ruff check pybwa tests
- name: Run mypy
shell: bash
run: |
poetry run mypy bwapy tests --config=pyproject.toml
poetry run mypy pybwa tests --config=pyproject.toml
- name: Run pytest
shell: bash
run: |
poetry run python -m pytest --cov=bwapy --cov-report=xml --cov-branch
poetry run python -m pytest --cov=pybwa --cov-report=xml --cov-branch
- name: Run docs
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "bwapy"
project-slug: "pybwa"
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
[type-checking-link]: http://mypy-lang.org/
[pep-8-badge]: https://img.shields.io/badge/code%20style-pep8-brightgreen.svg
[pep-8-link]: https://www.python.org/dev/peps/pep-0008/
[code-coverage-badge]: https://codecov.io/gh/fulcrumgenomics/bwapy/branch/main/graph/badge.svg
[code-coverage-link]: https://codecov.io/gh/fulcrumgenomics/bwapy
[code-coverage-badge]: https://codecov.io/gh/fulcrumgenomics/pybwa/branch/main/graph/badge.svg
[code-coverage-link]: https://codecov.io/gh/fulcrumgenomics/pybwa
[license-badge]: http://img.shields.io/badge/license-MIT-blue.svg
[license-link]: https://github.com/fulcrumgenomics/bwapy/blob/main/LICENSE
[license-link]: https://github.com/fulcrumgenomics/pybwa/blob/main/LICENSE

# bwapy
# pybwa

Python language bindings for [bwa][bwa-link]

See documentation on [bwapy.readthedocs.org][rtd-link].
See documentation on [pybwa.readthedocs.org][rtd-link].

[rtd-link]: http://bwapy.readthedocs.org/en/stable
[rtd-link]: http://pybwa.readthedocs.org/en/stable
[bwa-link]: https://github.com/lh3/bwa].
24 changes: 12 additions & 12 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import multiprocessing
from pathlib import Path

SOURCE_DIR = Path("bwapy")
SOURCE_DIR = Path("pybwa")
BUILD_DIR = Path("cython_build")
compile_args = []
link_args = []
Expand All @@ -16,13 +16,13 @@
extra_objects = [] #glob.glob(os.path.join('bwa', '*.o'))
h_files = []
c_files = []
for root_dir in ["bwa", "bwapy"]:
for root_dir in ["bwa", "pybwa"]:
h_files.extend(str(x) for x in Path(root_dir).rglob("*.h"))
c_files.extend(str(x) for x in Path(root_dir).rglob("*.c") if x.name not in ['example.c', 'main.c'])

libbwaindex_module = Extension(
name='bwapy.libbwaindex',
sources=['bwapy/libbwaindex.pyx'] + c_files,
name='pybwa.libbwaindex',
sources=['pybwa/libbwaindex.pyx'] + c_files,
depends=h_files,
extra_compile_args=compile_args,
extra_link_args=link_args,
Expand All @@ -34,8 +34,8 @@
)

libbwaaln_module = Extension(
name='bwapy.libbwaaln',
sources=['bwapy/libbwaaln.pyx'] + c_files,
name='pybwa.libbwaaln',
sources=['pybwa/libbwaaln.pyx'] + c_files,
depends=h_files,
extra_compile_args=compile_args,
extra_link_args=link_args,
Expand All @@ -47,8 +47,8 @@
)

libbwamem_module = Extension(
name='bwapy.libbwamem',
sources=['bwapy/libbwamem.pyx'] + c_files,
name='pybwa.libbwamem',
sources=['pybwa/libbwamem.pyx'] + c_files,
depends=h_files,
extra_compile_args=compile_args,
extra_link_args=link_args,
Expand Down Expand Up @@ -106,7 +106,7 @@ def build():

# Use Setuptools to collect files
distribution = Distribution({
"name": "bwapy",
"name": "pybwa",
'version': '0.0.1', # FIXME
'description': 'Todo', # FIXME
'long_description': 'FIXME',
Expand All @@ -116,9 +116,9 @@ def build():
'license': 'MIT',
'platforms': ['POSIX', 'UNIX', 'MacOS'],
'classifiers': [_f for _f in CLASSIFIERS.split('\n') if _f],
'url': 'https://github.com/fulcrumgenomics/bwapy',
'packages': ['bwapy'],
'package_dirs': {'bwapy': 'bwapy'},
'url': 'https://github.com/fulcrumgenomics/pybwa',
'packages': ['pybwa'],
'package_dirs': {'pybwa': 'pybwa'},
"ext_modules": extension_modules,
"cmdclass": {
"build_ext": cython_build_ext,
Expand Down
3 changes: 0 additions & 3 deletions bwapy/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# bwapy
# pybwa

Python bindings for BWA

## Documentation Contents

* [Installation](installation-and-developers-documentation.md)
* [API](reference/bwapy/index.md)
* [API](reference/pybwa/index.md)

2 changes: 1 addition & 1 deletion docs/installation-and-developers-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Recommended Installation

The package `bwapy` requires cloning [`bwa`](https://github.com/lh3/bwa) into the source directory.
The package `pybwa` requires cloning [`bwa`](https://github.com/lh3/bwa) into the source directory.

```console
git clone [email protected]:lh3/bwa.git
Expand Down
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: bwapy
site_url: https://bwapy.readthedocs.io/en/latest/
site_name: pybwa
site_url: https://pybwa.readthedocs.io/en/latest/
use_directory_urls: false
theme:
name: material
Expand All @@ -11,7 +11,7 @@ theme:
navstyle: dark
include_sidebar: true
collapse_navigation: false
repo_url: https://github.com/fulcrumgenomics/bwapy
repo_url: https://github.com/fulcrumgenomics/pybwa
plugins:
- autorefs:
resolve_closest: true
Expand Down
2 changes: 1 addition & 1 deletion bwapy.yml → pybwa.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: bwapy
name: pybwa
channels:
- defaults
- conda-forge
Expand Down
3 changes: 3 additions & 0 deletions pybwa/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from pybwa.libbwaaln import * # noqa: F403
from pybwa.libbwaindex import * # noqa: F403
from pybwa.libbwamem import * # noqa: F403
File renamed without changes.
2 changes: 1 addition & 1 deletion bwapy/libbwaaln.pyi → pybwa/libbwaaln.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import List
from pysam import AlignedSegment
from pysam import FastxRecord

from bwapy.libbwaindex import BwaIndex
from pybwa.libbwaindex import BwaIndex

class BwaAlnOptions:
def __init__(self, max_hits: int = 3) -> None: ...
Expand Down
6 changes: 3 additions & 3 deletions bwapy/libbwaaln.pyx → pybwa/libbwaaln.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ from libc.stdint cimport uint8_t
from libc.stdlib cimport calloc, free
from libc.string cimport strncpy
from pysam import FastxRecord, AlignedSegment
from bwapy.libbwaindex cimport force_bytes
from bwapy.libbwaindex cimport BwaIndex
from pybwa.libbwaindex cimport force_bytes
from pybwa.libbwaindex cimport BwaIndex


__all__ = [
Expand All @@ -17,7 +17,7 @@ __all__ = [
]

cdef class BwaAlnOptions:
"""The container for options for [`BwaAln`][bwapy.BwaAln]."""
"""The container for options for [`BwaAln`][pybwa.BwaAln]."""
cdef gap_opt_t * _delegate

_max_hits: int
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bwapy/libbwamem.pyi → pybwa/libbwamem.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from typing import List
from pysam import AlignedSegment
from pysam import FastxRecord

from bwapy.libbwaindex import BwaIndex
from pybwa.libbwaindex import BwaIndex

# class syntax
@enum.unique
Expand Down
6 changes: 3 additions & 3 deletions bwapy/libbwamem.pyx → pybwa/libbwamem.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import List
from libc.string cimport memset, memcpy
from libc.stdlib cimport calloc, free
import enum
from bwapy.libbwaindex cimport BwaIndex
from pybwa.libbwaindex cimport BwaIndex
from pysam import FastxRecord, AlignedSegment

__all__ = [
Expand All @@ -25,7 +25,7 @@ class BwaMemMode(enum.Enum):


cdef class BwaMemOptions:
"""The container for options for [`BwaMem`][bwapy.BwaMem]."""
"""The container for options for [`BwaMem`][pybwa.BwaMem]."""
_ignore_alt: bool
_mode: BwaMemMode | None
cdef mem_opt_t* _options
Expand Down Expand Up @@ -201,7 +201,7 @@ cdef class BwaMemOptions:


cdef class BwaMemOptionsBuilder(BwaMemOptions):
"""The container for options for [`BwaMem`][bwapy.BwaMem]."""
"""The container for options for [`BwaMem`][pybwa.BwaMem]."""
cdef mem_opt_t* _options0

def __init__(self, options: BwaMemOptions | None = None):
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "bwapy"
name = "pybwa"
version = "0.0.1-dev"
description = "Python bindings for BWA"
authors = ["Nils Homer"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/fulcrumgenomics/bwapy"
repository = "https://github.com/fulcrumgenomics/bwapy"
homepage = "https://github.com/fulcrumgenomics/pybwa"
repository = "https://github.com/fulcrumgenomics/pybwa"
keywords = ["bioinformatics"]
packages = [{ include = "bwapy" }]
packages = [{ include = "pybwa" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
Expand All @@ -23,7 +23,7 @@ classifiers = [
]
include = [
"LICENSE",
{ path = "bwapy/**/*.so", format = "wheel" },
{ path = "pybwa/**/*.so", format = "wheel" },
{ path = "**/*.so", format = "wheel" },
{ path = "*.so", format = "wheel" },
#{ path = "*.so", format = "wheel" }
Expand Down

0 comments on commit 71cddda

Please sign in to comment.