Skip to content

Commit

Permalink
Scaffold as python library
Browse files Browse the repository at this point in the history
* Add setup.cfg
* Ignore vscode config
* Add starter README
* Add package manifest
* Add pre-commit config

Closes #6
  • Loading branch information
thatbudakguy committed Feb 26, 2022
1 parent 455969d commit 1119215
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# VSCode project settings
.vscode/
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 21.8b0
hooks:
- id: black
language_version: python
- repo: https://github.com/pycqa/isort
rev: 5.9.3
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include LICENSE
include README.md
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# spacy-phonologizer
a spaCy component for predicting phonological features.
# phoNy: phonology in spaCy!
[![ci status](https://github.com/direct-phonology/spacy-phony/actions/workflows/ci.yml/badge.svg)](https://github.com/direct-phonology/spacy-phony/actions/workflows/ci.yml)
[![pypi version](https://img.shields.io/pypi/v/spacy-phony.svg?style=flat)](https://pypi.org/project/spacy-phony]/)
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

phoNy is a spaCy extension that adds pipeline components, models, and features for working with phonology.
## installation
requires spacy v3.
```sh
pip install spacy-phony
```
## usage
this package currently provides a single pipeline component, the `Phonemizer`, which performs grapheme-to-phoneme conversion. documentation is coming soon!

## developing
after cloning the repository:
```sh
pip install -e ".[dev]"
pre-commit install
```
## building
clear out any previously built packages before building:
```sh
rm -rf dist/*
```
build a source archive and distribution for a release:
```sh
python -m build
```
publish the release on [test PyPI](https://test.pypi.org/) (useful for making sure everything worked):
```sh
python -m twine upload --repository testpypi dist/*
```
if everything looks ok, upload to the real PyPI:
```sh
python -m twine upload dist/*
```
## license
code is licensed under the [MIT license](LICENSE).
55 changes: 55 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[metadata]
name = spacy-phony
version = 0.1.0
description = phonology in spaCy!
url = https://github.com/direct-phonology/phoNy
author = Nick Budak
author_email = budak@stanford.edu
license = MIT
long_description = file: README.md
long_description_content_type = text/markdown
classifiers =
Development Status :: 3 - Alpha
Environment :: Console
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: MIT License
Operating System :: POSIX :: Linux
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Text Processing :: Linguistic
Topic :: Scientific/Engineering
project_urls =
Release notes = https://github.com/direct-phonology/phoNy/releases
Source = https://github.com/direct-phonology/phoNy

[options]
package_dir =
= src
packages = find:
include_package_data = true
python_requires = >=3.6
install_requires =
spacy>=3
setup_requires =
setuptools
setuptools-scm

[options.packages.find]
where = src

[options.extras_require]
dev =
pre-commit
isort
black

[options.entry_points]
spacy_languages =
och = spacy_och:OldChinese

0 comments on commit 1119215

Please # to comment.