lmk-python


Namelmk-python JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryNotifications you want, when you want them
upload_time2023-07-30 01:23:23
maintainer
docs_urlNone
author
requires_python>=3.7
licenseCopyright 2023 Cameron Feenstra Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords ipython jupyter widgets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# LMK Python Client

<!-- [![Build Status](https://travis-ci.org/cfeenstra67/lmk.svg?branch=master)](https://travis-ci.org/cfeenstra67/lmk)
[![codecov](https://codecov.io/gh/cfeenstra67/lmk/branch/master/graph/badge.svg)](https://codecov.io/gh/cfeenstra67/lmk) -->

## Installation

You can install using `pip`:

```bash
pip install lmk-python
```

If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:
```bash
jupyter nbextension enable --py [--sys-prefix|--user|--system] lmk
```

## Development Installation

Create a dev environment:
```bash
python -m venv venv
```

Install the python package. This will also build the TS package.
```bash
pip install -e ".[dev,jupyter]"
```

When developing your extensions, you need to manually enable your extensions with the
notebook / lab frontend. For lab, this is done by the command:

```bash
jupyter labextension develop --overwrite .
pnpm build
```

For classic notebook, you need to run:

```bash
jupyter nbextension install --sys-prefix --symlink --overwrite --py lmk
jupyter nbextension enable --sys-prefix --py lmk
```

Note that the `--symlink` flag doesn't work on Windows, so you will here have to run
the `install` command every time that you rebuild your extension. For certain installations
you might also need another flag instead of `--sys-prefix`, but we won't cover the meaning
of those flags here.

### How to see your changes
#### Typescript:
If you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different
terminals to watch for changes in the extension's source and automatically rebuild the widget.

```bash
# Watch the source directory in one terminal, automatically rebuilding when needed
pnpm watch
# Run JupyterLab in another terminal
jupyter lab
```

After a change wait for the build to finish and then refresh your browser and the changes should take effect.

#### Python:
If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.

## Updating the version

To update the version, install tbump and use it to bump the version.
By default it will also create a tag.

```bash
pip install bump2version
bump2version <patch|minor|major>
```

## Notes

Juypter extension doesn't work in vscode, would need to create a vscode extension for that; see https://github.com/microsoft/vscode-jupyter#notebook-support
- It seems like vscode's notebook support may not be implemented correctly/doesn't look for modules in the same way as jupyter, because it is working on both jupyter notebook classic and jupyter lab, and in theory it should not be a problem to find the JS for the extension. Experiment

- Makes an ascii-friendly interactive version for channels more attractive

## Publishing - PyPI

Build the python package:
```bash
pnpm build:python
```

Check the built assets:
```bash
pnpm pypi-check
```

Publish to the test index:
```bash
pnpm pypi-upload-test
```

Install from test index:
```bash
pip install --extra-index-url https://test.pypi.org/simple/ lmk-python[jupyter]==<version>
```

Publish to real idnex:
```bash
pnpm pypi-upload
```

## Publishing - NPM

Build the npm package:
```bash
pnpm build:prod
```

Publish the npm package:
```bash
pnpm publish --access public
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "lmk-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "IPython,Jupyter,Widgets",
    "author": "",
    "author_email": "Cam Feenstra <me@camfeenstra.com>",
    "download_url": "https://files.pythonhosted.org/packages/2d/14/3ce5650286ef5c4c9f663203dbef79cfd71584f2ec1c856bb0ed83107b78/lmk_python-0.1.0.tar.gz",
    "platform": null,
    "description": "\n# LMK Python Client\n\n<!-- [![Build Status](https://travis-ci.org/cfeenstra67/lmk.svg?branch=master)](https://travis-ci.org/cfeenstra67/lmk)\n[![codecov](https://codecov.io/gh/cfeenstra67/lmk/branch/master/graph/badge.svg)](https://codecov.io/gh/cfeenstra67/lmk) -->\n\n## Installation\n\nYou can install using `pip`:\n\n```bash\npip install lmk-python\n```\n\nIf you are using Jupyter Notebook 5.2 or earlier, you may also need to enable\nthe nbextension:\n```bash\njupyter nbextension enable --py [--sys-prefix|--user|--system] lmk\n```\n\n## Development Installation\n\nCreate a dev environment:\n```bash\npython -m venv venv\n```\n\nInstall the python package. This will also build the TS package.\n```bash\npip install -e \".[dev,jupyter]\"\n```\n\nWhen developing your extensions, you need to manually enable your extensions with the\nnotebook / lab frontend. For lab, this is done by the command:\n\n```bash\njupyter labextension develop --overwrite .\npnpm build\n```\n\nFor classic notebook, you need to run:\n\n```bash\njupyter nbextension install --sys-prefix --symlink --overwrite --py lmk\njupyter nbextension enable --sys-prefix --py lmk\n```\n\nNote that the `--symlink` flag doesn't work on Windows, so you will here have to run\nthe `install` command every time that you rebuild your extension. For certain installations\nyou might also need another flag instead of `--sys-prefix`, but we won't cover the meaning\nof those flags here.\n\n### How to see your changes\n#### Typescript:\nIf you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different\nterminals to watch for changes in the extension's source and automatically rebuild the widget.\n\n```bash\n# Watch the source directory in one terminal, automatically rebuilding when needed\npnpm watch\n# Run JupyterLab in another terminal\njupyter lab\n```\n\nAfter a change wait for the build to finish and then refresh your browser and the changes should take effect.\n\n#### Python:\nIf you make a change to the python code then you will need to restart the notebook kernel to have it take effect.\n\n## Updating the version\n\nTo update the version, install tbump and use it to bump the version.\nBy default it will also create a tag.\n\n```bash\npip install bump2version\nbump2version <patch|minor|major>\n```\n\n## Notes\n\nJuypter extension doesn't work in vscode, would need to create a vscode extension for that; see https://github.com/microsoft/vscode-jupyter#notebook-support\n- It seems like vscode's notebook support may not be implemented correctly/doesn't look for modules in the same way as jupyter, because it is working on both jupyter notebook classic and jupyter lab, and in theory it should not be a problem to find the JS for the extension. Experiment\n\n- Makes an ascii-friendly interactive version for channels more attractive\n\n## Publishing - PyPI\n\nBuild the python package:\n```bash\npnpm build:python\n```\n\nCheck the built assets:\n```bash\npnpm pypi-check\n```\n\nPublish to the test index:\n```bash\npnpm pypi-upload-test\n```\n\nInstall from test index:\n```bash\npip install --extra-index-url https://test.pypi.org/simple/ lmk-python[jupyter]==<version>\n```\n\nPublish to real idnex:\n```bash\npnpm pypi-upload\n```\n\n## Publishing - NPM\n\nBuild the npm package:\n```bash\npnpm build:prod\n```\n\nPublish the npm package:\n```bash\npnpm publish --access public\n```\n",
    "bugtrack_url": null,
    "license": "Copyright 2023 Cameron Feenstra  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Notifications you want, when you want them",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/cfeenstra67/lmk-python"
    },
    "split_keywords": [
        "ipython",
        "jupyter",
        "widgets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e50ff3e4672a9094f7cea606bc73ffc1c573875e69082852536abb2b5426b619",
                "md5": "61f5ed32d28eb5a7c46604c95e2d8d1a",
                "sha256": "9cbcf84e5cd3d918430b4e5b0751d23a3e85b153b72d3bc568f964dd0ab5978d"
            },
            "downloads": -1,
            "filename": "lmk_python-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "61f5ed32d28eb5a7c46604c95e2d8d1a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 2522054,
            "upload_time": "2023-07-30T01:23:21",
            "upload_time_iso_8601": "2023-07-30T01:23:21.172889Z",
            "url": "https://files.pythonhosted.org/packages/e5/0f/f3e4672a9094f7cea606bc73ffc1c573875e69082852536abb2b5426b619/lmk_python-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d143ce5650286ef5c4c9f663203dbef79cfd71584f2ec1c856bb0ed83107b78",
                "md5": "57254a4b3891ccb8385479313c11bcf3",
                "sha256": "08bff8a3f7c990a3c1318b1b50836a4adbaecde1070a29336e2b5671165f3a64"
            },
            "downloads": -1,
            "filename": "lmk_python-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "57254a4b3891ccb8385479313c11bcf3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1446420,
            "upload_time": "2023-07-30T01:23:23",
            "upload_time_iso_8601": "2023-07-30T01:23:23.718557Z",
            "url": "https://files.pythonhosted.org/packages/2d/14/3ce5650286ef5c4c9f663203dbef79cfd71584f2ec1c856bb0ed83107b78/lmk_python-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-30 01:23:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cfeenstra67",
    "github_project": "lmk-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "lmk-python"
}
        
Elapsed time: 0.20920s