Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
65a8aaa
Drop old Pythons, add new pythons
GhostofGoes Jan 23, 2023
1284798
Remove old RPM packaging
GhostofGoes Jan 23, 2023
84a8de6
Fix test
GhostofGoes Jan 23, 2023
1833bc2
fix ci
GhostofGoes Jan 24, 2023
8364ad6
3.12 isn't in CI yet apparently
GhostofGoes Jan 24, 2023
7a3dbe2
update copyright year
GhostofGoes Jan 24, 2023
7b86c35
Replace setup.py with pyproject.toml
GhostofGoes Jan 24, 2023
2cf693f
fix tox version
GhostofGoes Jan 24, 2023
ce0d2e9
Merge branch 'main' into 1.0.0-wip
GhostofGoes Jan 24, 2023
69f1a44
Drop Python 3.6 support
GhostofGoes Jan 24, 2023
00d47f9
attempt to fix ci
GhostofGoes Jan 24, 2023
159dd37
Move to Poetry
GhostofGoes Jan 25, 2023
54d138c
fix poetry lint
GhostofGoes Jan 25, 2023
3dbf40d
Merge branch 'main' into 1.0.0-wip
GhostofGoes Jun 2, 2023
974fcd8
README updates and improvements
GhostofGoes Jun 2, 2023
94e1769
Update contributing guide
GhostofGoes Jun 2, 2023
8770dbb
update poetry.lock
GhostofGoes Jun 2, 2023
c2655e0
lint fixes
GhostofGoes Jun 2, 2023
2f002de
Move to ruff
GhostofGoes Jun 2, 2023
d737046
tox cleanup
GhostofGoes Jun 2, 2023
24da811
Type annotations! Wow!
GhostofGoes Jun 2, 2023
8c04320
attempt to fix coveralls
GhostofGoes Jun 3, 2023
30de2e2
attempt to fix poetry install on windows
GhostofGoes Jun 3, 2023
2d8ca58
update lock
GhostofGoes Jun 3, 2023
231ada9
Fix issues, type annotations
GhostofGoes Jun 3, 2023
f66353c
more fix
GhostofGoes Jun 3, 2023
e148202
remove pypy from CI tests
GhostofGoes Jun 3, 2023
88381e2
try a different poetry action
GhostofGoes Jun 3, 2023
ca1034e
More fiddling around with CI
GhostofGoes Jun 3, 2023
f4be003
bad job, BAD!
GhostofGoes Jun 3, 2023
349ecfd
some test improvements
GhostofGoes Jun 3, 2023
ed9553f
remove old video that used 'get-mac' command
GhostofGoes Jun 3, 2023
0c1a478
WIP TODO
GhostofGoes Jul 25, 2023
215a563
Add Poetry badge to README
GhostofGoes Aug 25, 2023
d43446d
update TODOs
GhostofGoes Oct 12, 2023
7b58939
wip
GhostofGoes Oct 12, 2023
ff0fe60
add variables.py, holds global variables
GhostofGoes Oct 12, 2023
4cd2ede
Move to new global variables system
GhostofGoes Oct 13, 2023
bec556f
docstrings
GhostofGoes Oct 13, 2023
0836fd3
Convert old-style strings to f-strings
GhostofGoes Oct 13, 2023
90440f4
Reorganize CLI help for clarity
GhostofGoes Oct 13, 2023
ea09e51
Remove Python "Scripts" from path on Windows
GhostofGoes Oct 13, 2023
ca9a0c4
remove validate-pyproject
GhostofGoes Oct 13, 2023
d17a508
update dev dependencies
GhostofGoes Oct 13, 2023
72884a7
add python 3.12 to CI
GhostofGoes Oct 13, 2023
535e42e
Merge branch 'main' into 1.0.0-wip
GhostofGoes Jun 1, 2024
3be4311
Merge branch 'main' into 1.0.0-wip
GhostofGoes Jul 16, 2024
75ff840
fix references
GhostofGoes Jul 18, 2024
ac38cd1
Move utils into separate file
GhostofGoes Jul 18, 2024
e994814
docstrings!
GhostofGoes Jul 18, 2024
f6ac53f
decode byte-typed args
GhostofGoes Jul 18, 2024
c530b25
Support ipaddress objects
GhostofGoes Jul 18, 2024
d97db6b
make mypy happy
GhostofGoes Jul 18, 2024
b13b58d
fix checks for IPInterface objects
GhostofGoes Jul 18, 2024
7431f8a
add tests for new functionalities
GhostofGoes Jul 18, 2024
4cf02fa
Begin conversion to PDM
GhostofGoes Aug 23, 2024
e08edaf
Update CI for PDM, other misc PDM-related changes
GhostofGoes Aug 23, 2024
496de62
lol
GhostofGoes Aug 23, 2024
7907cb9
Lint fixes
GhostofGoes Aug 23, 2024
c5ad762
attempt to fix codecov
GhostofGoes Aug 23, 2024
762efc3
update readme badges
GhostofGoes Aug 23, 2024
5d4690c
apparently debian python team started packaging it as of getmac 0.9.4
GhostofGoes Aug 23, 2024
4dd90ca
add trackgit
GhostofGoes Aug 23, 2024
12523e4
fix lint failing silently
GhostofGoes Aug 23, 2024
070493d
attempt to fix lint test
GhostofGoes Aug 23, 2024
2462060
Remove Coveralls (RIP)
GhostofGoes Aug 23, 2024
aeb4c85
Remove tox
GhostofGoes Aug 23, 2024
7603b11
doc tools, SECURITY.md updates
GhostofGoes Aug 23, 2024
5c36a39
reorganize docs
GhostofGoes Mar 25, 2025
8976ce2
WIP on docs
GhostofGoes Mar 25, 2025
251e005
add .rst to editorconfig
GhostofGoes Mar 25, 2025
a08758b
update badges in readme
GhostofGoes Mar 25, 2025
e4f4c26
update deps i guess? (need to relock this is old)
GhostofGoes Mar 25, 2025
be62fec
fix: mark constants as Final
GhostofGoes Jul 12, 2025
8282b32
doc: ignore built_docs
GhostofGoes Jul 12, 2025
ce26d78
style: trim markdown files
GhostofGoes Jul 12, 2025
3d47fa8
deps: add sphinx-issues, update deps
GhostofGoes Jul 12, 2025
15cf6ed
doc: refactor doc build
GhostofGoes Jul 12, 2025
5185451
doc: refresh contributor guide
GhostofGoes Jul 12, 2025
675f938
doc: refresh bug report template
GhostofGoes Jul 12, 2025
fb08171
refactor: move arg parsing into function
GhostofGoes Jul 12, 2025
885675e
doc: initial stab at docs refresh
GhostofGoes Jul 12, 2025
0662596
doc: overhaul source code docs
GhostofGoes Jul 12, 2025
1724f4f
chore: fix lint issues
GhostofGoes Jul 12, 2025
8db0383
style: sort imports using isort
GhostofGoes Jul 12, 2025
7e4fadf
lint and test improvements
GhostofGoes Jul 16, 2025
1798f4d
dev: add PDM scripts for manpage and doc build
GhostofGoes Dec 29, 2025
63ec292
doc: build manpage from CLI docs
GhostofGoes Dec 29, 2025
06f2c52
ci: add doc build to CI
GhostofGoes Dec 29, 2025
ce33ec0
build: CI updates
GhostofGoes Dec 29, 2025
93b0403
test: fix bad mocks
GhostofGoes Dec 29, 2025
81a40da
ci: attempt to fix MacOS tests
GhostofGoes Dec 30, 2025
cdfe236
simplify doc CI
GhostofGoes Dec 30, 2025
feee442
ci: publish docs to github pages
GhostofGoes Dec 30, 2025
2a979ad
build: add documentation link
GhostofGoes Dec 30, 2025
fba638d
docs: add changelog and contributor pages
GhostofGoes Dec 30, 2025
884839e
ci: python 3.13 and 3.14
GhostofGoes Dec 30, 2025
7f7a5e2
dev: exclude built docs from codespell
GhostofGoes Dec 30, 2025
fb6791e
build: mark python 3.13 and 3.14 as supported
GhostofGoes Dec 30, 2025
a928899
doc: usage examples, notes, limitations
GhostofGoes Dec 30, 2025
cac07c8
feat: add getmac.get_default_interface()
GhostofGoes Dec 30, 2025
732503a
fix: remove UuidArpGetNode method
GhostofGoes Dec 30, 2025
d14d860
doc: update changelog
GhostofGoes Dec 30, 2025
bf92515
test: add samples from Factor project
GhostofGoes Dec 30, 2025
7180d1b
test: add samples from GLPI Agent project
GhostofGoes Dec 30, 2025
9d0b0ae
feat: add LanscanIface method
GhostofGoes Dec 30, 2025
c14a212
refactor!: remove UuidLanscan method
GhostofGoes Dec 30, 2025
9eec242
feat: HP-UX detection and default interface
GhostofGoes Dec 30, 2025
e15fa75
fix: improve ArpVariousArgs and testing
GhostofGoes Dec 30, 2025
abf50b2
refactor: route path as class attribute
GhostofGoes Dec 30, 2025
84477b4
test: improve test coverage
GhostofGoes Dec 30, 2025
143d91b
fix!: raise RuntimeError in critical cases
GhostofGoes Dec 30, 2025
cb87748
dev: switch to Ruff format
GhostofGoes Jan 1, 2026
eebad08
test: add test for packaging artifacts
GhostofGoes Jan 1, 2026
63ca0ab
dev: revisit auto-publishing later
GhostofGoes Jan 1, 2026
3683508
test: improve test coverage in get_mac_address
GhostofGoes Jan 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

17 changes: 16 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ trim_trailing_whitespace = true
# Use 2 spaces for the HTML files
[*.{yml,yaml}]
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.toml]
insert_final_newline = true
trim_trailing_whitespace = true

# The JSON files contain newlines inconsistently
[*.json]
Expand All @@ -36,4 +42,13 @@ indent_size = 2
[**/tests/samples/**]
indent_style = unset
indent_size = unset
end_of_line = unset
end_of_line = unset

[*.rst]
indent_size = 3
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = true
trim_trailing_whitespace = true
28 changes: 16 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@ about: Report errors, bugs, or anything else that isn't working as expected.

---

**Describe the bug**
A clear and concise description of what the bug is.
## Describe the bug
A clear and concise description in English of the bug/issue. Include the command(s) run or code used, and any relevant output. Please include **text output** in English. For output that exceeds a ~1000 characters, use a [GitHub Gist](https://gist.github.com/) and include a link in the issue. Screenshots or photos of screens are not acceptable.

**To Reproduce**
## To Reproduce
Steps to reproduce the behavior [if applicable].

**Expected behavior**
## Expected behavior
A clear and concise description of what you expected to happen.

**System info**
(please complete the following information):
- OS name (e.g. Windows 10 x64):
- OS Version (e.g. 1804 build 17134):
- Python version (e.g. CPython 3.6.5 x64):
- getmac version (e.g. getmac 0.8.3):
## System information
**Please complete the following sections**:
- OS name, version, and architecture:
- Python interpreter and version:
- `getmac` version:

**Additional context**
Add any other context about the problem here.
Example:
- OS name, version, and architecture: Windows 10 1804 build 17134 x64
- Python interpreter and version: CPython 3.6.5 x64
- `getmac` version (run `python3 -m getmac --version`): getmac 0.8.3

## Additional context
Add any other context about the problem here, and links to any related issues [if applicable].
8 changes: 4 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

### Code changes:

- [ ] Did you format your code with Black?
- `black getmac tests`
- [ ] Did you format your code?
- `pdm run format`
- [ ] Are the linting checks passing?
- `tox -e check`
- `pdm run lint`
- [ ] Do all tests pass locally?
- `tox`
- `pdm run test`
- [ ] Have you updated the [CHANGELOG](CHANGELOG.md) with a summary of your change?
- [ ] Did you add your name to the contributors list in the [README](README.md)?

Expand Down
200 changes: 108 additions & 92 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
name: CI

on:
- release
- push
- pull_request

- release
- push
- pull_request
jobs:
lint:
name: Run lint checks
runs-on: ubuntu-20.04
# Workaround to disable pip upgrade warnings until fixed in setup-python
# See: https://github.com/actions/setup-python/issues/532
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v6
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.8"
- name: Install tox
run: python -m pip install tox
python-version: "3.11"
cache: true
- name: Install dependencies
# NOTE: test is needed here to evaluate imports for pytest
run: pdm sync -d -G lint,test
- name: Run lint checks
run: tox -e check
run: pdm run lint
test:
name: Run tests
runs-on: ${{ matrix.platform }}
# Workaround to disable pip upgrade warnings until fixed in setup-python
# See: https://github.com/actions/setup-python/issues/532
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
strategy:
fail-fast: false
# Versions available:
Expand All @@ -38,105 +31,128 @@ jobs:
# OS images: https://github.com/actions/runner-images
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "pypy-3.7"
- "pypy-3.8"
- "pypy-3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
architecture:
- x86
- x64
- arm64
platform:
- ubuntu-20.04
- ubuntu-22.04
- windows-latest
# Fix tests failing on MacOS 14+ due to ARM architecture
# https://github.com/actions/setup-python/issues/825
# TODO: update tests to use ARM MacOS with 14+, add
# architecture to the list of architectures above.
- macos-13
- macos-latest
exclude:
- platform: ubuntu-20.04
- platform: ubuntu-22.04
architecture: x86
- platform: macos-13
- platform: ubuntu-22.04
architecture: arm64
- platform: windows-latest
architecture: arm64
- platform: macos-latest
architecture: x86
- platform: macos-13
python-version: "pypy-3.7"
- platform: macos-13
python-version: "pypy-3.8"
- platform: macos-latest
architecture: x64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v6
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Display platform and environment information
run: |
python --version
pdm run python --version
python -c "import sys; print('sys.version: %s' % str(sys.version))"
python -c "import sys; print('sys.platform: %s' % str(sys.platform))"
python -c "import os; print('os.name: %s' % str(os.name))"
python -c "import platform; print('platform.uname(): %s' % str(platform.uname()))"
- name: Install dependencies
run: python -m pip install tox coveralls tox-gh-actions
run: pdm sync -d -G test
# TODO: fix benchmark results (maybe a separate Job?)
- name: Run tests
run: tox
- uses: codecov/codecov-action@v3
run: pdm run test
- uses: codecov/codecov-action@v4
with:
# codecov is annoying. Not sure why I'm still using it,
# may need to look at something that has less heisenbugs.
# https://community.codecov.com/t/ci-failure-due-to-too-many-uploads-to-this-commit/2587/12
fail_ci_if_error: false
- name: Coveralls
if: ${{ matrix.platform == 'ubuntu-20.04' && github.event_name != 'pull_request' }}
uses: AndreMiras/coveralls-python-action@develop
token: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Build HTML docs and manpage
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
cache: true
- name: Install dependencies
run: pdm sync -d -G docs
- name: Build docs
run: pdm run docs
- uses: actions/upload-artifact@v6
with:
name: html-docs
path: html_docs/
- uses: actions/upload-pages-artifact@v4
with:
parallel: true
flag-name: ${{ matrix.python-version }}-${{ matrix.platform }}
coveralls_finish:
needs: test
runs-on: ubuntu-20.04
path: html_docs/
- uses: actions/upload-artifact@v6
with:
name: manpage
path: manpage/getmac.1
deploy:
name: Publish docs to GitHub Pages
needs: docs
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/1.0.0-wip'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Coveralls Finished
if: ${{ github.event_name != 'pull_request' }}
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

# TODO: publish
# TODO: need to do this for both "getmac" and "get-mac" packages
# TODO: publish releases using CI
# TODO: don't publish pre-releases OR publish them as pre-releases to PyPI

# https://github.com/marketplace/actions/upload-a-build-artifact

# name: "Build and publish a release"

# on:
# release:
# types: [released]

# jobs:
# publish:
# name: "📦 Publish Python distributions"
# runs-on: "ubuntu-20.04"
# strategy:
# matrix:
# python-version:
# - "3.8"
# steps:
# - uses: actions/checkout@v3
# - name: "🐍 Set up Python ${{ matrix.python-version }}"
# uses: actions/setup-python@v4
# with:
# python-version: "${{ matrix.python-version }}"
# - name: "🐍 Install wheel"
# run: "python -m pip install wheel --user"
# - name: "🐍 Build a binary wheel and a source tarball"
# run: "python setup.py sdist bdist_wheel"
# - name: "📦 Publish distribution to PyPI"
# uses: "pypa/gh-action-pypi-publish@master"
# if: "startsWith(github.ref, 'refs/tags')"
# with:
# password: "${{ secrets.pypi_password }}"
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
# https://pdm-project.org/en/latest/usage/publish/
# publish:
# name: Publish Release
# needs: [test, lint, docs]
# runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
# permissions:
# contents: write
# id-token: write
# steps:
# - uses: actions/checkout@v6
# - name: Setup PDM
# uses: pdm-project/setup-pdm@v4
# with:
# python-version: "3.11"
# cache: true
# - name: Build artifacts
# run: pdm build
# - name: Publish to PyPI
# run: pdm publish
# - uses: actions/download-artifact@v6
# with:
# name: manpage
# path: manpage_dist
# - name: Create GitHub Release
# uses: softprops/action-gh-release@v2
# with:
# files: |
# dist/*
# manpage_dist/getmac.1
# generate_release_notes: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
.idea/
.vscode/
.vagrant/
.pdm-python

built_docs/
html_docs/
manpage/
docs/api/

.pytest_cache

Expand Down
Loading
Loading