Skip to content

Commit

Permalink
1.9.0 (#490)
Browse files Browse the repository at this point in the history
* Bump actions/setup-python from 5.0.0 to 5.1.0 (#475)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump codecov/codecov-action from 4.1.0 to 4.1.1 (#476)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix codecov-action dependency (#477)

* Bump codecov/codecov-action from 4.1.1 to 4.2.0 (#479)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4.1.1...v4.2.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump codecov/codecov-action from 4.2.0 to 4.3.0 (#480)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4.2.0...v4.3.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/download-artifact from 4.1.4 to 4.1.5 (#481)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.4 to 4.1.5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4.1.4...v4.1.5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/upload-artifact from 4.3.1 to 4.3.2 (#482)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4.3.1...v4.3.2)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/checkout from 4.1.2 to 4.1.4 (#488)

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4.1.2...v4.1.4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/download-artifact from 4.1.5 to 4.1.7 (#487)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.5 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4.1.5...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/upload-artifact from 4.3.2 to 4.3.3 (#486)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4.3.2...v4.3.3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add support for Merlin 388.7 sysinfo layout (#489)

* Bump version to `1.9.0`

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
Vaskivskyi and dependabot[bot] authored May 1, 2024
1 parent 3d9b324 commit 221802b
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 18 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
pip_cache_dir: ${{ steps.pip-cache.outputs.dir }}
steps:
- name: Checkout
uses: actions/[email protected].1
uses: actions/[email protected].4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -60,10 +60,10 @@ jobs:
python-version: [3.11, 3.12]
steps:
- name: Checkout
uses: actions/[email protected].1
uses: actions/[email protected].4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
pytest --cov=asusrouter --cov-report=xml:unit-tests-cov-${{ matrix.python-version }}.xml -k 'not test_devices'
- name: Upload coverage to artifacts
uses: actions/[email protected].1
uses: actions/[email protected].3
with:
name: unit-tests-cov-${{ matrix.python-version }}
path: unit-tests-cov-${{ matrix.python-version }}.xml
Expand All @@ -106,10 +106,10 @@ jobs:
python-version: [3.11, 3.12]
steps:
- name: Checkout
uses: actions/[email protected].1
uses: actions/[email protected].4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
pytest --cov=asusrouter --cov-report=xml:real-data-tests-cov-${{ matrix.python-version }}.xml tests/test_devices.py --log-cli-level=INFO
- name: Upload coverage to artifacts
uses: actions/[email protected].1
uses: actions/[email protected].3
with:
name: real-data-tests-cov-${{ matrix.python-version }}
path: real-data-tests-cov-${{ matrix.python-version }}.xml
Expand All @@ -152,22 +152,22 @@ jobs:
python-version: [3.11, 3.12]
steps:
- name: Checkout
uses: actions/[email protected].1
uses: actions/[email protected].4

- name: Download unit-tests coverage from artifacts
uses: actions/[email protected].2
uses: actions/[email protected].7
with:
name: unit-tests-cov-${{ matrix.python-version }}
path: .

- name: Download real-data-tests coverage from artifacts
uses: actions/[email protected].2
uses: actions/[email protected].7
with:
name: real-data-tests-cov-${{ matrix.python-version }}
path: .

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
uses: codecov/codecov-action@v4.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:

steps:
- name: Checkout the repository
uses: actions/[email protected].1
uses: actions/[email protected].4
with:
ref: ${{ github.event.release.target_commitish }}

- name: Setup Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}

Expand Down
17 changes: 14 additions & 3 deletions asusrouter/modules/endpoint/sysinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,21 @@ def process(data: dict[str, Any]) -> dict[AsusData, Any]:
memory_info = {}
memory_data = data.get("mem_stats_arr")
if memory_data:
# Before 388.7
# JFFS data is presented as a string of `XX.xx / YY.yy MB`
# where `XX.xx` is the used space (float) and `YY.yy` is the total space (float)
jffs_data = memory_data[7][:-3].split(" / ")
jffs_used = safe_float(jffs_data[0])
jffs_total = safe_float(jffs_data[1])
jffs = memory_data[7]
if "/" in jffs:
jffs_data = jffs[:-3].split(" / ")
jffs_used = safe_float(jffs_data[0])
jffs_total = safe_float(jffs_data[1])
jffs_free = jffs_total - jffs_used if jffs_used and jffs_total else None
# From 388.7
# JFFS is just a `free` single float
else:
jffs_free = safe_float(jffs)
jffs_used = None
jffs_total = None

memory_info = {
"total": safe_float(memory_data[0]),
Expand All @@ -72,6 +82,7 @@ def process(data: dict[str, Any]) -> dict[AsusData, Any]:
"swap_1": safe_float(memory_data[4]),
"swap_2": safe_float(memory_data[5]),
"nvram": safe_int(memory_data[6]),
"jffs_free": jffs_free,
"jffs_used": jffs_used,
"jffs_total": jffs_total,
}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "asusrouter"
version = "1.8.0"
version = "1.9.0"
license = {text = "Apache-2.0"}
requires-python = ">=3.11.0"
readme = "README.md"
Expand Down
1 change: 1 addition & 0 deletions tests/test_data/rt_ax88u_merlin_388/sysinfo_001.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"swap_1": 0.0,
"swap_2": 0.0,
"nvram": 85328,
"jffs_free": 55.51,
"jffs_used": 7.49,
"jffs_total": 63.0,
},
Expand Down
11 changes: 11 additions & 0 deletions tests/test_data/rt_ax88u_merlin_388_7/sysinfo_001.content
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
wlc_0_arr = ["11", "11", "11"];
wlc_1_arr = ["3", "3", "3"];
wlc_2_arr = ["0", "0", "0"];
wlc_3_arr = ["0", "0", "0"];
conn_stats_arr = ["320","86"];
mem_stats_arr = ["882.34", "566.32", "0.00",
"20.11", "0.00", "0.00",
"73397", "61.11",
"294.60", "552.04"];
cpu_stats_arr = ["2.21", "1.43", "0.64"];

45 changes: 45 additions & 0 deletions tests/test_data/rt_ax88u_merlin_388_7/sysinfo_001.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"""Result of processing sysinfo_001.content."""

from asusrouter import AsusData
from asusrouter.modules.wlan import Wlan

expected_result = {
AsusData.SYSINFO: {
"wlan": {
Wlan.FREQ_2G: {
"client_associated": 11,
"client_authorized": 11,
"client_authenticated": 11,
},
Wlan.FREQ_5G: {
"client_associated": 3,
"client_authorized": 3,
"client_authenticated": 3,
},
Wlan.FREQ_5G2: {
"client_associated": 0,
"client_authorized": 0,
"client_authenticated": 0,
},
Wlan.FREQ_6G: {
"client_associated": 0,
"client_authorized": 0,
"client_authenticated": 0,
},
},
"connections": {"total": 320, "active": 86},
"memory": {
"total": 882.34,
"free": 566.32,
"buffers": 0.0,
"cache": 20.11,
"swap_1": 0.0,
"swap_2": 0.0,
"nvram": 73397,
"jffs_free": 61.11,
"jffs_used": None,
"jffs_total": None,
},
"load_avg": {1: 2.21, 5: 1.43, 15: 0.64},
}
}

0 comments on commit 221802b

Please sign in to comment.