Skip to content

Commit

Permalink
Upgrade cel
Browse files Browse the repository at this point in the history
  • Loading branch information
hardbyte committed Nov 20, 2024
1 parent 270eb32 commit ff11618
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 39 deletions.
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,25 +254,16 @@ Kubernetes operator to inject data.
Update version in `pyproject.toml`, push to `main` and create a release on GitHub. Pypi release will be carried
out by GitHub actions.

Install dev dependencies with Poetry:
Install dev dependencies with `uv`:

```shell
poetry install --with dev
```

### Manual Release
To release manually, use Poetry:

```shell
poetry version patch
poetry build
poetry publish
uv sync
```

### Testing

Pytest is used for testing.

```shell
poetry run pytest
uv run pytest
```
4 changes: 1 addition & 3 deletions netcheck/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ def __init__(self, directory, *args, **kwargs):
# Pre-populate the dictionary with keys for each file in the directory
for filename in os.listdir(directory):
# We'll use None as a placeholder for the file contents
# We could strip filename extensions, but I think it is clearer not to
# os.path.splitext(filename)[0]
self[filename] = None

def __getitem__(self, key):
Expand All @@ -96,5 +94,5 @@ def __getitem__(self, key):

def items(self):
# Override items() to call __getitem__ for each key
# Required because CEL calls items() when converting to CEL Map type.
return [(key, self[key]) for key in self]

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies = [
"typer<1.0,>=0.9",
"pydantic<3.0,>=1.10",
"rich<14.0.0,>=10.11.0",
"common-expression-language>=0.3.0",
"common-expression-language>=0.3.1",
"pyyaml>=6.0.2",
]

Expand Down
46 changes: 23 additions & 23 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ff11618

Please sign in to comment.