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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- main
- master

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"

- name: Install dependencies
run: uv sync --all-extras

- name: Run tests
run: uv run pytest tests/
28 changes: 28 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Checks

on:
pull_request:
branches:
- main
- master

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"

- name: Install dependencies
run: uv sync --all-extras

- name: Run tests
run: uv run pytest tests/
59 changes: 59 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"
release:
types:
- published

jobs:
build:
name: Build Distribution
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"

- name: Install dependencies
run: uv sync --all-extras

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

- name: Build package
run: uv build

- name: Upload distribution artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: build
environment: pypi
permissions:
id-token: write

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

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,8 @@ fabric.properties

.vector_cache
.model

# uv
.uv/
uv.lock
.python-version
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "ro-diacritics"
version = "0.9.4.2"
description = "Python API for Romanian diacritics restoration"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Andrei Paraschiv", email = "andrei@thephpfactory.com" },
]
maintainers = [
{ name = "Andrei Paraschiv", email = "andrei@thephpfactory.com" },
]
keywords = ["romanian", "diacritics", "language", "restoration", "diacritice", "python"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Text Processing",
"Topic :: Text Processing :: Filters",
"Topic :: Text Processing :: General",
"Topic :: Text Processing :: Indexing",
"Topic :: Text Processing :: Linguistic",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.8"
dependencies = [
"torch",
"torchtext",
"numpy",
"tqdm",
"nltk",
"scikit-learn",
]

[project.urls]
Homepage = "https://github.com/AndyTheFactory/RO-Diacritics"
Repository = "https://github.com/AndyTheFactory/RO-Diacritics"

[tool.hatch.build.targets.wheel]
packages = ["ro_diacritics"]

[tool.uv]
dev-dependencies = [
"pytest",
]
59 changes: 0 additions & 59 deletions setup.py

This file was deleted.