Skip to content

Commit 0f244d9

Browse files
authored
pynetbox v7.5.0 release (#687)
1 parent 82e0227 commit 0f244d9

File tree

11 files changed

+215
-8
lines changed

11 files changed

+215
-8
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @arthanson @jnovinger @bctiemann @jeremystretch

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ body:
1111
attributes:
1212
label: pynetbox version
1313
description: What version of pynetbox are you currently running?
14-
placeholder: v7.4.1
14+
placeholder: v7.5.0
1515
validations:
1616
required: true
1717
- type: input
1818
attributes:
1919
label: NetBox version
2020
description: What version of NetBox are you currently running?
21-
placeholder: v4.0.8
21+
placeholder: v4.3.1
2222
validations:
2323
required: true
2424
- type: dropdown

.github/workflows/py3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
python: ["3.10", "3.11", "3.12"]
16-
netbox: ["4.0", "4.1", "4.2"]
16+
netbox: ["4.1", "4.2", "4.3"]
1717

1818
steps:
1919
- uses: actions/checkout@v4

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Each pyNetBox Version listed below has been tested with its corresponding NetBox
99

1010
| NetBox Version | Plugin Version |
1111
|:--------------:|:--------------:|
12+
| 4.3 | 7.5.0 |
13+
| 4.2 | 7.5.0 |
14+
| 4.1 | 7.5.0 |
1215
| 4.0.6 | 7.4.1 |
1316
| 4.0.0 | 7.3.4 |
1417
| 3.7 | 7.3.0 |

docs/development/getting-started.rst

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
Getting Started
2+
==============
3+
4+
This guide will help you get started with development on pynetbox. It covers setting up your development environment and running tests.
5+
6+
Development Environment
7+
---------------------
8+
9+
1. Fork the pynetbox repository on GitHub
10+
2. Clone your fork locally
11+
3. Create a virtual environment and install development dependencies:
12+
13+
.. code-block:: bash
14+
15+
python -m venv venv
16+
source venv/bin/activate # On Windows: venv\Scripts\activate
17+
pip install -e ".[dev]"
18+
19+
Running Tests
20+
------------
21+
22+
pynetbox uses pytest for testing. The test suite includes both unit tests and integration tests.
23+
24+
Unit Tests
25+
~~~~~~~~~
26+
27+
To run the unit tests:
28+
29+
.. code-block:: bash
30+
31+
pytest tests/unit
32+
33+
Integration Tests
34+
~~~~~~~~~~~~~~~
35+
36+
The integration tests require a running NetBox instance. The test suite uses pytest-docker to spin up NetBox instances in Docker containers.
37+
38+
To run the integration tests:
39+
40+
.. code-block:: bash
41+
42+
pytest tests/integration
43+
44+
You can specify which versions of NetBox to test against using the `--netbox-versions` flag:
45+
46+
.. code-block:: bash
47+
48+
pytest tests/integration --netbox-versions 4.1 4.2 4.3
49+
50+
Running Specific Tests
51+
~~~~~~~~~~~~~~~~~~~~
52+
53+
You can run specific test files or test functions:
54+
55+
.. code-block:: bash
56+
57+
# Run a specific test file
58+
pytest tests/unit/test_api.py
59+
60+
# Run a specific test function
61+
pytest tests/unit/test_api.py::test_api_status
62+
63+
# Run tests matching a pattern
64+
pytest -k "test_api"
65+
66+
Test Coverage
67+
~~~~~~~~~~~
68+
69+
To run tests with coverage reporting:
70+
71+
.. code-block:: bash
72+
73+
pytest --cov=pynetbox tests/
74+
75+
Submitting Pull Requests
76+
----------------------
77+
78+
Once you're happy with your work and have verified that all tests pass, commit your changes and push it upstream to your fork. Always provide descriptive (but not excessively verbose) commit messages. Be sure to prefix your commit message with the word "Fixes" or "Closes" and the relevant issue number (with a hash mark). This tells GitHub to automatically close the referenced issue once the commit has been merged.
79+
80+
.. code-block:: bash
81+
82+
git commit -m "Closes #1234: Add IPv5 support"
83+
git push origin
84+
85+
Once your fork has the new commit, submit a pull request to the pynetbox repo to propose the changes. Be sure to provide a detailed accounting of the changes being made and the reasons for doing so.
86+
87+
Once submitted, a maintainer will review your pull request and either merge it or request changes. If changes are needed, you can make them via new commits to your fork: The pull request will update automatically.
88+
89+
.. warning::
90+
Remember, pull requests are permitted only for **accepted** issues. If an issue you want to work on hasn't been approved by a maintainer yet, it's best to avoid risking your time and effort on a change that might not be accepted. (The one exception to this is trivial changes to the documentation or other non-critical resources.)

docs/development/index.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Development
2+
===========
3+
4+
Thanks for your interest in contributing to pynetbox! This introduction covers a few important things to know before you get started.
5+
6+
The Code
7+
--------
8+
9+
pynetbox is maintained on GitHub. GitHub also serves as one of our primary discussion forums. While all the code and discussion is publicly accessible, you'll need to register for a free GitHub account to engage in participation. Most people begin by forking the pynetbox repository under their own GitHub account to begin working on the code.
10+
11+
There are two permanent branches in the repository:
12+
13+
* `master` - Active development for the upcoming patch release. Pull requests will typically be based on this branch unless they introduce breaking changes that must be deferred until the next major release.
14+
* `feature` - New feature work to be introduced in the next major release.
15+
16+
pynetbox components are arranged into modules:
17+
18+
* `core/` - Core functionality including API interaction, response handling, and query building
19+
* `models/` - Model definitions for different NetBox object types
20+
* `tests/` - Test suite including unit and integration tests
21+
* `docs/` - Documentation files
22+
23+
Proposing Changes
24+
---------------
25+
26+
All substantial changes made to the code base are tracked using GitHub issues. Feature requests, bug reports, and similar proposals must all be filed as issues and approved by a maintainer before work begins. This ensures that all changes to the code base are properly documented for future reference.
27+
28+
To submit a new feature request or bug report for pynetbox, select and complete the appropriate issue template. Once your issue has been approved, you're welcome to submit a pull request containing your proposed changes.
29+
30+
.. note::
31+
Avoid starting work on a proposal before it has been accepted. Not all proposed changes will be accepted, and we'd hate for you to waste time working on code that might not make it into the project.
32+
33+
Getting Help
34+
-----------
35+
36+
There are two primary forums for getting assistance with pynetbox development:
37+
38+
* GitHub discussions - The preferred forum for general discussion and support issues. Ideal for shaping a feature requests prior to submitting an issue.
39+
* #netbox on NetDev Community Slack - Good for quick chats. Avoid any discussion that might need to be referenced later on, as the chat history is not retained indefinitely.
40+
41+
.. note::
42+
Don't use GitHub issues to ask for help: These are reserved for proposed code changes only.
43+
44+
Governance
45+
---------
46+
47+
pynetbox follows the benevolent dictator model of governance, with the lead maintainer ultimately responsible for all changes to the code base. While community contributions are welcomed and encouraged, the lead maintainer's primary role is to ensure the project's long-term maintainability and continued focus on its primary functions.
48+
49+
Licensing
50+
--------
51+
52+
The entire pynetbox project is licensed as open source under the Apache 2.0 license. This is a very permissive license which allows unlimited redistribution of all code within the project. Note that all submissions to the project are subject to the same license.
53+
54+
.. toctree::
55+
:maxdepth: 2
56+
57+
getting-started
58+
release-checklist
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Release Checklist
2+
===============
3+
4+
This document outlines the steps required to prepare and publish a new release of pynetbox.
5+
6+
Pre-Release Tasks
7+
---------------
8+
9+
1. Ensure all tests are passing:
10+
11+
.. code-block:: bash
12+
13+
pytest
14+
15+
2. Update version number in `pynetbox/__init__.py`
16+
3. Update documentation for any new features or changes
17+
4. Check NetBox Docker releases:
18+
- Visit https://github.com/netbox-community/netbox-docker/releases
19+
- Review the latest NetBox Docker releases and their corresponding NetBox versions
20+
- Update supported NetBox versions in `tests/integration/conftest.py` if needed
21+
- Ensure the `get_netbox_docker_version_tag` function in `tests/integration/conftest.py` is updated with any new version mappings
22+
23+
Release Tasks
24+
-----------
25+
26+
1. Create a new release branch from `master`:
27+
28+
.. code-block:: bash
29+
30+
git checkout master
31+
git pull
32+
git checkout -b release/vX.Y.Z
33+
34+
2. Commit version and changelog updates:
35+
36+
.. code-block:: bash
37+
38+
git commit -m "Prepare release vX.Y.Z"
39+
40+
3. Create a pull request to merge the release branch into `master`
41+
4. Once merged, use github to create a new release:
42+
- Go to the GitHub repository
43+
- Click "Releases" in the right sidebar
44+
- Click "Create a new release"
45+
- Create a new tag (e.g., vX.Y.Z)
46+
- Use the changelog content as the release description
47+
- Publish the release
48+
49+
The GitHub release will automatically trigger the workflow to publish to PyPI.
50+
51+
Supported NetBox Versions
52+
----------------------
53+
54+
pynetbox aims to support the current and previous two minor versions of NetBox. The supported versions are defined in `tests/integration/conftest.py` and should be updated as part of the release process.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
IPAM
99
branching
1010
advanced
11+
development/index
1112

1213
TL;DR
1314
=====

pynetbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from pynetbox.core.api import Api as api
22
from pynetbox.core.query import AllocationError, ContentError, RequestError
33

4-
__version__ = "7.4.1"
4+
__version__ = "7.5.0"

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44
from packaging import version
55

6-
DEFAULT_NETBOX_VERSIONS = "4.2"
6+
DEFAULT_NETBOX_VERSIONS = "4.3"
77

88

99
def pytest_addoption(parser):

0 commit comments

Comments
 (0)