Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Dec 25, 2024
1 parent d9ea0e8 commit 4f9547c
Show file tree
Hide file tree
Showing 77 changed files with 9,113 additions and 814 deletions.
57 changes: 57 additions & 0 deletions .github/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This release drafter follows the conventions
# from https://keepachangelog.com

name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: ✨ Features
labels:
- feat
- feature
- enhancement
- title: 🪲 Bug Fixes
labels:
- fix
- bug
- title: 🧹 Chore
labels:
- chore
- maintenance
- refactor
- title: ⛔️ Deprecated
labels:
- deprecated
- title: 🗑 Removed
labels:
- removed
- title: 🔐 Security
labels:
- security
- vulnerability
- title: 📄 Documentation
labels:
- docs
- documentation
- title: ⚙️ Dependency Updates
labels:
- deps
- dependencies
collapse-after: 5

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- major
minor:
labels:
- minor
patch:
labels:
- patch
default: patch
template: |
## What's Changed
$CHANGES
136 changes: 136 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: CI/CD Pipeline

on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:


env:
UV_CACHE_DIR: ${{ github.workspace }}/.cache/uv

jobs:
# test:
# name: Test Python ${{ matrix.python-version }}
# runs-on: ubuntu-latest

# strategy:
# fail-fast: false
# matrix:
# python-version: [ "3.9", "3.10", "3.11", "3.12" ]

# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

# - name: Install uv
# uses: astral-sh/setup-uv@v4
# with:
# enable-cache: true
# cache-dependency-glob: "pyproject.toml"

# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# python-version-file: pyproject.toml

# - name: Install dependencies
# run: |
# uv sync --all-extras --dev

# - name: Run tests
# run: |
# uv run pytest tests/

# - name: Check code formatting
# run: |
# uv run ruff check .

build:
name: Build Package
# needs: test
runs-on: ubuntu-latest
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml

- name: Build package
run: |
uv pip install build hatch
hatch build
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
# docs:
# name: Build Documentation
# needs: test
# runs-on: ubuntu-latest
# if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')

# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

# - name: Install uv
# uses: astral-sh/setup-uv@v4
# with:
# enable-cache: true

# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version-file: pyproject.toml

# - name: Install dependencies
# run: |
# uv sync --all-extras --group docs

# - name: Build documentation
# run: |
# uv run mkdocs build

# - name: Store documentation
# uses: actions/upload-artifact@v4
# with:
# name: site
# path: site/

deploy:
name: Deploy to PyPI
needs: [ build ]
runs-on: ubuntu-latest
if: success() && startsWith(github.ref, 'refs/tags/v')
environment:
name: pypi
url: https://pypi.org/p/splitme-ai
permissions:
id-token: write

steps:
- name: Download dist artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
40 changes: 40 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Drafter

on:
push:
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 44 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
.pytest_cache
__pycache__
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.env
.venv
env/
venv/
ENV/
.idea/
.vscode/
*.swp
.DS_Store
.mypy_cache/
.pytest_cache/
.ruff_cache/
.splitme-ai/
.reports/
notebooks/
site/

# wip
docs/integrations/
docs/notes.md
docs/roadmap.md
src/splitme_ai/tools/
src/splitme_ai/tools
5 changes: 5 additions & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
3.13.0
3.12.6
3.11.10
3.10.15
3.9.20
64 changes: 64 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
exclude = [
".env,",
".git",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pyenv",
".pytest_cache",
".ruff_cache",
"venv",
".venv",
".vscode",
]
line-length = 88
indent-width = 4
target-version = "py311"

[lint]
preview = true
extend-select = [
"E305", # 2 blank lines before class or function
"E501",
]
select = [
"ARG", # unused arguments
"B", # flake8-bugbear
"E", # pycodestyle
"E303", # too many blank lines
"E722", # bare except statements
"F", # pyflakes
"F401", # remove unused imports
"I", # isort
"N", # pep8-naming
"RUF", # ruff
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle
"W291", # trailing whitespace
"W293", # blank line contains whitespace
"F821", # undefined name
]
fixable = ["ALL"]
ignore = [
"UP006",
"UP007",
"UP035",
]
unfixable = []

[lint.isort]
known-third-party = ["readmeai"]
relative-imports-order = "closest-to-furthest"
split-on-trailing-comma=true

[lint.pydocstyle]
convention = "numpy"

[format]
docstring-code-format = true
docstring-code-line-length = 88
indent-style = "space"
line-ending = "auto"
preview = true
quote-style = "double"
Loading

0 comments on commit 4f9547c

Please sign in to comment.