Skip to content

Commit

Permalink
Update docs (#14)
Browse files Browse the repository at this point in the history
* Fix broken links, badges in docs, README

* Bump version so that PyPI and docs version coincide

* Remove deprecated deploy instructions

* Add dependabot

* Rename and update test workflow

* Rename and update publishing workflow

* Update readthedocs.yml

* Fix docstrings with missing, incorrect parameters

* Update examples notebook

* Add eyeglasses example to docs

* Include eyeglasses API in docs
  • Loading branch information
catanzaromj authored Mar 16, 2024
1 parent 120a960 commit 12a5020
Show file tree
Hide file tree
Showing 13 changed files with 410 additions and 214 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Set update schedule for GitHub Actions

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
52 changes: 52 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Build and Upload Python Package

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published

jobs:
build_wheel_and_sdist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build SDist and wheel
run: pipx run build

- uses: actions/upload-artifact@v4
with:
name: Packages
path: dist/*

- name: Check metadata
run: pipx run twine check dist/*

upload_pypi:
name: Upload release to PyPI
needs: [build_wheel_and_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/tadasets
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
41 changes: 0 additions & 41 deletions .github/workflows/python-app.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/python-publish.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest-cov
pip install -e ".[testing]"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov tadasets
- name: Upload coverage results
run: |
bash <(curl -s https://codecov.io/bash)
17 changes: 11 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.11"

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
29 changes: 0 additions & 29 deletions DEPLOY.md

This file was deleted.

18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[![PyPI version](https://badge.fury.io/py/tadasets.svg)](https://badge.fury.io/py/tadasets)
[![Downloads](https://pypip.in/download/tadasets/badge.svg)](https://pypi.python.org/tadasets/)
[![Build Status](https://travis-ci.org/scikit-tda/tadasets.svg?branch=master)](https://travis-ci.org/scikit-tda/tadasets)
![PyPI - Downloads](https://img.shields.io/pypi/dm/tadasets)
[![Codecov](https://codecov.io/gh/scikit-tda/tadasets/branch/master/graph/badge.svg)](https://codecov.io/gh/scikit-tda/tadasets)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


This package provides some nice utilities for creating and loading data sets that are useful for Topological Data Analysis. Currently, we provide various synthetic data sets with particular topological features.

This package provides some nice utilities for creating and loading data sets
that are useful for Topological Data Analysis. Currently, we provide various
synthetic data sets with particular topological features.

# Setup

Expand All @@ -28,7 +27,7 @@ The shape constructors are exposed in a functional interface, each returning a n

Each shape can be embedded in arbitrary ambient dimension by supplying the `ambient` argument. Additionally, noise can be added to the shape through the `noise` argument.

```
```python
import tadasets

torus = tadasets.torus(n=2000, c=2, a=1, ambient=200, noise=0.2)
Expand All @@ -38,13 +37,10 @@ infty_sign = tadasets.infty_sign(n=3000, noise=0.1)
eyeglasses = tadasets.eyeglasses(n=1000, r1=1, r2=2, neck_size=.5, noise=0.1, ambient=10)
```

Contributions
------------------
## Contributions

We welcome contributions of all shapes and sizes. There are lots of opportunities for potential projects, so please get in touch if you would like to help out. Everything from an implementation of your favorite distance, notebooks, examples, and documentation are all equally valuable so please don’t feel you can’t contribute.

If you have ideas for new shapes or features, please do suggest them in an issue and submit a pull request!
If you have ideas for new shapes or features, please do suggest them in an issue and submit a pull request!

To contribute please fork the project make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.


16 changes: 6 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
.. tadasets documentation master file, created by
sphinx-quickstart on Sun Jul 22 20:37:23 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
|PyPI version| |Downloads| |License: MIT| |Travis-CI| |Codecov|
|PyPI version| |Downloads| |Codecov| |License: MIT|

This package provides some nice utilities for creating and loading data sets that are useful for Topological Data Analysis. Currently, we provide various synthetic data sets with particular topological features.

Expand All @@ -26,8 +20,10 @@ The shape constructors are exposed in a functional interface, each returning a n

- torus
- d-sphere
- sphere
- swiss roll
- infinity sign
- eyeglasses

Each shape can be embedded in arbitrary ambient dimension by supplying the :code:`ambient` argument. Additionally, noise can be added to the shape through the :code:`noise` argument.

Expand All @@ -38,7 +34,9 @@ Each shape can be embedded in arbitrary ambient dimension by supplying the :code
torus = tadasets.torus(n=2000, c=2, a=1, ambient=200, noise=0.2)
swiss_roll = tadasets.swiss_roll(n=2000, r=4, ambient=10, noise=1.2)
dsphere = tadasets.dsphere(n=1000, d=12, r=3.14, ambient=14, noise=0.14)
sphere = tadasets.sphere(n=500,seed=42)
infty_sign = tadasets.infty_sign(n=3000, noise=0.1)
eyeglasses = tadasets.eyeglasses(n=670,r1=10.0,r2=5.0)
Contributions
------------------
Expand All @@ -59,12 +57,10 @@ To contribute please fork the project make your changes and submit a pull reques
reference/index
notebooks/Examples

.. |Downloads| image:: https://pypip.in/download/tadasets/badge.svg
.. |Downloads| image:: https://img.shields.io/pypi/dm/tadasets
:target: https://pypi.python.org/tadasets/
.. |PyPI version| image:: https://badge.fury.io/py/tadasets.svg
:target: https://badge.fury.io/py/tadasets
.. |Travis-CI| image:: https://travis-ci.org/scikit-tda/tadasets.svg?branch=master
:target: https://travis-ci.org/scikit-tda/tadasets
.. |Codecov| image:: https://codecov.io/gh/scikit-tda/tadasets/branch/master/graph/badge.svg
:target: https://codecov.io/gh/scikit-tda/tadasets
.. |License: MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
Expand Down
140 changes: 118 additions & 22 deletions docs/notebooks/Examples.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ API Reference
tadasets.sphere
tadasets.swiss_roll
tadasets.infty_sign
tadasets.eyeglasses
2 changes: 1 addition & 1 deletion tadasets/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.2.0"
Loading

0 comments on commit 12a5020

Please sign in to comment.