-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from CUNY-CL/pyproj
Migrates to pyproject.toml
- Loading branch information
Showing
7 changed files
with
117 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,73 @@ | ||
version: 2 | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- python3.9 | ||
- python3.10 | ||
version: 2.1 | ||
|
||
jobs: | ||
python3.9: &template | ||
pre-build: | ||
description: A check that needs to be done on only one supported Python version | ||
parameters: | ||
command-run: | ||
type: string | ||
docker: | ||
- image: python:3.9 | ||
# Use the latest Python 3.x image from CircleCI that Maxwell supports. | ||
# See: https://circleci.com/developer/images/image/cimg/python | ||
- image: cimg/python:3.10 | ||
#auth9 | ||
# username: $DOCKERHUB_USERNAME | ||
# password: $DOCKERHUB_PASSWORD | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install the full development requirements | ||
working_directory: ~/project/ | ||
command: pip install --progress-bar off -r requirements.txt | ||
command: pip install -r requirements.txt | ||
- run: | ||
name: Run black check | ||
working_directory: ~/project/maxwell | ||
command: black --line-length 79 --check . | ||
- run: | ||
name: Run flake8 check | ||
working_directory: ~/project/maxwell | ||
command: flake8 . | ||
command: << parameters.command-run >> | ||
|
||
build-python: | ||
parameters: | ||
python-version: | ||
type: string | ||
docker: | ||
- image: cimg/python:<< parameters.python-version >> | ||
#auth: | ||
# username: $DOCKERHUB_USERNAME | ||
# password: $DOCKERHUB_PASSWORD | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build source distribution | ||
working_directory: ~/project/ | ||
name: Build source distribution and install package from it | ||
command: | | ||
pip install --progress-bar off --upgrade pip setuptools | ||
python setup.py sdist | ||
pip install dist/`ls dist/ | grep .tar.gz` | ||
pip install -r requirements.txt && \ | ||
python -m build && \ | ||
pip install dist/`ls dist/ | grep .whl` | ||
- run: | ||
name: Run tests | ||
working_directory: ~/project/ | ||
command: python -m maxwell.tests.test_sed | ||
python3.10: | ||
<<: *template | ||
docker: | ||
- image: python:3.10 | ||
name: Show installed Python packages | ||
command: pip list -v | ||
- run: | ||
name: Run python tests | ||
command: | | ||
pytest -vv tests --junitxml /tmp/testxml/report.xml | ||
- store_test_results: | ||
path: /tmp/testxml/ | ||
|
||
workflows: | ||
version: 2 | ||
build-and-test: | ||
jobs: | ||
- pre-build: | ||
name: black | ||
command-run: black --line-length=79 --check . | ||
- pre-build: | ||
name: flake8 | ||
command-run: flake8 . | ||
- pre-build: | ||
name: twine | ||
command-run: | | ||
python -m build && \ | ||
twine check dist/`ls dist/ | grep .tar.gz` && \ | ||
twine check dist/`ls dist/ | grep .whl` | ||
- build-python: | ||
requires: | ||
- black | ||
- flake8 | ||
- twine | ||
matrix: | ||
parameters: | ||
python-version: ["3.9", "3.10"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import actions, sed, util # noqa: F401 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[build-system] | ||
requires = ["setuptools >= 65.5.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
include-package-data = false | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["maxwell*"] | ||
|
||
[project] | ||
name = "maxwell" | ||
version = "0.2.2.post2" | ||
description = "Stochastic Edit Distance aligenr for string transduction" | ||
readme = "README.md" | ||
requires-python = "> 3.9" | ||
license = { text = "Apache 2.0" } | ||
authors = [ | ||
{name = "Simon Clematide"}, | ||
{name = "Peter Makarov"}, | ||
{name = "Travis Bartley"}, | ||
] | ||
keywords = [ | ||
"computational linguistics", | ||
"morphology", | ||
"natural language processing", | ||
"language", | ||
] | ||
dependencies = [ | ||
"numpy >= 1.20.1", | ||
"scipy >= 1.6", | ||
"tqdm >= 4.64.1", | ||
] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Topic :: Text Processing :: Linguistic", | ||
] | ||
|
||
|
||
[project.scripts] | ||
maxwell-train = "maxwell.train:main" | ||
|
||
[project.urls] | ||
homepage = "https://github.com/CUNY-CL/maxwell" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
black>=22.3.0 | ||
build>=0.10.0 | ||
flake8>=3.9.2 | ||
numpy>=1.20.1 | ||
pytest>=7.4.0 | ||
scipy>=1.6 | ||
twine>=4.0.2 | ||
tqdm>=4.64.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters