semvec/pypi-packages huggingface dataset:
crimson-run-vscode 0.1.0
Your package description.
Requires Python: >=3.9

**Template README.md**\
This file is from the [template repository](https://github.com/crimson206/template/blob/main/README.md).
Rewrite it for your own package.

## Python Package Setup

### Setup Base

To install required pip modules for `generate_toml.py`, run
``` bash
source scripts/setup_base.sh
```

### User Setup

- go to `generate_toml.py` file, and complete the setup in the `User Setup` session.

```python
options = Options(
    # Will you use the discussion session in your repo?
    discussion=False
)

# Define the general information of your package
kwargs = Kwargs(
    name_space="None",
    module_name="None",
    description="None",
)
```

If you wrote all the information, run
```
python generate_toml.py
```

#### Template

If you want to understand the generation process, check the `template` variable in `generate_toml.py`.

### Setup Env

#### Prerequisite

Finish [User Setup](#user-setup) first.
Of course, conda command must be available.

#### Setup Env

Run
``` bash
source scripts/setup_env.sh
```

steps
- create an conda environment named as your $MODULE_NAME
- activate the environment.
- install requirements.txt

#### Generate Private Env
Generate a private repository in this repo.
I recommend you to write all the unstructured codes in this repo.

``` bash
source scripts/generate_dev_repo.sh
```

It will ask you the name of your repo, and then, generate a repo named f'{your_repo_name}-dev'.

**Usage Tip**

If you wrote your codes in a wrong branch,
- backup the files to the dev repo
- remove changes in your main(not main branch) repo
- move to your correct branch
- place back the backup codes


## Workflows

I currently setup test and release workflows.

**Test**

If you make a PR with the patterns [ main, develop, 'release/*', 'feature/*' ],

It will perform your unittest in ["3.9", "3.10", "3.11"]

**Release**

required secret : PYPI_API_TOKEN

I usually make PRs only when I start release branches.
release workflow is not conducted automatically. If you think your branch is ready to be published, 

- go to https://github.com/{github_id}/{repo_name}/actions/workflows/release.yaml
- find the button, 'Run workflow'
- select the branch to publish. In my case, release/x.x.x
eoapi.auth-utils 0.4.0
Authentication & authorization helpers for eoAPI
Requires Python: >=3.8

# eoAPI Auth Utils

Helpers for authentication & authorization patterns for [eoAPI applications](https://eoapi.dev).

[![PyPI - Version](https://raw.githubusercontent.com/developmentseed/eoapi-auth-utils/0.4.0a1/https://img.shields.io/pypi/v/eoapi.auth-utils)](https://pypi.org/project/eoapi.auth-utils/)

## Usage

### Installation

```
pip install eoapi.auth-utils
```

### Integration

In your eoAPI application:

```py
from eoapi.auth_utils import AuthSettings, OpenIdConnectAuth
from fastapi import FastAPI
from fastapi.routing import APIRoute
from stac_fastapi.api.app import StacApi

auth_settings = AuthSettings(_env_prefix="AUTH_")

api = StacApi(
    app=FastAPI(
        # ...
        swagger_ui_init_oauth={
            "clientId": auth_settings.client_id,
            "usePkceWithAuthorizationCodeGrant": auth_settings.use_pkce,
        },
    ),
    # ...
)

if auth_settings.openid_configuration_url:
    oidc_auth = OpenIdConnectAuth.from_settings(auth_settings)

    # Implement your custom app-specific auth logic here...
    restricted_routes = {
        "/collections": ("POST", "stac:collection:create"),
        "/collections/{collection_id}": ("PUT", "stac:collection:update"),
        "/collections/{collection_id}": ("DELETE", "stac:collection:delete"),
        "/collections/{collection_id}/items": ("POST", "stac:item:create"),
        "/collections/{collection_id}/items/{item_id}": ("PUT", "stac:item:update"),
        "/collections/{collection_id}/items/{item_id}": ("DELETE", "stac:item:delete"),
    }
    api_routes = {
        route.path: route for route in api.app.routes if isinstance(route, APIRoute)
    }
    for endpoint, (method, scope) in restricted_routes.items():
        route = api_routes.get(endpoint)
        if route and method in route.methods:
            oidc_auth.apply_auth_dependencies(route, required_token_scopes=[scope])
```


## Development

### Releases

Releases are managed via CICD workflow, as described in the [Python Packaging User Guide](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/). To create a new release:

1. Update the version in `eoapi/auth_utils/__init__.py` following appropriate [Semantic Versioning convention](https://semver.org/).
1. Push a tagged commit to `main`, with the tag matching the package's new version number.

> [!NOTE]  
> This package makes use of Github's [automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes). These can be later augmented if one sees fit.