Skip to content

Commit b9c5fc9

Browse files
authored
Merge pull request #2 from dariomi/update-dependencies-2026-04
Update dependencies 2026-04
2 parents 8aa32fd + 603e74a commit b9c5fc9

12 files changed

Lines changed: 735 additions & 166 deletions

File tree

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
if: github.repository == 'netcloud/aciClient'
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
18+
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v4
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v6
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
enable-cache: true
28+
29+
- name: Sync dependencies
30+
run: uv sync --group dev
31+
32+
- name: Run tests
33+
run: uv run pytest
34+
35+
- name: Run lint
36+
run: uv run ruff check .

.github/workflows/publish.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*"
8+
9+
jobs:
10+
build:
11+
if: github.repository == 'netcloud/aciClient'
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v6
22+
with:
23+
python-version: "3.13"
24+
enable-cache: true
25+
26+
- name: Build distributions
27+
run: uv build
28+
29+
- name: Store distributions
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: python-package-distributions
33+
path: dist/
34+
35+
publish-pypi:
36+
if: github.repository == 'netcloud/aciClient'
37+
needs: build
38+
runs-on: ubuntu-latest
39+
permissions:
40+
id-token: write
41+
42+
environment:
43+
name: pypi
44+
45+
steps:
46+
- name: Download distributions
47+
uses: actions/download-artifact@v4
48+
with:
49+
name: python-package-distributions
50+
path: dist/
51+
52+
- name: Publish to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/python-app.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ Thumbs.db
99
**/Thumbs.db
1010
**/leaf-*.html
1111
.venv
12+
.venv/
1213
venv
14+
.uv-cache/
15+
build/
1316
dist
17+
dist/
1418
*.egg-info/
15-
.pytest_cache
19+
__pycache__/
20+
.pytest_cache
21+
.pytest_cache/

CONTRIBUTING.md

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,57 @@ Please follow the procedure below:
55
1. Please search existing issues to determine if an issue already exists for what you intend to contribute.
66
2. If the issue does not already exist, create a new issue and describe the bug or feature request.
77
3. Please wait for a feedback.
8-
4. With a positive feedback from us You can go on and fork the project for doing Your changes.
9-
5. Following the Pull Request Process
8+
4. With positive feedback from us, fork the repository and prepare your changes there.
9+
5. Open a pull request to `netcloud/aciClient`.
1010

1111
## Pull Request Process
1212

13-
1. Increase the version numbers in any examples files and the README.md to the new version that this
14-
Pull Request would represent. The versioning scheme we use is:
15-
16-
```
17-
<MAJOR>.<MINOR>
18-
```
19-
20-
Major = Breaking Changes
21-
22-
Minor = Backwards Compatible / New Features / Bug Fixes
23-
24-
2. Create Pull Request
13+
1. Install the development environment:
14+
15+
```bash
16+
uv sync --group dev
17+
```
18+
19+
2. Run the local checks before opening or updating a pull request:
20+
21+
```bash
22+
uv run pytest
23+
uv run ruff check .
24+
```
25+
26+
3. Update documentation and examples when your change affects behavior.
27+
28+
4. Open a pull request to `netcloud/aciClient`.
29+
30+
The upstream CI workflow runs on pull requests and validates the change set.
31+
32+
## Release Process
33+
34+
Releases are done from the upstream repository:
35+
36+
1. Contributors work in forks and submit pull requests to `netcloud/aciClient`.
37+
2. The upstream CI workflow runs tests and lint checks for the pull request.
38+
3. After review, the pull request is merged into `netcloud/aciClient`.
39+
4. When maintainers want to publish a release, they update the version in `pyproject.toml` if needed.
40+
5. Maintainers create a version tag such as `v1.8` in `netcloud/aciClient`.
41+
6. The upstream publish workflow builds the package with `uv build` and publishes it to PyPI.
42+
43+
Publishing requires PyPI trusted publishing to be configured for `netcloud/aciClient`.
2544

2645
# Coding Convention
2746

28-
* Python Language Rules (PEP8) are followed and verified with flake8
47+
* Python Language Rules (PEP8) are followed and verified with Ruff
2948
* The code is structured according to the Clean Code paradigm
3049
* Code and Documentation is written in English
3150
* At least UnitTests are written
3251
* A useful exception handling is available
3352
* A useful logging is available
3453
* If foreign code is used, no license agreements have been broken.
3554

55+
## Local Development
56+
57+
```bash
58+
uv sync --group dev
59+
uv run pytest
60+
uv run ruff check .
61+
```

Makefile

Lines changed: 0 additions & 30 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ A python wrapper to the Cisco ACI REST-API.
66

77
## Python Version
88

9-
We support Python 3.6 and up. Python 2 is not supported and there is no plan to add support for it.
9+
We support Python 3.10 and up.
1010

1111
## Installation
12-
``pip install aciClient``
12+
With `pip`:
1313

14-
## Installation for Developing
14+
```bash
15+
pip install aciClient
1516
```
16-
git clone https://github.com/netcloud/aciclient.git
17-
pip install -r requirements.txt
18-
python setup.py develop
17+
18+
With `uv`:
19+
20+
```bash
21+
uv add aciClient
22+
```
23+
24+
## Installation for Developing
25+
```bash
26+
git clone https://github.com/netcloud/aciClient.git
27+
uv sync --group dev
1928
```
2029

2130
## Usage
@@ -118,12 +127,6 @@ To use the subscriptions you have to:
118127

119128
You can find example code here: examples/subscription.py
120129

121-
## Testing
122-
123-
```
124-
pip install -r requirements.txt
125-
python -m pytest
126-
```
127130
## Contributing
128131

129132
Please read [CONTRIBUTING.md](https://github.com/netcloud/aciClient/blob/master/CONTRIBUTING.md) for details on our code

pyproject.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
requires = ["setuptools>=69"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "aciClient"
7+
version = "1.8"
8+
description = "ACI communication helper class"
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
license = { text = "MIT" }
12+
authors = [
13+
{ name = "Netcloud AG", email = "nc_dev@netcloud.ch" },
14+
]
15+
dependencies = [
16+
"pyOpenSSL>=26.0.0,<27",
17+
"requests[socks]>=2.33.1,<3",
18+
]
19+
classifiers = [
20+
"License :: OSI Approved :: MIT License",
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
28+
]
29+
30+
[project.urls]
31+
Homepage = "https://github.com/netcloud/aciClient"
32+
Repository = "https://github.com/netcloud/aciClient"
33+
Issues = "https://github.com/netcloud/aciClient/issues"
34+
35+
[dependency-groups]
36+
dev = [
37+
"pytest>=9.0.2,<10",
38+
"requests-mock>=1.12.1,<2",
39+
"ruff>=0.13.0,<0.14",
40+
]
41+
42+
[tool.setuptools]
43+
packages = ["aciClient"]
44+
45+
[tool.pytest.ini_options]
46+
testpaths = ["test"]
47+
48+
[tool.ruff]
49+
target-version = "py310"

requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)