Skip to content

Commit bbbf03e

Browse files
committed
multi_mst v2 on fast_hdbscan update
1 parent 15cb7dc commit bbbf03e

File tree

405 files changed

+18770
-5682
lines changed

Some content is hidden

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

405 files changed

+18770
-5682
lines changed

.github/workflows/Docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Documentation
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4+
cancel-in-progress: true
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- 'doc/**'
12+
- 'multi_mst/*.py'
13+
- '.github/workflows/Docs.yml'
14+
workflow_dispatch:
15+
16+
jobs:
17+
pages:
18+
runs-on: ubuntu-20.04
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
permissions:
23+
pages: write
24+
id-token: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- uses: actions/setup-python@v5
31+
name: Install python
32+
with:
33+
python-version: 3.9
34+
cache: 'pip'
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
sudo apt-get install -y pandoc
40+
pip install -e .
41+
42+
- name: Prepare Examples
43+
run: |
44+
cd notebooks
45+
for FILE in *.ipynb; do
46+
cp $FILE ../doc
47+
done
48+
cd ..
49+
50+
- id: deployment
51+
uses: sphinx-notes/pages@v3
52+
with:
53+
cache: True
54+
checkout: False
55+
documentation_path: ./doc
56+
requirements_path: ./doc/requirements.txt

.github/workflows/Publish.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish Python Package
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4+
cancel-in-progress: false
5+
6+
on:
7+
push:
8+
tags:
9+
- v*
10+
workflow_dispatch:
11+
12+
jobs:
13+
publish_pypi:
14+
name: Publish to PyPi
15+
runs-on: ubuntu-20.04
16+
permissions:
17+
# IMPORTANT: this permission is mandatory for trusted publishing
18+
id-token: write
19+
contents: write
20+
environment:
21+
name: pypi
22+
url: https://pypi.org/p/multi_mst
23+
steps:
24+
- name: Extract version
25+
id: version
26+
run: |
27+
TAG=${{ github.ref }}
28+
VERSION=${TAG#refs/tags/v}
29+
echo "version=$VERSION" >> $GITHUB_OUTPUT
30+
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
31+
32+
- name: Download sdist
33+
uses: dawidd6/action-download-artifact@v7
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
workflow: Tests.yml
37+
workflow_conclusion: success
38+
branch: main
39+
path: .
40+
41+
- name: Move files to dist
42+
run: |
43+
mkdir dist
44+
mv dists/* dist/
45+
if [[ ! -f dist/multi_mst-${{ steps.version.outputs.version }}.tar.gz ]] ; then exit 1; fi
46+
47+
- name: Create Github Release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
run: |
51+
gh release create -R vda-lab/multi_mst -t "Version ${{ steps.version.outputs.version }}" -n "**Full Changelog**: https://github.com/vda-lab/multi_mst/commits/${{ steps.version.outputs.tag }}" "${{ steps.version.outputs.tag }}" dist/*.whl dist/*.tar.gz
52+
53+
- name: Publish package to (Test)PyPI
54+
uses: pypa/[email protected]
55+
# Comment lines below to publish to PyPi instead of test PyPi
56+
# with:
57+
# repository-url: https://test.pypi.org/legacy/

.github/workflows/Tests.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: Tests
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4+
cancel-in-progress: true
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths-ignore:
11+
- 'doc/**'
12+
- 'notebooks/**'
13+
- 'README.md'
14+
- '.gitignore'
15+
- '.github/workflows/Docs.yml'
16+
- '.github/workflows/Publish.yml'
17+
pull_request:
18+
branches:
19+
- main
20+
paths-ignore:
21+
- 'doc/**'
22+
- 'notebooks/**'
23+
- 'README.md'
24+
- '.gitignore'
25+
- '.github/workflows/Docs.yml'
26+
- '.github/workflows/Publish.yml'
27+
workflow_dispatch:
28+
29+
jobs:
30+
build_dists:
31+
name: Build dists
32+
runs-on: ubuntu-20.04
33+
outputs:
34+
WHEEL_NAME: ${{ steps.dists.outputs.WHEEL_NAME }}
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
- uses: actions/setup-python@v5
41+
name: Install python
42+
with:
43+
python-version: 3.9
44+
cache: 'pip'
45+
46+
- name: Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install -r requirements.txt
50+
pip install twine flake8 build
51+
52+
- name: Lint with flake8
53+
run: |
54+
# stop the build if there are Python syntax errors or undefined names
55+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
56+
57+
- name: Build dists
58+
id: dists
59+
run: |
60+
python -m build --sdist --wheel
61+
python ci/export_name.py
62+
63+
- name: Check README rendering for PyPI
64+
run: twine check dist/*
65+
66+
- name: Upload sdist result
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: dists
70+
path: dist/*
71+
if-no-files-found: error
72+
73+
test_sdist:
74+
name: Test dist for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
75+
needs: build_dists
76+
runs-on: ${{ matrix.os }}
77+
strategy:
78+
fail-fast: true
79+
matrix:
80+
include:
81+
- os: windows-latest
82+
python: "3.9"
83+
platform_id: win_amd64
84+
- os: windows-latest
85+
python: "3.10"
86+
platform_id: win_amd64
87+
- os: windows-latest
88+
python: "3.11"
89+
platform_id: win_amd64
90+
91+
# Linux 64 bit manylinux2014
92+
- os: ubuntu-latest
93+
python: "3.9"
94+
platform_id: manylinux_x86_64
95+
manylinux_image: manylinux2014
96+
- os: ubuntu-latest
97+
python: "3.10"
98+
platform_id: manylinux_x86_64
99+
manylinux_image: manylinux2014
100+
- os: ubuntu-latest
101+
python: "3.11"
102+
platform_id: manylinux_x86_64
103+
manylinux_image: manylinux2014
104+
105+
# MacOS x86_64
106+
- os: macos-latest
107+
python: "3.9"
108+
platform_id: macosx_x86_64
109+
- os: macos-latest
110+
python: "3.10"
111+
platform_id: macosx_x86_64
112+
- os: macos-latest
113+
python: "3.11"
114+
platform_id: macosx_x86_64
115+
steps:
116+
- name: Download sdist
117+
uses: actions/download-artifact@v4
118+
with:
119+
name: dists
120+
path: dist/
121+
122+
- name: Setup Python
123+
uses: actions/setup-python@v5
124+
with:
125+
python-version: ${{ matrix.python }}
126+
127+
- name: Install dependencies
128+
run: |
129+
python -m pip install --upgrade pip
130+
pip install pytest
131+
132+
- name: Run tests
133+
run: |
134+
pip install dist/${{ needs.build_dists.outputs.WHEEL_NAME }}
135+
python -c "from multi_mst.tests import run_tests; run_tests()"
136+

.gitignore

Lines changed: 3 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6-
# C extensions
7-
*.so
8-
96
# Distribution / packaging
107
.Python
118
build/
@@ -14,8 +11,6 @@ dist/
1411
downloads/
1512
eggs/
1613
.eggs/
17-
lib/
18-
lib64/
1914
parts/
2015
sdist/
2116
var/
@@ -27,80 +22,20 @@ share/python-wheels/
2722
*.egg
2823
MANIFEST
2924

30-
# PyInstaller
31-
# Usually these files are written by a python script from a template
32-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33-
*.manifest
34-
*.spec
35-
36-
# Installer logs
37-
pip-log.txt
38-
pip-delete-this-directory.txt
39-
4025
# Unit test / coverage reports
41-
htmlcov/
42-
.tox/
43-
.nox/
44-
.coverage
45-
.coverage.*
46-
.cache
47-
nosetests.xml
48-
coverage.xml
49-
*.cover
50-
*.py,cover
51-
.hypothesis/
5226
.pytest_cache/
5327

54-
# Translations
55-
*.mo
56-
*.pot
57-
58-
# Django stuff:
59-
*.log
60-
local_settings.py
61-
db.sqlite3
62-
db.sqlite3-journal
63-
64-
# Flask stuff:
65-
instance/
66-
.webassets-cache
67-
68-
# Scrapy stuff:
69-
.scrapy
70-
7128
# Sphinx documentation
72-
docs/_build/
73-
74-
# PyBuilder
75-
target/
29+
doc/_build/
7630

7731
# Jupyter Notebook
7832
.ipynb_checkpoints
33+
!notebooks/lib/
7934

8035
# IPython
8136
profile_default/
8237
ipython_config.py
8338

84-
# pyenv
85-
.python-version
86-
87-
# pipenv
88-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91-
# install all needed dependencies.
92-
#Pipfile.lock
93-
94-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95-
__pypackages__/
96-
97-
# Celery stuff
98-
celerybeat-schedule
99-
celerybeat.pid
100-
101-
# SageMath parsed files
102-
*.sage.py
103-
10439
# Environments
10540
.env
10641
.venv
@@ -110,20 +45,4 @@ ENV/
11045
env.bak/
11146
venv.bak/
11247

113-
# Spyder project settings
114-
.spyderproject
115-
.spyproject
116-
117-
# Rope project settings
118-
.ropeproject
119-
120-
# mkdocs documentation
121-
/site
122-
123-
# mypy
124-
.mypy_cache/
125-
.dmypy.json
126-
dmypy.json
127-
128-
# Pyre type checker
129-
.pyre/
48+
*.code-workspace

0 commit comments

Comments
 (0)