Skip to content

Commit

Permalink
use pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
JelmerBot committed Feb 3, 2025
1 parent e0e87a0 commit e207eeb
Show file tree
Hide file tree
Showing 18 changed files with 98 additions and 114 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
branches:
- main
paths:
- 'doc/**'
- 'docs/**'
- 'multi_mst/*.py'
- '.github/workflows/Docs.yml'
workflow_dispatch:

jobs:
pages:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -27,30 +27,20 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@v5
name: Install python
with:
python-version: "3.10"
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt-get install -y pandoc
pip install -e .
- name: Prepare Examples
run: |
cd notebooks
for FILE in *.ipynb; do
cp $FILE ../doc
cp $FILE ../docs
done
cd ..
- id: deployment
uses: sphinx-notes/pages@v3
with:
cache: True
checkout: False
documentation_path: ./doc
requirements_path: ./doc/requirements.txt
checkout: False
2 changes: 1 addition & 1 deletion .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
publish_pypi:
name: Publish to PyPi
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches:
- main
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'notebooks/**'
- 'README.md'
- '.gitignore'
Expand All @@ -18,7 +18,7 @@ on:
branches:
- main
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'notebooks/**'
- 'README.md'
- '.gitignore'
Expand All @@ -29,7 +29,7 @@ on:
jobs:
build_dists:
name: Build dists
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
outputs:
WHEEL_NAME: ${{ steps.dists.outputs.WHEEL_NAME }}
steps:
Expand All @@ -46,7 +46,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install twine flake8 build
- name: Lint with flake8
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MANIFEST
.pytest_cache/

# Sphinx documentation
doc/_build/
docs/_build/

# Jupyter Notebook
.ipynb_checkpoints
Expand Down
10 changes: 0 additions & 10 deletions doc/requirements.txt

This file was deleted.

File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
70 changes: 35 additions & 35 deletions doc/make.bat → docs/make.bat
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
55 changes: 54 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
[build-system]
requires = ["setuptools >= 40.6.0", "wheel"]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "multi_mst"
version = "0.2.0"
description = "Minimum spanning tree based manifold approximations."
keywords = ["dimensionality reduction", "clustering", "minimum spanning tree"]
authors = [
{name= "Jelmer Bot", email = "[email protected]" }
]
readme = "README.md"
license = { text = "BSD-2-Clause" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only"
]
requires-python = ">=3.10"
dependencies = [
"numpy >= 1.20, <3",
"scipy >= 1.9",
"scikit-learn >= 1.1",
"umap-learn >= 0.5.4",
"numba >= 0.57.1",
"pynndescent >= 0.5.13",
"fast_hdbscan @ git+https://github.com/TutteInstitute/fast_hdbscan.git@main#egg=fast_hdbscan",
"fast_hbcc @ git+https://github.com/vda-lab/fast_hbcc.git@main#egg=fast_hbcc"
]

[project.urls]
Homepage = "https://github.com/vda-lab/multi_mst"
Issues = "https://github.com/vda-lab/multi_mst/issues"

[tool.setuptools.packages.find]
where = ["src"]
include = ["multi_mst*"]
namespaces = false

[project.optional-dependencies]
tests = ["pytest"]
docs = [
"sphinx >= 8",
"nbsphinx >= 0.9",
"sphinx_rtd_theme >= 2.0",
"matplotlib >= 3.8"
]
notebooks = [
"jupyterlab >= 4",
"matplotlib >= 3.8",
"pandas >= 2.2",
"tqdm >= 4.62.3"
]
8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

40 changes: 0 additions & 40 deletions setup.cfg

This file was deleted.

0 comments on commit e207eeb

Please sign in to comment.