Skip to content

Commit

Permalink
Use updated for cibuildwheel with emulation:
Browse files Browse the repository at this point in the history
  • Loading branch information
lgautier committed Dec 7, 2024
1 parent aea95ea commit cef38bd
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 35 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,14 @@ jobs:
python: 310
platform_id: macosx_x86_64
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools build cibuildwheel
- name: Build wheel
uses: pypa/[email protected]
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: cp36-* cp37-* cp38-* pp*
CIBW_ARCHS_LINUX: "auto aarch64"
Expand All @@ -75,9 +72,9 @@ jobs:
output-dir: wheelhouse
config-file: pyproject.toml
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binary-wheels-${{ matrix.platform_id }}
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: wheelhouse/*.whl
test:
needs: [build-sdist]
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
6 changes: 3 additions & 3 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
mashing-pumpkins : m(in|ax)hash
===============================

Flexible-yet-pretty-fast minhash/maxhash-related library for Python >= 3.5.
Flexible-yet-pretty-fast minhash/maxhash-related library for Python > 3.8.

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -233,8 +233,8 @@ function returns a non-numerical only use :class:`MaxSketch`.
An other example is when all elements in the input set are :class:`bytes` and
the common hashing function SHA1 is wanted. In that case the hashing function
would look like follows. Note that hashing function can return non-numerical
values and the hashing function will plainly ignore the :param:`size` and
:param:`buffer` as no sliding window is wanted.
values and the hashing function will plainly ignore parameters `size` and
`buffer` as no sliding window is wanted.

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion src/_xxhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ PyInit__xxhash(void)
}

PyModule_AddIntConstant(m, "DEFAULT_SEED", XXH_DEFAULT_SEED);
return m;
}
40 changes: 22 additions & 18 deletions src/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,31 @@
def chunkpos_iter(nsize: int, lseq: int, w: int) -> (int, int):
"""
Iterator of chunk indices.
This is made to split a long sequence for the purpose of parallel
computing on its constituting ngrams/kmers while not using any
around the split points.
computing on its constituting ngrams/kmers while ensuring no
duplicates or misses around the split points.
For example, a sequence of length 10 for which we want
ngrams/kmers of length 3 can be decomposed into the following
chunks of length 5 would be split into the following 3 chunks:
|0 1 2 3 4 5 6 7 8 9|
|---------| : :
: |---------| :
: : : |------|
0 : 5 : : :
3 : 8 :
6 |
- nsize: n in ngram
- lseq: length of sequence to chunk
- w: width of window
chunks of length 5:
.. code-block:: text
|0 1 2 3 4 5 6 7 8 9|
|---------| : :
: |---------| :
: : : |------|
0 : 5 : : :
3 : 8 :
6 |10
Depending of the combination of parameters, last chunk may be be shorter
than the desired size `w`.
:param:nsize: n in ngram
:param:lseq: length of sequence to chunk
:param:w: width of window (that is the desired length/size of the chunk)
"""

assert nsize <= w
Expand Down

0 comments on commit cef38bd

Please sign in to comment.