Skip to content

Commit

Permalink
3-Dummy Rust-Python interop package. (#4)
Browse files Browse the repository at this point in the history
* pyproject

* try polars apply

* Dummy Rust-Python interop package.

* git changes

* issue templates

---------

Co-authored-by: bwrob <[email protected]>
  • Loading branch information
bwrob and bwrob authored Sep 26, 2024
1 parent 926f485 commit 6d3bd7c
Show file tree
Hide file tree
Showing 20 changed files with 2,368 additions and 674 deletions.
36 changes: 22 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,40 @@ assignees: ''

---

**Describe the bug**
## Describe the bug

A clear and concise description of what the bug is.

**To Reproduce**
## Steps To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
## Expected behavior

A clear and concise description of what you expected to happen.

**Screenshots**
## Screenshots**

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
## Desktop (please complete the following information)

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

## Smartphone (please complete the following information)

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
## Additional context

**Additional context**
Add any other context about the problem here.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: New feature
about: Create a feature request to help us improve
title: ''
labels: ''
assignees: ''

---

## Roadmap step

Part of the roadmap you would like to add to the issue.

## Description

Describe the feature in detail.

## What does it solve?

What does it solve?

## References

List any references to external documentation here.

- [Example](https://example.com)
27 changes: 0 additions & 27 deletions .github/bug-report---.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/feature-request---.md

This file was deleted.

134 changes: 134 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# This file is autogenerated by maturin v1.7.2
# To update, run
#
# maturin generate-ci github
#
name: CI

on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
- runner: ubuntu-latest
target: aarch64
- runner: ubuntu-latest
target: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-12
target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, musllinux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
82 changes: 55 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,60 @@
fail_fast: false
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
- hooks:
- args:
- --fix
id: ruff
- id: ruff-format
repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
- hooks:
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: no-commit-to-branch
- id: trailing-whitespace
- args:
- --autofix
- --indent=4
id: pretty-format-json
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: no-commit-to-branch
- id: trailing-whitespace
- id: pretty-format-json
args: ["--autofix", "--indent=4"]
- repo: https://github.com/DetachHead/basedpyright-pre-commit-mirror
rev: 1.17.5
hooks:
- id: basedpyright
- repo: https://github.com/PyCQA/docformatter
- hooks:
- args:
- --in-place
- --config
- ./pyproject.toml
id: docformatter
repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args: [--in-place, --config, ./pyproject.toml]
- hooks:
- id: fmt
- id: cargo-check
- id: clippy
- id: build
- id: test
repo: https://github.com/FeryET/pre-commit-rust
rev: v1.1.1
- hooks:
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-json
- id: check-xml
- id: check-toml
- id: no-commit-to-branch
- args:
- --autofix
- --indent=4
id: pretty-format-json
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
4 changes: 4 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
reorder_imports = true
reorder_modules = true
merge_derives = true
max_width = 80
Loading

0 comments on commit 6d3bd7c

Please sign in to comment.