Skip to content

Commit

Permalink
Merge pull request #1 from euro-hpc-pl/kj/docs
Browse files Browse the repository at this point in the history
Documentation and GA workflows update
  • Loading branch information
dexter2206 authored Feb 20, 2023
2 parents 1d646ee + 42e4862 commit 016877a
Show file tree
Hide file tree
Showing 21 changed files with 583 additions and 45 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build package

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install pypa/build
run: python -m pip install build --user
- name: Build binary wheel and source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Testing examples
on: [push]
on: [pull_request]
jobs:
run_tests:
runs-on: [self-hosted,gpu]
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/quality_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run tests and other quality checks

on: [pull_request]

jobs:
run_quality_checks:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- uses: actions/checkout@v3
- name: Install dependencies and the package
run: |
python3.11 -m pip install --upgrade pip
python3.11 -m pip install .[test]
python3.11 -m pip install pre-commit
pre-commit install
pre-commit run -a
14 changes: 1 addition & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,9 @@ repos:
hooks:
- id: black
args: ["--check"]
language_version: python3.9
language_version: python3.11

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.0
hooks:
- id: mypy
args: [
--namespace-packages,
--explicit-package-bases,
--ignore-missing-imports,
--install-types,
--non-interactive
]
9 changes: 9 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

python:
version: "3.8"
install:
- method: pip
path: .
extra_requirements:
- docs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Setuptools plugin for CUDA extensions

[![PyPI version](https://badge.fury.io/py/setuptools-cuda.svg)](https://badge.fury.io/py/setuptools-cuda)
[![github actions](https://github.com/euro-hpc-pl/setuptools_cuda/actions/workflows/build-and-test-examples.yml/badge.svg)](https://github.com/euro-hpc-pl/setuptools_cuda/actions/workflows/build-and-test-examples.yml)
[![github actions](https://github. com/euro-hpc-pl/setuptools_cuda/actions/workflows/build_and_test_examples.yml/badge.svg)](https://github.com/euro-hpc-pl/setuptools_cuda/actions/workflows/build_and_test_examples.yml)

The `setuptools-cuda` is a `setuptools` plugin for building CUDA enabled Python extension modules.

Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
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
28 changes: 28 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "setuptools-cuda"
copyright = "2023, Konrad Jałowiecki"
author = "Konrad Jałowiecki"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["myst_parser"]

templates_path = ["_templates"]
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]

myst_enable_extensions = ["colon_fence", "dollarmath"]
Loading

0 comments on commit 016877a

Please sign in to comment.