Skip to content

Commit

Permalink
build: transitioned to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethEnevoldsen committed Dec 30, 2022
1 parent 79972d2 commit 8aa1cce
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 129 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install ".[docs]"
- name: Build and Commit
uses: sphinx-notes/[email protected]
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@ jobs:
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
pip install ".[tests]"
- name: Run and write pytest
shell: bash
run: |
set -o pipefail
pytest --cov=textdescriptives --cov-report term-missing | tee pytest-coverage.txt
- name: Install dependencies for notebooks
shell: bash
run: |
pip install ".[tutorials]"
- name: Convert and run notebooks
shell: bash
run: |
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

130 changes: 130 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
[project]
name = "textdescriptives"
version = "2.0.0"
description = "A library for calculating a variety of features from text using spaCy"
authors = [{name = "Lasse Hansen", email = "[email protected]"},
{name = "Kenneth Enevoldsen"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]

keywords = [
"NLP",
"spaCy",
"text analysis",
"natural language processing",
"text features",
"text statistics",
"text descriptives",
"text analytics",
"text mining",
]

dependencies = [
"spacy>=3.1.0<3.3.0",
"numpy>=1.20.0,<1.24.0",
"pandas>=1.0.0,<1.6.0",
"pyphen>=0.11.0,<0.12.0",
"ftfy>=6.0.3,<6.1.0",
]

requires-python = ">=3.7"

[project.urls]
homepage = "https://hlasse.github.io/TextDescriptives/"
repository = "https://github.com/HLasse/textdescriptives"
documentation = "https://hlasse.github.io/TextDescriptives/"

[project.optional-dependencies]
style = [
"black==22.8.0",
"pre-commit==2.20.0",
"ruff==0.0.191",
"mypy==0.991"
]
tests = [
"pytest>=7.1.3,<7.3.0",
"pytest-cov>=3.0.0,<3.0.1",
# the @ allows installing using a link
"en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.2.0/en_core_web_sm-3.2.0.tar.gz",
"en_core_web_sm==3.2.0",
]
docs = [
"sphinx>=5.3.0,<5.4.0",
"furo==2022.12.7",
"sphinx-copybutton>=0.5.1,<0.5.2",
"sphinxext-opengraph>=0.7.3,<0.7.4",
"myst-nb>=0.6.0,<1.17.0",
"sphinx_design>=0.3.0,<0.3.1",
"autodoc_pydantic>=1.1.0,<1.9.0",
]
tutorials = [
"jupyter",
"seaborn",
"matplotlib",
]

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.license]
file = "LICENSE"
name = "Apache License 2.0"

[tool.setuptools.package-data]
"*" = ["*/spam.csv"]

[tool.setuptools.packages.find]
where = ["src"]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.coverage.run]
omit = [
"**/tests/*",
"**/_vendorized/*",
"**/about.py",
]


exclude_lines = [
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __unicode__",
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
]

[tool.semantic_release]
version_variable = [
"pyproject.toml:version"
]

[tool.ruff]
exclude = [
".venv",
".env",
".git",
"__pycache__",
]
32 changes: 0 additions & 32 deletions requirements.txt

This file was deleted.

83 changes: 0 additions & 83 deletions setup.cfg

This file was deleted.

9 changes: 0 additions & 9 deletions setup.py

This file was deleted.

0 comments on commit 8aa1cce

Please sign in to comment.