Skip to content

Commit ac2ccfd

Browse files
authored
Merge branch 'main' into github_actions_32bit_test
2 parents f95eabd + b6e40e7 commit ac2ccfd

File tree

374 files changed

+7512
-6455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

374 files changed

+7512
-6455
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Format Python code with black and isort
2+
a100c005f0714ebca78ec7770f770d6522b3b870

.github/workflows/deploy.yaml

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,48 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ubuntu-latest, macos-latest]
13-
arch: [auto]
1412
include:
1513
- os: ubuntu-latest
16-
arch: aarch64
14+
archs: auto
15+
- os: macos-latest
16+
archs: x86_64 arm64
17+
- os: ubuntu-latest
18+
archs: aarch64
1719
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions/setup-python@v2
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
2024
- name: Set up QEMU to build non-native architectures
21-
if: ${{ matrix.arch == 'aarch64' }}
22-
uses: docker/setup-qemu-action@v1
25+
if: ${{ matrix.archs == 'aarch64' }}
26+
uses: docker/setup-qemu-action@v3
2327
- name: Install required Python packages
2428
run: |
2529
python -m pip install --upgrade pip setuptools wheel
2630
python -m pip install 'cibuildwheel>=2.2.0' twine
2731
- name: Build wheels
2832
run: python -m cibuildwheel --output-dir dist
2933
env:
30-
CIBW_ARCHS: ${{matrix.arch}}
31-
# Skip building musllinux wheels for aarch64, each one currently takes
32-
# more than 2 hours to build.
33-
CIBW_SKIP: '*-musllinux_aarch64'
34+
CIBW_ARCHS: ${{ matrix.archs }}
35+
# Skip building musllinux wheels for the CPython versions for which the
36+
# numpy version we build against doesn't have musllinux wheels on PyPI.
37+
# Skip building for PyPy 3.8, which is deprecated upstream.
38+
# Skip building for PyPy on i686 since NumPy 2.0 fails to build on it.
39+
CIBW_SKIP: "cp38-musllinux_* pp38-* pp*-manylinux_i686"
3440
- name: Check packages
3541
run: twine check dist/*
36-
- uses: actions/upload-artifact@v2
42+
- uses: actions/upload-artifact@v4
3743
with:
38-
name: packages
44+
name: "packages-${{ matrix.os }}-${{ matrix.archs }}"
3945
path: dist/
4046

4147
build_sdist:
4248
runs-on: ubuntu-latest
4349
steps:
44-
- uses: actions/checkout@v2
45-
- uses: actions/setup-python@v2
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-python@v5
52+
with:
53+
python-version: '3.x'
4654
- name: Install required Python packages
4755
run: |
4856
python -m pip install --upgrade pip setuptools wheel
@@ -57,21 +65,24 @@ jobs:
5765
python -c 'import bx, bx.align, bx.align.sitemask, bx.align.tools, bx.arrays, bx.bbi, bx.cookbook, bx.intervals, bx.intervals.operations, bx.intseq, bx.misc, bx.motif, bx.motif.io, bx.motif.logo, bx.phylo, bx.pwm, bx.seq, bx.tabular, bx_extras'
5866
- name: Check packages
5967
run: twine check dist/*
60-
- uses: actions/upload-artifact@v2
68+
- uses: actions/upload-artifact@v4
6169
with:
62-
name: packages
70+
name: packages-sdist
6371
path: dist/
6472

6573
upload_pypi:
66-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'bxlab'
6774
needs: [build_wheels, build_sdist]
6875
runs-on: ubuntu-latest
6976
steps:
70-
- uses: actions/download-artifact@v2
77+
- uses: actions/download-artifact@v4
7178
with:
72-
name: packages
79+
merge-multiple: true
7380
path: dist
81+
pattern: packages-*
82+
- name: Display structure of downloaded files
83+
run: ls -R dist/
7484
- name: Publish to PyPI
85+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'bxlab'
7586
uses: pypa/gh-action-pypi-publish@release/v1
7687
with:
7788
user: __token__

.github/workflows/test.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ['3.6', '3.9']
11+
python-version: ['3.8', '3.12']
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-python@v2
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
1515
with:
1616
python-version: ${{ matrix.python-version }}
17-
- name: Install flake8
18-
run: pip install flake8 flake8-import-order
17+
- name: Install tox
18+
run: pip install tox
1919
- name: Lint
20-
run: flake8 .
20+
run: tox -e lint
2121
test:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ['3.6', '3.7', '3.8', '3.9']
26+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
2727
steps:
28-
- uses: actions/checkout@v2
29-
- uses: actions/setup-python@v2
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Install liblzo2-dev
3333
run: sudo apt-get update && sudo apt-get -y install liblzo2-dev
3434
- name: Install tox
3535
run: pip install tox
3636
- name: Test
37-
run: tox
37+
run: tox -e test
3838
test-32bit:
3939
runs-on: ubuntu-latest
4040
strategy:
@@ -53,4 +53,4 @@ jobs:
5353
run: export PYTHON=python3.7 && sudo -H $PYTHON -m pip install -U pip \
5454
&& sudo -H $PYTHON -m pip install wheel virtualenv setuptools tox
5555
- name: Test
56-
run: tox
56+
run: tox -e test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ nose*.egg
3232

3333
# Built sdist directory
3434
dist
35+
36+
# Testing
37+
.tox/

.isort.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[settings]
2+
force_alphabetical_sort_within_sections=true
3+
# Override force_grid_wrap value from profile=black, but black is still happy
4+
force_grid_wrap=2
5+
known_first_party=bx,bx_extras
6+
# Same line length as for black
7+
line_length=120
8+
no_lines_before=LOCALFOLDER
9+
profile=black
10+
reverse_relative=true
11+
skip_gitignore=true

.readthedocs.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.12"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: doc/source/conf.py
16+
17+
# Optionally build your docs in additional formats such as PDF and ePub
18+
# formats:
19+
# - pdf
20+
21+
# Optional but recommended, declare the Python requirements required
22+
# to build your documentation
23+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
24+
python:
25+
install:
26+
- path: .
27+
- requirements: doc/requirements.txt

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ recursive-include src *.c
44
recursive-include lib *.h
55
recursive-include lib *.c
66
recursive-include lib *.pyx
7+
recursive-include lib *.pxd

doc/Makefile

Lines changed: 20 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,20 @@
1-
# Makefile for Sphinx documentation
2-
#
3-
4-
# You can set these variables from the command line.
5-
SPHINXOPTS =
6-
SPHINXBUILD = sphinx-build
7-
PAPER =
8-
9-
# Internal variables.
10-
PAPEROPT_a4 = -D latex_paper_size=a4
11-
PAPEROPT_letter = -D latex_paper_size=letter
12-
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
13-
14-
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
15-
16-
help:
17-
@echo "Please use \`make <target>' where <target> is one of"
18-
@echo " html to make standalone HTML files"
19-
@echo " apidoc to run epydoc"
20-
@echo " pickle to make pickle files"
21-
@echo " json to make JSON files"
22-
@echo " htmlhelp to make HTML files and a HTML help project"
23-
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
24-
@echo " changes to make an overview over all changed/added/deprecated items"
25-
@echo " linkcheck to check all external links for integrity"
26-
27-
clean:
28-
-rm -rf docbuild/*
29-
30-
html:
31-
mkdir -p build/html build/doctrees
32-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) docbuild/html
33-
@echo
34-
@echo "Build finished. The HTML pages are in docbuild/html."
35-
36-
apidoc:
37-
mkdir -p build/html/apidoc
38-
epydoc-2.6 --docformat restructuredtext ../lib/bx -o docbuild/html/apidoc
39-
@echo
40-
@echo "Epydoc finished. The pages are in docbuild/html/apidoc."
41-
42-
43-
pickle:
44-
mkdir -p build/pickle build/doctrees
45-
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) docbuild/pickle
46-
@echo
47-
@echo "Build finished; now you can process the pickle files."
48-
49-
web: pickle
50-
51-
json:
52-
mkdir -p build/json build/doctrees
53-
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) docbuild/json
54-
@echo
55-
@echo "Build finished; now you can process the JSON files."
56-
57-
htmlhelp:
58-
mkdir -p build/htmlhelp build/doctrees
59-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) docbuild/htmlhelp
60-
@echo
61-
@echo "Build finished; now you can run HTML Help Workshop with the" \
62-
".hhp project file in build/htmlhelp."
63-
64-
latex:
65-
mkdir -p build/latex build/doctrees
66-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) docbuild/latex
67-
@echo
68-
@echo "Build finished; the LaTeX files are in build/latex."
69-
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
70-
"run these through (pdf)latex."
71-
72-
changes:
73-
mkdir -p build/changes build/doctrees
74-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) docbuild/changes
75-
@echo
76-
@echo "The overview file is in build/changes."
77-
78-
linkcheck:
79-
mkdir -p build/linkcheck build/doctrees
80-
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) docbuild/linkcheck
81-
@echo
82-
@echo "Link check complete; look for any errors in the above output " \
83-
"or in build/linkcheck/output.txt."
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

doc/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
https://bitbucket.org/james_taylor/python-lzo-static/get/63987d89fd1b.zip
21
numpy
2+
sphinx
3+
sphinx-rtd-theme

0 commit comments

Comments
 (0)