diff --git a/.gitignore b/.gitignore index 3bb8ea6..217ee49 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,8 @@ __pycache__ build/ whl/ venv/ -output/ +dist/ +secrets/ *egg-info diff --git a/LICENSE b/LICENSE index 5acb69f..7bd0192 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Ivan +Copyright (c) 2024 CIHT CONCEPT, IRBorisov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 10bc995..67acc4f 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -Long description goes here \ No newline at end of file +# cctext + +[![PyPI version](https://badge.fury.io/py/cctext.svg)](https://badge.fury.io/py/cctext) + +Python library for russian natural language. Allows inflecting complex terms and resolving special syntax references to other entities. +Based on [pymorphy3](https://github.com/no-plagiarism/pymorphy3) + +This library lacks user documentation. Example use cases can be found in tests folder. diff --git a/scripts/Build.ps1 b/scripts/Build.ps1 index ef65549..c748c0a 100644 --- a/scripts/Build.ps1 +++ b/scripts/Build.ps1 @@ -1,11 +1,10 @@ Set-Location $PSScriptRoot\.. $packageName = 'cctext' -$output = 'output' +$output = 'dist' $python = '.\venv\Scripts\python.exe' if (-not (Test-Path -Path $python -PathType Leaf)) { & 'python' -m venv .\venv - & $python -m pip install -r requirements.txt & $python -m pip install -r requirements-build.txt } @@ -13,14 +12,14 @@ if (Test-Path -Path $output\$packageName) { Remove-Item $output\$packageName -Recurse -Force } -& $python -m build --outdir=$output\$packageName -$wheel = Get-Childitem -Path $output\$packageName\*.whl -Name +& $python -m build --outdir=$output\ +$wheel = Get-Childitem -Path $output\*.whl -Name if (-not $wheel) { Write-Error "No wheel generated for $packageName" Exit 1 } -& $python -m pip install -I $output\$packageName\$wheel +& $python -m pip install -I $output\$wheel & $python -m unittest $exitcode = $LASTEXITCODE & $python -m pip uninstall -y $packageName diff --git a/scripts/Deploy.ps1 b/scripts/Deploy.ps1 new file mode 100644 index 0000000..220b1c0 --- /dev/null +++ b/scripts/Deploy.ps1 @@ -0,0 +1,6 @@ +Set-Location $PSScriptRoot\.. + +$token = Get-Content -Path .\secrets\API_TOKEN.txt +$python = 'python' +& ${python} -m pip install twine +& ${python} -m twine upload dist/* -u __token__ -p ${token} diff --git a/scripts/RunLint.ps1 b/scripts/RunLint.ps1 index 7f93dff..fec1b6b 100644 --- a/scripts/RunLint.ps1 +++ b/scripts/RunLint.ps1 @@ -1,7 +1,7 @@ # Run lint function RunLinters() { - $pylint = "$PSScriptRoot\..\venv\Scripts\pylint.exe" - $mypy = "$PSScriptRoot\..\venv\Scripts\mypy.exe" + $pylint = "${PSScriptRoot}\..\venv\Scripts\pylint.exe" + $mypy = "${PSScriptRoot}\..\venv\Scripts\mypy.exe" & $pylint cctext & $mypy cctext diff --git a/setup.cfg b/setup.cfg index e8fbcb7..8a53d9f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,16 +3,25 @@ name = cctext version = file: VERSION author = CIHT CONCEPT, IRBorisov author_email = iborisov@acconcept.ru -description = Concept text processing library +description = Text processing library for russian languange long_description = file: README.md long_description_content_type = text/markdown license = MIT classifiers = + Development Status :: 3 - Alpha + Intended Audience :: Developers + Intended Audience :: Science/Research + License :: OSI Approved :: MIT License + Natural Language :: Russian + Programming Language :: Python Programming Language :: Python :: 3 + Programming Language :: Python :: 3.12 + Topic :: Software Development :: Libraries :: Python Modules + Topic :: Scientific/Engineering :: Information Analysis + Topic :: Text Processing :: Linguistic [options] packages = find: install_requires = razdel - pymorphy3 - pymorphy3-dicts-ru \ No newline at end of file + pymorphy3 \ No newline at end of file