You are more than welcome to contribute to the NetboxTools module, whether it is Pull Requests, Feature Suggestions or Bug Reports!
- Fork this repo (see this forking guide for more information).
- Checkout the repo locally with
git clone git@github.com:{your_username}/NetboxTools.git. - If you haven't already, you will need the Microsoft.Powershell.PlatyPS PowerShell Module to generate command help and docs.
The repo is organized as below:
- Private (
Source/Private): All private functions used by the module. - Public (
Source/Public): All functions exported by the module. - Classes (
Source/Classes): All classes by the module. - Tests (
Tests): Pester tests executed at Pull Request. - Help (
Docs\Help): Markdown help files for external help.
- Import the module:
Import-Module .\Source\NetboxTools.psd1The NetboxTools module is developed using Test-driven development(TDD) where we aim for full test coverage for all our functions. Make sure that all new features and updates are covered by Pester tests. All tests will be executed when a Pull Request is submitted as a build validation step. PRs with failing tests will not be approved.
Pester is the ubiquitous test and mock framework for PowerShell.
Exclusion of standard tests can be done using the SkipTest attribute.
[SkipTest('TestName')]Introducing additional exclusions should be discussed in a GitHub issue before implementation.
Microsoft.Powershell.PlatyPS is used to write the external help in markdown. When contributing always make sure that the changes are added to the help file.
- Install the Microsoft.Powershell.PlatyPS module from the PowerShell Gallery:
Install-Module -Name Microsoft.Powershell.PlatyPS -Scope CurrentUser
Import-Module Microsoft.Powershell.PlatyPS- Create initial Markdown help file for
NetboxToolsmodule (This will only create help files for new commands, existing files will not be overwritten):
# you should have module imported in the session
Import-Module .\Source\NetboxTools.psd1
New-MarkdownCommandHelp -Command (Get-Command My-NewCommand) -OutputFolder .\Docs\HelpMove the newly creaated markdown from .\Docs\Help\NetboxTools to .\Docs\Help folder and populate {{ ... }} placeholders with missed help content.
- If you've made a lot of changes to the module code, you can easily update the markdown file(s) automatically with:
# re-import your module with latest changes
Import-Module .\Source\NetboxTools.psd1 -Force
Update-MarkdownHelp .\Docs\HelpIf you like to start contributing to the NetboxTools module. Please make sure that there is a related issue to link to your PR.
- Make sure that the issue is tagged in the PR, e.g. "fixes #45"
- Write a short but informative commit message, it will be added to the release notes.
- Please first search Open Issues before opening an issue to check whether your feature has already been suggested. If it has, feel free to add your own comments to the existing issue.
- Ensure you have included a "What?" - what your feature entails, being as specific as possible, and giving mocked-up syntax examples where possible.
- Ensure you have included a "Why?" - what the benefit of including this feature will be.
- Use the "Feature Request" issue template here to submit your request.
- Please first search Open Issues before opening an issue, to see if it has already been reported.
- Try to be as specific as possible, including the version of the NetboxTools PowerShell module, PowerShell version and OS used to reproduce the issue, and any example files or snippets of NetboxTools code needed to reproduce it.
- Use the "Bug Report" issue template here to submit your request.