Skip to content

Commit f78d4cf

Browse files
authored
Merge pull request #25 from packetcoders/development
Release v1.0.0
2 parents 8c0b450 + d9ce925 commit f78d4cf

File tree

16 files changed

+1593
-1835
lines changed

16 files changed

+1593
-1835
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
21
name: CI
3-
42
on:
53
push:
64
branches: [ "main" ]
@@ -13,42 +11,54 @@ jobs:
1311
name: "lint"
1412
strategy:
1513
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11"]
17-
poetry-version: [1.3.1]
14+
python-version: ["3.11", "3.12"]
1815
runs-on: ubuntu-latest
1916
steps:
2017
- name: Check out repository
2118
uses: actions/checkout@v4
2219

23-
- name: "Setup Python, Poetry and Dependencies"
24-
uses: packetcoders/action-setup-cache-python-poetry@main
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v5
22+
23+
- name: "Set up Python"
24+
uses: actions/setup-python@v5
2525
with:
26-
python-version: ${{matrix.python-version}}
27-
poetry-version: ${{matrix.poetry-version}}
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install dependencies
29+
run: |
30+
uv pip install black autoflake ruff mypy pytest --system
31+
uv pip install -e . --system
2832
29-
- run: poetry run black . --check
30-
- run: poetry run autoflake -r . --expand-star-imports --remove-unused-variables --remove-all-unused-imports
31-
- run: poetry run ruff format . --check
32-
- run: poetry run ruff check .
33-
- run: poetry run mypy .
33+
- run: black . --check
34+
- run: autoflake -r . --expand-star-imports --remove-unused-variables --remove-all-unused-imports
35+
- run: ruff format . --check
36+
- run: ruff check .
37+
- run: mypy .
3438

3539
test:
3640
name: "test"
3741
needs: "lint"
3842
strategy:
3943
matrix:
40-
python-version: ["3.8", "3.9", "3.10", "3.11"]
41-
poetry-version: [1.3.1]
44+
python-version: ["3.11", "3.12"]
4245
runs-on: ubuntu-latest
4346
steps:
4447
- name: Check out repository
45-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4649

47-
- name: "Setup Python, Poetry and Dependencies"
48-
uses: packetcoders/action-setup-cache-python-poetry@main
50+
- name: Install uv
51+
uses: astral-sh/setup-uv@v5
52+
53+
- name: "Set up Python"
54+
uses: actions/setup-python@v5
4955
with:
50-
python-version: ${{matrix.python-version}}
51-
poetry-version: ${{matrix.poetry-version}}
52-
56+
python-version: ${{ matrix.python-version }}
57+
58+
- name: Install dependencies
59+
run: |
60+
uv pip install pytest --system
61+
uv pip install -e . --system
62+
5363
- name: Test
54-
run: poetry run pytest tests -vvv --tb=short
64+
run: pytest tests -vvv --tb=short

Makefile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ help:
66
awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
77

88
lint:
9-
poetry run black . --check
10-
poetry run autoflake -r . --expand-star-imports --remove-unused-variables --remove-all-unused-imports
11-
poetry run ruff format . --check
12-
poetry run ruff check .
13-
poetry run mypy .
9+
uv run black . --check
10+
uv run autoflake -r . --expand-star-imports --remove-unused-variables --remove-all-unused-imports
11+
uv run ruff format . --check
12+
uv run ruff check .
13+
uv run mypy --install-types
14+
uv run mypy .
1415

1516
fmt:
16-
poetry run black .
17-
poetry run autoflake -r -i . --expand-star-imports --remove-unused-variables --remove-all-unused-imports
18-
poetry run ruff format .
19-
poetry run ruff check . --fix
17+
uv run black .
18+
uv run autoflake -r -i . --expand-star-imports --remove-unused-variables --remove-all-unused-imports
19+
uv run ruff format .
20+
uv run ruff check . --fix
2021

2122
test:
22-
poetry run pytest tests -v --tb=short -s
23+
uv run pytest tests -v --tb=short -s

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
<p></p>
44
</div>
55

6-
> [!IMPORTANT]
7-
> Please note that Net Schema is currently in beta.
8-
96
# Net Schema
107

118
## About this Project
@@ -16,18 +13,13 @@ Additionally, this project is designed for schema validation of network-specific
1613

1714
## Installation
1815

19-
To install the Net Schema library, perform the following:
20-
21-
**Pip**
16+
To install Net Schema:
2217

2318
```bash
2419
pip install net-schema
2520
```
26-
27-
**Poetry**
28-
2921
```bash
30-
poetry add net-schema
22+
uv add net-schema
3123
```
3224

3325
## Usage

examples/host_vars/rtr001.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dns_servers: 10.1.200.1
2626
ospf:
2727
area: 0
2828
networks:
29-
- 10.1.1.0247
29+
- 10.1.1.0/24
3030
- 10.1.2.0/24
3131
- 10.1.3.0/24
3232
- 10.1.4.0/24

0 commit comments

Comments
 (0)