watchful


Namewatchful JSON
Version 3.7.0 PyPI version JSON
download
home_pageNone
SummaryWatchful API for Interacting with Watchful Environment
upload_time2023-09-25 22:29:43
maintainerNone
docs_urlNone
authorInc.
requires_python>=3.8
licenseNone
keywords watchful
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Watchful Python Package for Interacting with Watchful Environment

## Overview
The Watchful Python Package allows installation of the Watchful Python SDK over the internet from PyPI. The Watchful Python SDK enables communication with the Watchful API using Python and helps in the automation of Watchful Python features when used with the product.

The current features include the following and their corresponding user guides:
- Watchful API and [notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/api_intro.ipynb)

- [Data Enrichment](https://github.com/Watchfulio/watchful-py/blob/main/examples/README.md) and [notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/enrichment_intro.ipynb)


## Steps (Use)

### Install Watchful Python SDK from PyPI (Recommended)

If you want to use Python to communicate with the Watchful API, you'll need to install the Watchful Python SDK from PyPI.

- Install your desired release version (they can be found at [PyPI](https://pypi.org/project/watchful/))

```command
pip3 install watchful[==your.desired.version]
```

#### Install Optional Dependencies for Enrichment

If you intend to enrich using either SpaCy or Flair, you can take advantage of the enrichers we ship with the library. To do so, specify `enrich` when installing the library.

```command
pip3 install watchful[enrich]
```

### Basic Usage

Once you have installed the SDK, import it and begin interacting with it.

> For a more thorough Watchful API introduction, read through our [API Introduction Jupyter Notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/api_intro.ipynb).

### Basic Enrichment

The Watchful SDK aims to make enrichment a straight-forward task. The following steps assume a brand new user without any projects.

- Ensure you have the proper Python version and environment setup. Follow the [environment setup guide](https://github.com/Watchfulio/watchful-py/blob/main/README_PY_ENV.md) for more details.
- Open the Watchful App
- Create a new Project
- Import a dataset into your Project
- Install the latest Watchful SDK from PyPI
  - `python3 -m pip install watchful`
- Install spaCy
  - `python3 -m pip install spacy`
- Install spaCy's `en_core_web_sm` model
  - `python -m spacy download en_core_web_sm`
- Enrich your currently opened Watchful project’s dataset via terminal window:
  - `python3 -m watchful.enrich --host localhost --port 9001`    `# Enter your actual host and port.`

> **Note: Enrich via Jupyter Notebook**
> \- A more comprehensive guide to enrichment is available in the [Enrichment Introduction Jupyter Notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/enrichment_intro.ipynb).

For more guides and documentation, see the [ReadMe](https://github.com/Watchfulio/watchful-py/blob/main/examples/README.md) in the `examples` directory.

### Code Practices
If contributing to this code, you're encouraged to apply the following code practices.
- Apply linting and formatting
```command
cd to/the/repo_directory/that/being/watchful-py
```
```command
pylama src/watchful/ -o pylama.ini
```
```command
black src/watchful/ --config=pyproject.toml --diff
```

### Build & Install Watchful Package Locally
- Build the package
```command
hatch build
```
- Install the built package (add `--force-reinstall` to guarantee a full (re)installation)
```command
pip3 install dist/watchful-<latest.release.version>-py3-none-any.whl [--force-reinstall]
```
`<latest.release.version>` can be found [here](./src/watchful/VERSION).
- Show the installed watchful package
```command
pip3 show watchful
```

### Use Watchful Package in Development Mode (Optional)
- Interactively use or test package while in development mode
```command
pip3 install -e . [--force-reinstall]
```

### Install Watchful Package from PyPI (Optional)
- Install your desired release version (they can be found at [PyPI](https://pypi.org/project/watchful/))
```command
pip3 install watchful[==your.desired.version]
```

### Run Tests
After you've done the preceding steps correctly, you will be able to see the following.
- Print Watchful version
```command
python3 -c 'import watchful; print(watchful.__version__);'
```
- Run tests
```command
pytest -W ignore::DeprecationWarning tests/test_*.py -v
```

## Steps (Release)
After you've done the preceding steps correctly, you will be able to publish Watchful Package to PyPI. Before cutting a release, ensure the release changes are communicated with engineering@watchful.io. There may be corresponding changes required in the Watchful application; do not worry about this as it will be taken care of by Watchful.

### Prepare Release
1. Ensure your `main` branch is updated and create a new branch:
```command
git checkout main && git pull && git checkout -b bump-version
```
2. Bump the version in the [version file](https://github.com/Watchfulio/watchful-py/blob/main/src/watchful/VERSION):
- e.g. from 1.0.0 to 1.0.1
3. Commit and push the branch to Github:
```command
git add src/watchful/VERSION && git commit -m 'bump version' && git push -u origin bump-version
```
4. Open a pull request in Github and merge it to `main` after it is approved.

### Create Release
1. Visit [Watchful Python Package Releases](https://github.com/Watchfulio/watchful-py/releases) in Github
2. Click `Draft a new release`
3. Click `Choose a tag`
   - Type in v*a.b.c* where _a.b.c_ is the version in the [version file](https://github.com/Watchfulio/watchful-py/blob/main/src/watchful/VERSION) (e.g. v1.0.1 if the version in the version file is 1.0.1)
   - Type in the release title, which is the same value as above, i.e. v*a.b.c*
4. Ensure `Target` is set to `main` (should be default)
5. Ensure `Previous tag` is set to the most current release tag (should be default)
6. Click `Generate release notes`
7. Click `Publish release`

The release will be triggered and CI will automatically build and publish the Watchful Python Package to [PyPI](https://pypi.org/project/watchful/).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "watchful",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "watchful",
    "author": "Inc.",
    "author_email": "Watchful <engineering@watchful.io>",
    "download_url": "https://files.pythonhosted.org/packages/9b/82/194b404c2cfe48f038e566ca568ec857017aa22dc4c14933b4851d1c17c8/watchful-3.7.0.tar.gz",
    "platform": null,
    "description": "# Watchful Python Package for Interacting with Watchful Environment\n\n## Overview\nThe Watchful Python Package allows installation of the Watchful Python SDK over the internet from PyPI. The Watchful Python SDK enables communication with the Watchful API using Python and helps in the automation of Watchful Python features when used with the product.\n\nThe current features include the following and their corresponding user guides:\n- Watchful API and [notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/api_intro.ipynb)\n\n- [Data Enrichment](https://github.com/Watchfulio/watchful-py/blob/main/examples/README.md) and [notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/enrichment_intro.ipynb)\n\n\n## Steps (Use)\n\n### Install Watchful Python SDK from PyPI (Recommended)\n\nIf you want to use Python to communicate with the Watchful API, you'll need to install the Watchful Python SDK from PyPI.\n\n- Install your desired release version (they can be found at [PyPI](https://pypi.org/project/watchful/))\n\n```command\npip3 install watchful[==your.desired.version]\n```\n\n#### Install Optional Dependencies for Enrichment\n\nIf you intend to enrich using either SpaCy or Flair, you can take advantage of the enrichers we ship with the library. To do so, specify `enrich` when installing the library.\n\n```command\npip3 install watchful[enrich]\n```\n\n### Basic Usage\n\nOnce you have installed the SDK, import it and begin interacting with it.\n\n> For a more thorough Watchful API introduction, read through our [API Introduction Jupyter Notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/api_intro.ipynb).\n\n### Basic Enrichment\n\nThe Watchful SDK aims to make enrichment a straight-forward task. The following steps assume a brand new user without any projects.\n\n- Ensure you have the proper Python version and environment setup. Follow the [environment setup guide](https://github.com/Watchfulio/watchful-py/blob/main/README_PY_ENV.md) for more details.\n- Open the Watchful App\n- Create a new Project\n- Import a dataset into your Project\n- Install the latest Watchful SDK from PyPI\n  - `python3 -m pip install watchful`\n- Install spaCy\n  - `python3 -m pip install spacy`\n- Install spaCy's `en_core_web_sm` model\n  - `python -m spacy download en_core_web_sm`\n- Enrich your currently opened Watchful project\u2019s dataset via terminal window:\n  - `python3 -m watchful.enrich --host localhost --port 9001`&nbsp;&nbsp;&nbsp;&nbsp;`# Enter your actual host and port.`\n\n> **Note: Enrich via Jupyter Notebook**\n> \\- A more comprehensive guide to enrichment is available in the [Enrichment Introduction Jupyter Notebook](https://github.com/Watchfulio/watchful-py/blob/main/examples/enrichment_intro.ipynb).\n\nFor more guides and documentation, see the [ReadMe](https://github.com/Watchfulio/watchful-py/blob/main/examples/README.md) in the `examples` directory.\n\n### Code Practices\nIf contributing to this code, you're encouraged to apply the following code practices.\n- Apply linting and formatting\n```command\ncd to/the/repo_directory/that/being/watchful-py\n```\n```command\npylama src/watchful/ -o pylama.ini\n```\n```command\nblack src/watchful/ --config=pyproject.toml --diff\n```\n\n### Build & Install Watchful Package Locally\n- Build the package\n```command\nhatch build\n```\n- Install the built package (add `--force-reinstall` to guarantee a full (re)installation)\n```command\npip3 install dist/watchful-<latest.release.version>-py3-none-any.whl [--force-reinstall]\n```\n`<latest.release.version>` can be found [here](./src/watchful/VERSION).\n- Show the installed watchful package\n```command\npip3 show watchful\n```\n\n### Use Watchful Package in Development Mode (Optional)\n- Interactively use or test package while in development mode\n```command\npip3 install -e . [--force-reinstall]\n```\n\n### Install Watchful Package from PyPI (Optional)\n- Install your desired release version (they can be found at [PyPI](https://pypi.org/project/watchful/))\n```command\npip3 install watchful[==your.desired.version]\n```\n\n### Run Tests\nAfter you've done the preceding steps correctly, you will be able to see the following.\n- Print Watchful version\n```command\npython3 -c 'import watchful; print(watchful.__version__);'\n```\n- Run tests\n```command\npytest -W ignore::DeprecationWarning tests/test_*.py -v\n```\n\n## Steps (Release)\nAfter you've done the preceding steps correctly, you will be able to publish Watchful Package to PyPI. Before cutting a release, ensure the release changes are communicated with engineering@watchful.io. There may be corresponding changes required in the Watchful application; do not worry about this as it will be taken care of by Watchful.\n\n### Prepare Release\n1. Ensure your `main` branch is updated and create a new branch:\n```command\ngit checkout main && git pull && git checkout -b bump-version\n```\n2. Bump the version in the [version file](https://github.com/Watchfulio/watchful-py/blob/main/src/watchful/VERSION):\n- e.g. from 1.0.0 to 1.0.1\n3. Commit and push the branch to Github:\n```command\ngit add src/watchful/VERSION && git commit -m 'bump version' && git push -u origin bump-version\n```\n4. Open a pull request in Github and merge it to `main` after it is approved.\n\n### Create Release\n1. Visit [Watchful Python Package Releases](https://github.com/Watchfulio/watchful-py/releases) in Github\n2. Click `Draft a new release`\n3. Click `Choose a tag`\n   - Type in v*a.b.c* where _a.b.c_ is the version in the [version file](https://github.com/Watchfulio/watchful-py/blob/main/src/watchful/VERSION) (e.g. v1.0.1 if the version in the version file is 1.0.1)\n   - Type in the release title, which is the same value as above, i.e. v*a.b.c*\n4. Ensure `Target` is set to `main` (should be default)\n5. Ensure `Previous tag` is set to the most current release tag (should be default)\n6. Click `Generate release notes`\n7. Click `Publish release`\n\nThe release will be triggered and CI will automatically build and publish the Watchful Python Package to [PyPI](https://pypi.org/project/watchful/).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Watchful API for Interacting with Watchful Environment",
    "version": "3.7.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Watchfulio/watchful-py/issues",
        "Homepage": "https://github.com/Watchfulio/watchful-py"
    },
    "split_keywords": [
        "watchful"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c4569648f980cc8a9d19c6c8115322fe9e479967ddfdee4da6fdbed6c8e56f51",
                "md5": "f7dff3974ec07ffeb316c053fb7b7520",
                "sha256": "ea3485871a5a470c66a5628d27f901df28ab7effbbcd91dad1ce1f53feb3d8a3"
            },
            "downloads": -1,
            "filename": "watchful-3.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f7dff3974ec07ffeb316c053fb7b7520",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 36633,
            "upload_time": "2023-09-25T22:29:45",
            "upload_time_iso_8601": "2023-09-25T22:29:45.119901Z",
            "url": "https://files.pythonhosted.org/packages/c4/56/9648f980cc8a9d19c6c8115322fe9e479967ddfdee4da6fdbed6c8e56f51/watchful-3.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9b82194b404c2cfe48f038e566ca568ec857017aa22dc4c14933b4851d1c17c8",
                "md5": "8068f119d1db6287a2b91e3ac5f4f333",
                "sha256": "7aea0b2e6783da0f32061620a193390fce449abb9515a420ddbf9f13502a8407"
            },
            "downloads": -1,
            "filename": "watchful-3.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8068f119d1db6287a2b91e3ac5f4f333",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 33801,
            "upload_time": "2023-09-25T22:29:43",
            "upload_time_iso_8601": "2023-09-25T22:29:43.783139Z",
            "url": "https://files.pythonhosted.org/packages/9b/82/194b404c2cfe48f038e566ca568ec857017aa22dc4c14933b4851d1c17c8/watchful-3.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-25 22:29:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Watchfulio",
    "github_project": "watchful-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "lcname": "watchful"
}
        
Elapsed time: 0.11481s