# nymstr
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
## Developer Guide
### Setup
``` sh
# create conda environment
$ mamba env create -f env.yml
# update conda environment
$ mamba env update -n nymstr --file env.yml
```
### Install
``` sh
pip install -e .
# install from pypi
pip install nymstr
```
### nbdev
``` sh
# activate conda environment
$ conda activate nymstr
# make sure the nymstr package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to the nymstr package
$ nbdev_prepare
```
### Publishing
``` sh
# publish to pypi
$ nbdev_pypi
# publish to conda
$ nbdev_conda --build_args '-c conda-forge'
$ nbdev_conda --mambabuild --build_args '-c conda-forge -c dsm-72'
```
# Usage
## Installation
Install latest from the GitHub
[repository](https://github.com/dsm-72/nymstr):
``` sh
$ pip install git+https://github.com/dsm-72/nymstr.git
```
or from [conda](https://anaconda.org/dsm-72/nymstr)
``` sh
$ conda install -c dsm-72 nymstr
```
or from [pypi](https://pypi.org/project/nymstr/)
``` sh
$ pip install nymstr
```
## Documentation
Documentation can be found hosted on GitHub
[repository](https://github.com/dsm-72/nymstr)
[pages](https://dsm-72.github.io/nymstr/). Additionally you can find
package manager specific guidelines on
[conda](https://anaconda.org/dsm-72/nymstr) and
[pypi](https://pypi.org/project/nymstr/) respectively.
``` python
apple = nymstr('Apple', icase=False, ispace=False, iunder=False, cutoff=1)
grape = nymstr('Grape', icase=True, ispace=True, iunder=True, cutoff=1)
mango = nymstr('Mango')
fruits = (apple, grape, mango)
print(f'fruit / pruit:', ' == ', 'tosame', 'tosame', 'tocls', sep='\t')
for i, fruit in enumerate(fruits):
rstr = fruit.raw.lower()
pidx = i - 1 or len(fruits) - 1
pruit = fruits[pidx]
print(
f'{fruit} / {pruit}:',
fruit == nymstr(rstr), fruit == fruit.makesame(rstr),
fruit == pruit.makesame(rstr), fruit == nymstr(rstr), sep='\t'
)
```
fruit / pruit: == tosame tosame tocls
Apple / Mango: False False False False
Grape / Mango: True True True True
Mango / Grape: True True True True
``` python
apple.prep(apple), apple.prep(mango), mango.prep(apple), mango.prep(mango), issubclass(type(mango), fuzstr)
```
(Apple, Mango, 'apple', 'mango', True)
Raw data
{
"_id": null,
"home_page": "https://github.com/dsm-72/nymstr",
"name": "nymstr",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "name things with fuzzy string matching nymstr nym str fuz fuzstr atyp ispec indoc dynattr",
"author": "dsm-72",
"author_email": "sumner.magruder@yale.edu",
"download_url": "https://files.pythonhosted.org/packages/8c/69/cd7c97936bb7f4d730410be8411d99fecfb7c3e42cdf141b91d75ac16cbe/nymstr-0.0.11.tar.gz",
"platform": null,
"description": "# nymstr\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n## Developer Guide\n\n### Setup\n\n``` sh\n# create conda environment\n$ mamba env create -f env.yml\n\n# update conda environment\n$ mamba env update -n nymstr --file env.yml\n```\n\n### Install\n\n``` sh\npip install -e .\n\n# install from pypi\npip install nymstr\n```\n\n### nbdev\n\n``` sh\n# activate conda environment\n$ conda activate nymstr\n\n# make sure the nymstr package is installed in development mode\n$ pip install -e .\n\n# make changes under nbs/ directory\n# ...\n\n# compile to have changes apply to the nymstr package\n$ nbdev_prepare\n```\n\n### Publishing\n\n``` sh\n# publish to pypi\n$ nbdev_pypi\n\n# publish to conda\n$ nbdev_conda --build_args '-c conda-forge'\n$ nbdev_conda --mambabuild --build_args '-c conda-forge -c dsm-72'\n```\n\n# Usage\n\n## Installation\n\nInstall latest from the GitHub\n[repository](https://github.com/dsm-72/nymstr):\n\n``` sh\n$ pip install git+https://github.com/dsm-72/nymstr.git\n```\n\nor from [conda](https://anaconda.org/dsm-72/nymstr)\n\n``` sh\n$ conda install -c dsm-72 nymstr\n```\n\nor from [pypi](https://pypi.org/project/nymstr/)\n\n``` sh\n$ pip install nymstr\n```\n\n## Documentation\n\nDocumentation can be found hosted on GitHub\n[repository](https://github.com/dsm-72/nymstr)\n[pages](https://dsm-72.github.io/nymstr/). Additionally you can find\npackage manager specific guidelines on\n[conda](https://anaconda.org/dsm-72/nymstr) and\n[pypi](https://pypi.org/project/nymstr/) respectively.\n\n``` python\napple = nymstr('Apple', icase=False, ispace=False, iunder=False, cutoff=1)\ngrape = nymstr('Grape', icase=True, ispace=True, iunder=True, cutoff=1)\nmango = nymstr('Mango')\n\nfruits = (apple, grape, mango)\nprint(f'fruit / pruit:', ' == ', 'tosame', 'tosame', 'tocls', sep='\\t')\nfor i, fruit in enumerate(fruits):\n rstr = fruit.raw.lower()\n pidx = i - 1 or len(fruits) - 1\n pruit = fruits[pidx] \n print(\n f'{fruit} / {pruit}:', \n fruit == nymstr(rstr), fruit == fruit.makesame(rstr), \n fruit == pruit.makesame(rstr), fruit == nymstr(rstr), sep='\\t'\n )\n```\n\n fruit / pruit: == tosame tosame tocls\n Apple / Mango: False False False False\n Grape / Mango: True True True True\n Mango / Grape: True True True True\n\n``` python\napple.prep(apple), apple.prep(mango), mango.prep(apple), mango.prep(mango), issubclass(type(mango), fuzstr)\n```\n\n (Apple, Mango, 'apple', 'mango', True)\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "nymstr",
"version": "0.0.11",
"project_urls": {
"Homepage": "https://github.com/dsm-72/nymstr"
},
"split_keywords": [
"name",
"things",
"with",
"fuzzy",
"string",
"matching",
"nymstr",
"nym",
"str",
"fuz",
"fuzstr",
"atyp",
"ispec",
"indoc",
"dynattr"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5767a658585dbf878f79ae148881bd2c4f8b34899b2124389606aefde6ba020e",
"md5": "bcee1ea7e35019d57e491bd3d4950987",
"sha256": "c3f41908ffb44d141358ed87ab8c2b452c18797dc3d84ba13da1b5696605e824"
},
"downloads": -1,
"filename": "nymstr-0.0.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bcee1ea7e35019d57e491bd3d4950987",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 9719,
"upload_time": "2023-09-10T14:18:58",
"upload_time_iso_8601": "2023-09-10T14:18:58.895367Z",
"url": "https://files.pythonhosted.org/packages/57/67/a658585dbf878f79ae148881bd2c4f8b34899b2124389606aefde6ba020e/nymstr-0.0.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8c69cd7c97936bb7f4d730410be8411d99fecfb7c3e42cdf141b91d75ac16cbe",
"md5": "76761ecd5a1e854a106140628bd7afbb",
"sha256": "cf9c8dc4b6efa23969c8085309a21b1e6b925b36cfd85be4bbc30392b91f593e"
},
"downloads": -1,
"filename": "nymstr-0.0.11.tar.gz",
"has_sig": false,
"md5_digest": "76761ecd5a1e854a106140628bd7afbb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 10364,
"upload_time": "2023-09-10T14:19:00",
"upload_time_iso_8601": "2023-09-10T14:19:00.679470Z",
"url": "https://files.pythonhosted.org/packages/8c/69/cd7c97936bb7f4d730410be8411d99fecfb7c3e42cdf141b91d75ac16cbe/nymstr-0.0.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-10 14:19:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dsm-72",
"github_project": "nymstr",
"github_not_found": true,
"lcname": "nymstr"
}