# grd
<!-- 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 grd --file env.yml
```
### Install
``` sh
pip install -e .
# install from pypi
pip install grd
```
### nbdev
``` sh
# activate conda environment
$ conda activate grd
# make sure the grd package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to the grd 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/grd):
``` sh
$ pip install git+https://github.com/dsm-72/grd.git
```
or from [conda](https://anaconda.org/dsm-72/grd)
``` sh
$ conda install -c dsm-72 grd
```
or from [pypi](https://pypi.org/project/grd/)
``` sh
$ pip install grd
```
## Documentation
Documentation can be found hosted on GitHub
[repository](https://github.com/dsm-72/grd)
[pages](https://dsm-72.github.io/grd/). Additionally you can find
package manager specific guidelines on
[conda](https://anaconda.org/dsm-72/grd) and
[pypi](https://pypi.org/project/grd/) respectively.
``` python
abc, d = Literal['a', 'b', 'c'], 'd'
```
``` python
class ABC_Guard(TTypeGuard):
types = abc
ABC_Guard.istype('bz'), ABC_Guard.istype('b')
```
(False, True)
``` python
class ABCD_Guard(TTypeGuard):
types = Union[abc, d]
ABCD_Guard.istype('b'), ABCD_Guard.istype('d')
```
(True, True)
``` python
import numpy as np
from typing import TypeAlias
ndarray: TypeAlias = np.ndarray
class NPArrayGuard(TTypeGuard):
types = ndarray
NPArrayGuard.istype([1,2,3]), NPArrayGuard.istype(np.array([1,2,3]))
```
(False, True)
Raw data
{
"_id": null,
"home_page": "https://github.com/dsm-72/grd",
"name": "grd",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "nbdev jupyter notebook python",
"author": "dsm-72",
"author_email": "sumner.magruder@yale.edu",
"download_url": "https://files.pythonhosted.org/packages/d6/68/53d6dcfa2c7483d3e1c23234963ce2ad2905227145670adcdefc82d58e4c/grd-0.0.1.tar.gz",
"platform": null,
"description": "# grd\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 grd --file env.yml\n```\n\n### Install\n\n``` sh\npip install -e .\n\n# install from pypi\npip install grd\n```\n\n### nbdev\n\n``` sh\n# activate conda environment\n$ conda activate grd\n\n# make sure the grd 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 grd 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/grd):\n\n``` sh\n$ pip install git+https://github.com/dsm-72/grd.git\n```\n\nor from [conda](https://anaconda.org/dsm-72/grd)\n\n``` sh\n$ conda install -c dsm-72 grd\n```\n\nor from [pypi](https://pypi.org/project/grd/)\n\n``` sh\n$ pip install grd\n```\n\n## Documentation\n\nDocumentation can be found hosted on GitHub\n[repository](https://github.com/dsm-72/grd)\n[pages](https://dsm-72.github.io/grd/). Additionally you can find\npackage manager specific guidelines on\n[conda](https://anaconda.org/dsm-72/grd) and\n[pypi](https://pypi.org/project/grd/) respectively.\n\n``` python\nabc, d = Literal['a', 'b', 'c'], 'd'\n```\n\n``` python\nclass ABC_Guard(TTypeGuard):\n types = abc\n\nABC_Guard.istype('bz'), ABC_Guard.istype('b')\n```\n\n (False, True)\n\n``` python\nclass ABCD_Guard(TTypeGuard):\n types = Union[abc, d]\n \nABCD_Guard.istype('b'), ABCD_Guard.istype('d')\n```\n\n (True, True)\n\n``` python\nimport numpy as np\nfrom typing import TypeAlias\nndarray: TypeAlias = np.ndarray\n\nclass NPArrayGuard(TTypeGuard):\n types = ndarray\n\nNPArrayGuard.istype([1,2,3]), NPArrayGuard.istype(np.array([1,2,3]))\n```\n\n (False, True)\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Literal Enum",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/dsm-72/grd"
},
"split_keywords": [
"nbdev",
"jupyter",
"notebook",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1bc9302f3bb89a36744d1cad2ed3914227a23c08b8e33c8fecab18e298cdb296",
"md5": "be3a917702d43d8e439a6fa5267cd82e",
"sha256": "6a078c50e7d86d343d1aa019153fb8ab063f4a7e1320681ad94eeffedd2fcdaf"
},
"downloads": -1,
"filename": "grd-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "be3a917702d43d8e439a6fa5267cd82e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 9858,
"upload_time": "2023-08-29T18:19:59",
"upload_time_iso_8601": "2023-08-29T18:19:59.650019Z",
"url": "https://files.pythonhosted.org/packages/1b/c9/302f3bb89a36744d1cad2ed3914227a23c08b8e33c8fecab18e298cdb296/grd-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d66853d6dcfa2c7483d3e1c23234963ce2ad2905227145670adcdefc82d58e4c",
"md5": "5125c24b7496cb19522ff9f23776698a",
"sha256": "7c3f94be98edef22b9aa1c51fd5acac946682d6d7fec78808bf537246230d58f"
},
"downloads": -1,
"filename": "grd-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5125c24b7496cb19522ff9f23776698a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 10229,
"upload_time": "2023-08-29T18:20:06",
"upload_time_iso_8601": "2023-08-29T18:20:06.271508Z",
"url": "https://files.pythonhosted.org/packages/d6/68/53d6dcfa2c7483d3e1c23234963ce2ad2905227145670adcdefc82d58e4c/grd-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-29 18:20:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dsm-72",
"github_project": "grd",
"github_not_found": true,
"lcname": "grd"
}