Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to Tyranno
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/tyranno
# SPDX-License-Identifier: Apache-2.0

# Check https://editorconfig.org for more information
# These are derived from https://ukupat.github.io/tabs-or-spaces/
# The most majority indentation style was selected for each language
root = true

# In 2022, most languages are 2-space
# We assume TypeScript to be 2-space because JavaScript and JSX so strongly are,
# and we'd rather keep those two consistent.
[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

# 4-space, traditionally compiled without bytecode or JIT --
# Julia, Rust, D, C++, Objective-C, C, Fortran, and Assembly
# We exclude Fortran fixed-form (e.g. .f/.ftn); these have weird indentation rules
# C++ is even between 4-space and 2-space, while C is even between 4-space and tab
[*.{julia,rs,d,cpp,c,m,mm,f[0-9][0-9],inc,h,s,asm}]
indent_size = 4

# 4-space, generally VM --
# Erlang, F#, Python, PHP (in 8+), Java, Kotlin, Groovy (+Gradle), F#, erlang, Swift
[*.{py,php,java,groovy,gradle,kt,kts,cs,fs,fsx,fsi,erl,swift}]
indent_size = 4

# 4-space, generally interpreted --
# Lua, Vala, Perl, PowerShell, Batch
# Lua and Vala are about even between 4-space and tab
[*.{lua,vala,pl,perl,ps1,bat}]
indent_size = 4

# tab-based --
# Go, Haxe, Verilog, System Verilog, SAS, and AutoIt
[*.{go,hx,v,sv,sas,au3}]
indent_style = tab

# CSV-like
[*.{tsv,tab,csv}]
# do NOT add a newline or trim whitespace
# indent_style=tab seems safer but is probably not necessary
indent_style = tab
trim_trailing_whitespace = false
insert_final_newline = false
52 changes: 52 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Build, test, and publish to releases, packages, PyPi, etc.
# Runs when creating a GitHub release
name: publish
on:
release:
types: [published]
branches: [main, master, "release/**", "releases/**"]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
name: "test on ${{ matrix.os }}/py${{ matrix.python-version }}"
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Install Tox
run: pip install tox>=4,<5"
- name: Test with tox
run: |
tox -v
deploy:
runs-on: ubuntu-latest
needs: ["test"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install build meta-dependencies
run: pip install .
- name: Build sdists and wheels with Poetry
run: |
poetry build
poetry install
- name: Attach artifacts to the GitHub release
uses: skx/github-action-publish-binaries@master
with:
args: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PyPi
run: |
poetry publish -vv --username __token__ --password ${{ secrets.PYPI_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/pull-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Runs tests via tox
# Runs on pull requests to main
name: pulltest
on:
pull_request:
types: [ready_for_review, opened, reopened]
branches: [main, master, stable, "release/**", "releases/**"]
paths-ignore: ["**/*.md", "**/*.rst"]
jobs:
test:
name: "Test ${{ github.ref_type }}:${{ github.ref_name }} on ${{ matrix.os }}/py${{ matrix.python-version }}"
strategy:
max-parallel: 1
matrix:
os: [ubuntu-latest, windows-latest", macos-latest]
python-version: ["3.11"]
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Install Tox
run: pip install tox>=4,<5"
- name: Test with tox
run: |
tox -v
26 changes: 26 additions & 0 deletions .github/workflows/push-main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Build, test, and run static analyses, and send reports to external services
# Runs only on pushing to main
name: maintest
on:
push:
branches: [main, master]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
name: "test on ${{ matrix.os }}/py${{ matrix.python-version }}"
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Install Tox
run: pip install "tox>=4,<5"
- name: Test with tox
run: |
tox -v
80 changes: 80 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Also see https://github.com/github/gitignore/blob/master/Python.gitignore
# This is simpler and easier to understand
# We'll ignore all .* files and then re-add some

# General hidden or unwanted
.*
~*
*~
*#
Thumbs.db
*.bak
*.swp
tmp/
null

# Log files and binary files
*.log
*.zip
*.tar.gz
*.tgz
*.gz
*.tar
*.z7
*.exe
*.msi
*.pkg
*.dll
*.so

# Python temp and build files
docs/html/
__pycache__/
__pypackages__/
*.py[cod]
*$py.class
*.egg-info
pip-wheel-metadata
share/python-wheels/
build/
dist/
eggs/
sdist/
docs/_build
cython_debug/
docs/autoapi

# Hidden files that are definitely unwanted (redundant)
.tox/
.pytest_cache
.ipynb_checkpoints

# Files from other languages
*.o
hs_err_pid*
*.class
*.jl.cov
*.jl.*.cov
*.jl.mem
deps/deps.jl

# Keep these config files
!/.gitignore
!/.prettierignore
!/.travis.yml
!/.travis.yaml
!/.circleci/config.yml
!/.circleci/config.yaml
!/.github
!/.appveyor.yml
!/.appveyor.yaml
!/.flake8
!/.readthedocs.yml
!/.readthedocs.yaml
!/.dockerignore
!/.editorconfig
!/.pre-commit-config.yml
!/.pre-commit-config.yaml
!.npmignore
!/.scrutinizer.yml
!/.scrutinizer.yaml
43 changes: 43 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Check out https://pre-commit.com/ for documentation
# :tyranno: minimum_pre_commit_version: $project.optional-dependencies.test.pre-commit}
minimum_pre_commit_version: 3.3.3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
exclude: "^tests/(?:resources|data)/"
- id: fix-encoding-pragma
args: [--remove]
- id: trailing-whitespace

# --- Commit msg checks ---
- hooks:
- id: commitizen
stages: ["commit-msg"]
repo: https://github.com/commitizen-tools/commitizen
rev: v3.6.0

# --- Linters ---
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.280
hooks:
- id: ruff
args: [--fix-only]
types_or: [python, pyi, jupyter]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
stages: [commit]
args: [--print-width, "100"]
exclude: ^recipes/.*
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog for rd_filters

Refer to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) for formatting information.

## 0.2.0 - unreleased

### Changed

- Redesigned CLI

### Dropped

- Past-EOL Python version support

### Fixed

- Build infrastructure and CI/CD
- Removed pandas dependency
Loading