comb-utils


Namecomb-utils JSON
Version 0.2.8 PyPI version JSON
download
home_pageNone
SummaryHandy utils for Python projects.
upload_time2025-07-16 21:31:19
maintainerNone
docs_urlNone
authorKaleb Coberly
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Comb Utils

Some handy utils for Python projects. Repo is made from the `reference_package` template repo: https://github.com/crickets-and-comb/reference_package. See the docs: https://crickets-and-comb.github.io/comb_utils/.

This is a [Crickets and Comb](https://cricketsandcomb.org) resource.

## Structure

```
    .github/workflows               GitHub Actions CI/CD workflows.
    docs                            RST docs and doc build staging.
    Makefile                        Dev tools and params. (includes shared/Makefile)
    setup.cfg                       Metadata and dependencies.
    shared                          Shared dev tools Git submodule.
    src/comb_utils/lib              Implementation.
    tests/unit                      Unit tests.
```

## Installation

To install the package, run:

  $ pip install comb_utils

See https://pypi.org/project/comb-utils/.

## Dev workflow

There are a number of dev tools in the `Makefile`. Once you set up the shared tools Git submodule (below), you can list all the make tools you might want to use:

```bash
    $ make list-targets
```

Go check them out in `Makefile`.

*Note: The dev tools are built around developing on a Mac, so they may not all work on Windows without some modifications.*

### Shared tools setup

When you first clone this repo, you'll need to set up the shared tools Git submodule. Follow the setup directions on that repo's README: https://github.com/crickets-and-comb/shared

#### Updating shared tools

Once you've set up the shared dev tools submodule, you'll want to periodically update it to get updates to the shared tools:

```bash
  $ make update-shared
```

Note that, while you'll be able to run with this updated shared submodule, you'll still want to commit that update to your consuming repo to track that update.

#### Setting Personal Access Token

The shared workflows rely on a Personal Access Token (PAT) (to checkout the submodule so they can use the make targets). You need to create a PAT with repo access and add it to the consuming repo's (`comb_utils` in this case) action secrets as `CHECKOUT_SHARED`. See GitHub for how to set up PATs (hint: check the developer settings on your personal account) and how to add secrets to a repo's actions (hint: check the repo's settings).

Note: Using a PAT tied to a single user like this is less than ideal. Figuring out how to get around this is a welcome security upgrade.

### Dev installation

You'll want this package's site-package files to be the source files in this repo so you can test your changes without having to reinstall. We've got some tools for that.

First build and activate the env before installing this package:

```bash
    $ make build-env
    $ conda activate comb_utils_py3.12
  ```

Note, if you don't have Python installed, you need to pass the package name directly when you build the env: `make build-env PACKAGE_NAME=comb_utils`. If you have Python installed (e.g., this conda env already activated), then you don't need to because it uses Python to grab the package name from the `setup.cfg` file.

Then, install this package and its dev dependencies:

```bash
    $ make install
```

This installs all the dependencies in your conda env site-packages, but the files for this package's installation are now your source files in this repo.

### QC and testing

Before pushing commits, you'll usually want to rebuild the env and run all the QC and testing:

```bash
    $ make clean format full
```

When making smaller commits, you might just want to run some of the smaller commands:

```bash
    $ make clean format full-qc full-test
```

#### Using act

As a final step, it's good practice to test run the workflow before opening a PR or pushing to an open PR. We don't want to waste GitHub runtime on a glitch that we could have caught before. You can use a make target for that:

```bash
  $ make run-act
```

That will run `.github/workflows/CI_CD.yml`. But, you can also run any workflow you'd like by using `act` directly. See https://nektosact.com.

To use this tool, you'll need to have Docker installed and running on your machine: https://www.docker.com/. You'll also need to install `act` in your terminal:

```bash
  $ brew install act
```

NOTE: To be more accurate, we've overridden `set-CI-CD-file` to create a local `CI_CD_act.yml` (which we ignore with Git) as a copy of `CI_CD.yml` and replace one of the workflow call URLs with a relative path. We use a relative path because otherwise `act` will not honor the overridden `full-test` make target and will run the shared version. That will fail because the shared `full-test` target includes running integration and e2e tests, which this repo does not include.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "comb-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "kaleb.coberly@gmail.com",
    "keywords": null,
    "author": "Kaleb Coberly",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e2/0d/4c68aa5969e18b160ca7f20a10d23b2c4d38b498d6cec84799896e1381ae/comb_utils-0.2.8.tar.gz",
    "platform": null,
    "description": "# Comb Utils\n\nSome handy utils for Python projects. Repo is made from the `reference_package` template repo: https://github.com/crickets-and-comb/reference_package. See the docs: https://crickets-and-comb.github.io/comb_utils/.\n\nThis is a [Crickets and Comb](https://cricketsandcomb.org) resource.\n\n## Structure\n\n```\n    .github/workflows               GitHub Actions CI/CD workflows.\n    docs                            RST docs and doc build staging.\n    Makefile                        Dev tools and params. (includes shared/Makefile)\n    setup.cfg                       Metadata and dependencies.\n    shared                          Shared dev tools Git submodule.\n    src/comb_utils/lib              Implementation.\n    tests/unit                      Unit tests.\n```\n\n## Installation\n\nTo install the package, run:\n\n  $ pip install comb_utils\n\nSee https://pypi.org/project/comb-utils/.\n\n## Dev workflow\n\nThere are a number of dev tools in the `Makefile`. Once you set up the shared tools Git submodule (below), you can list all the make tools you might want to use:\n\n```bash\n    $ make list-targets\n```\n\nGo check them out in `Makefile`.\n\n*Note: The dev tools are built around developing on a Mac, so they may not all work on Windows without some modifications.*\n\n### Shared tools setup\n\nWhen you first clone this repo, you'll need to set up the shared tools Git submodule. Follow the setup directions on that repo's README: https://github.com/crickets-and-comb/shared\n\n#### Updating shared tools\n\nOnce you've set up the shared dev tools submodule, you'll want to periodically update it to get updates to the shared tools:\n\n```bash\n  $ make update-shared\n```\n\nNote that, while you'll be able to run with this updated shared submodule, you'll still want to commit that update to your consuming repo to track that update.\n\n#### Setting Personal Access Token\n\nThe shared workflows rely on a Personal Access Token (PAT) (to checkout the submodule so they can use the make targets). You need to create a PAT with repo access and add it to the consuming repo's (`comb_utils` in this case) action secrets as `CHECKOUT_SHARED`. See GitHub for how to set up PATs (hint: check the developer settings on your personal account) and how to add secrets to a repo's actions (hint: check the repo's settings).\n\nNote: Using a PAT tied to a single user like this is less than ideal. Figuring out how to get around this is a welcome security upgrade.\n\n### Dev installation\n\nYou'll want this package's site-package files to be the source files in this repo so you can test your changes without having to reinstall. We've got some tools for that.\n\nFirst build and activate the env before installing this package:\n\n```bash\n    $ make build-env\n    $ conda activate comb_utils_py3.12\n  ```\n\nNote, if you don't have Python installed, you need to pass the package name directly when you build the env: `make build-env PACKAGE_NAME=comb_utils`. If you have Python installed (e.g., this conda env already activated), then you don't need to because it uses Python to grab the package name from the `setup.cfg` file.\n\nThen, install this package and its dev dependencies:\n\n```bash\n    $ make install\n```\n\nThis installs all the dependencies in your conda env site-packages, but the files for this package's installation are now your source files in this repo.\n\n### QC and testing\n\nBefore pushing commits, you'll usually want to rebuild the env and run all the QC and testing:\n\n```bash\n    $ make clean format full\n```\n\nWhen making smaller commits, you might just want to run some of the smaller commands:\n\n```bash\n    $ make clean format full-qc full-test\n```\n\n#### Using act\n\nAs a final step, it's good practice to test run the workflow before opening a PR or pushing to an open PR. We don't want to waste GitHub runtime on a glitch that we could have caught before. You can use a make target for that:\n\n```bash\n  $ make run-act\n```\n\nThat will run `.github/workflows/CI_CD.yml`. But, you can also run any workflow you'd like by using `act` directly. See https://nektosact.com.\n\nTo use this tool, you'll need to have Docker installed and running on your machine: https://www.docker.com/. You'll also need to install `act` in your terminal:\n\n```bash\n  $ brew install act\n```\n\nNOTE: To be more accurate, we've overridden `set-CI-CD-file` to create a local `CI_CD_act.yml` (which we ignore with Git) as a copy of `CI_CD.yml` and replace one of the workflow call URLs with a relative path. We use a relative path because otherwise `act` will not honor the overridden `full-test` make target and will run the shared version. That will fail because the shared `full-test` target includes running integration and e2e tests, which this repo does not include.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Handy utils for Python projects.",
    "version": "0.2.8",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3ea620c4effc0e09cc1f1c5eb63a108a0de02f426fdb4ec99684f3b6f0101ef5",
                "md5": "a4fdca2b9c1f246817b4fba6402a4da9",
                "sha256": "e9416ebb8aa88c637e489cf9e3a31a974b7123a8c768b08fdfdd6e9d5df0025b"
            },
            "downloads": -1,
            "filename": "comb_utils-0.2.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a4fdca2b9c1f246817b4fba6402a4da9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 9987,
            "upload_time": "2025-07-16T21:31:18",
            "upload_time_iso_8601": "2025-07-16T21:31:18.163396Z",
            "url": "https://files.pythonhosted.org/packages/3e/a6/20c4effc0e09cc1f1c5eb63a108a0de02f426fdb4ec99684f3b6f0101ef5/comb_utils-0.2.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e20d4c68aa5969e18b160ca7f20a10d23b2c4d38b498d6cec84799896e1381ae",
                "md5": "96cea946cda412bae0bf1d05f801e907",
                "sha256": "83f2bad17e260667fcca7c6c730a548912ae25d6059d2619ca974c0e36c35197"
            },
            "downloads": -1,
            "filename": "comb_utils-0.2.8.tar.gz",
            "has_sig": false,
            "md5_digest": "96cea946cda412bae0bf1d05f801e907",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 11618,
            "upload_time": "2025-07-16T21:31:19",
            "upload_time_iso_8601": "2025-07-16T21:31:19.697096Z",
            "url": "https://files.pythonhosted.org/packages/e2/0d/4c68aa5969e18b160ca7f20a10d23b2c4d38b498d6cec84799896e1381ae/comb_utils-0.2.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-16 21:31:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "comb-utils"
}
        
Elapsed time: 0.42116s