Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo Cleanup & Updates #58

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: 🐛 Bug Report
description: Report a reproducible bug in the current release of the NetBox Ansible Collection
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: >
**NOTE:** This form is only for reporting _reproducible bugs_ in a current NetBox Script or Report.

- Look through the issues already resolved:
https://github.com/netbox-community/reports/issues?q=is%3Aclosed
- Join the `#netbox` channel on our Slack:
https://netdev.chat

- type: input
attributes:
label: Script name
description: What script or report are you having issues with?
validations:
required: true
- type: input
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.1.6
validations:
required: true
- type: dropdown
attributes:
label: Python version
description: What version of Python are you currently running?
options:
- "3.8"
- "3.9"
- "3.10"
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: >
Describe in detail the exact steps that someone else can take to
reproduce this bug using the current stable release of the Ansible NetBox collection.
placeholder: |
1. In this environment...
2. With this input...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: What did you expect to happen?
placeholder: A new widget should have been created with the specified attributes
validations:
required: true
- type: textarea
attributes:
label: Observed Behavior
description: What happened instead?
placeholder: A TypeError exception was raised
validations:
required: true
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Reference: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
blank_issues_enabled: false
contact_links:
- name: 📕 Project README
url: https://github.com/netbox-community/reports/blob/master/README.md
about: "Please refer to the documentation before raising a bug or feature request."
- name: 📖 Contributing Policy
url: https://github.com/netbox-community/reports/blob/master/CONTRIBUTING.md
about: "Please read through our contributing policy before opening an issue or pull request"
- name: 💬 Community Slack
url: https://netdev.chat
about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems"
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: 🏡 Housekeeping
description: A change pertaining to the codebase itself (developers only)
title: "[Housekeeping]: "
labels: ["housekeeping"]
body:
- type: markdown
attributes:
value: >
**NOTE:** This template is for use by maintainers only. Please do not submit
an issue using this template unless you have been specifically asked to do so.
- type: textarea
attributes:
label: Proposed Changes
description: >
Describe in detail the new feature or behavior you'd like to propose.
Include any specific changes to work flows, data models, or the user interface.
validations:
required: true
- type: textarea
attributes:
label: Justification
description: Please provide justification for the proposed change(s).
validations:
required: true
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/new_script.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: ✨ New Script Request
description: Propose a new NetBox Script or Report
title: "[Script Request]: "
labels: ["script_request"]
body:
- type: markdown
attributes:
value: >
**NOTE:** This form is only for submitting well-formed proposals to create a NetBox custom script or report.
If you're trying to solve a problem but can't figure out how, or if
you still need time to work on the details of a proposed new script, please start a
[discussion](https://github.com/netbox-community/reports/discussions) instead.
- type: dropdown
attributes:
label: Request type
options:
- New NetBox Custom Script
- New NetBox Report
validations:
required: true
- type: input
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.1.6
validations:
required: true
- type: textarea
attributes:
label: Proposed functionality
description: >
Describe in detail the new feature or behavior you are proposing. Include any specific introductions
to work flows, logic, and/or external data sources. The more detail you provide here, the
greater chance your proposal has of being discussed and taken up by a contributor.
validations:
required: true
- type: textarea
attributes:
label: Use case
description: >
Explain how creating this script/report would benefit NetBox users. What need does it address?
validations:
required: true
- type: textarea
attributes:
label: External dependencies
description: >
List any new dependencies on external libraries or services that this new feature would
introduce. For example, does the proposal require the installation of a new Python package,
access to another non-NetBox service? (Not all new features introduce new dependencies.)
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/script_feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: ✨ Existing Script Enhancement
description: Propose a new NetBox Script or Report
title: "[Script Enhancement]: "
labels: ["script_enhancement"]
body:
- type: markdown
attributes:
value: >
**NOTE:** This form is only for submitting well-formed proposals to create a NetBox custom script or report.
If you're trying to solve a problem but can't figure out how, or if
you still need time to work on the details of a proposed new script, please start a
[discussion](https://github.com/netbox-community/reports/discussions) instead.
- type: dropdown
attributes:
label: Request type
options:
- Existing NetBox Custom Script
- Existing NetBox Report
validations:
required: true
- type: input
attributes:
label: Script/Report Name
description: project relative file path
placeholder: scripts/script.py
validations:
required: true
- type: input
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.1.6
validations:
required: true
- type: textarea
attributes:
label: Proposed functionality
description: >
Describe in detail the new feature or behavior you are proposing. Include any specific changes
to work flows, logic, and/or external data sources. The more detail you provide here, the
greater chance your proposal has of being discussed and taken up by a contributor.
validations:
required: true
- type: textarea
attributes:
label: Use case
description: >
Explain how creating this script/report would benefit NetBox users. What need does it address?
validations:
required: true
- type: textarea
attributes:
label: External dependencies
description: >
List any new dependencies on external libraries or services that this new feature would
introduce. For example, does the proposal require the installation of a new Python package,
access to another non-NetBox service? (Not all new features introduce new dependencies.)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ venv.bak/

# mypy
.mypy_cache/

# MISC
.DS_Store
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
name: Check YAML files
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.1.0
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2']
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
name: Lint YAML files
args: [--format, parsable, --strict, -c=tests/yamllint.yaml]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.30.0
hooks:
- id: markdownlint
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.7.1
hooks:
- id: reorder-python-imports
- repo: https://github.com/ambv/black
rev: 22.1.0
hooks:
- id: black
language_version: python3.9
132 changes: 132 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Contributing

## Getting Help

If you encounter any issues installing or using any of these scripts or reports, try one of the
following resources to get assistance. Please **do not** open a GitHub issue
except to report bugs or submit script/report ideas for the community to take up.

### GitHub Discussions

GitHub's discussions are the best place to get help with an existing script, propose rough ideas for
new functionality that you are trying to draft, or help creating your own script. Their integration
with GitHub allows for easily cross-referencing and converting posts to issues as needed. There are several
categories for discussions:

* **General** - General community discussion
* **Ideas** - Ideas for new functionality that isn't yet ready for a formal
feature request
* **Q&A** - Request help with installing or using NetBox

### Slack

For real-time chat, you can join the **#netbox** Slack channel on [NetDev Community](https://netdev.chat/).
Unfortunately, the Slack channel does not provide long-term retention of chat
history, so try to avoid it for any discussions would benefit from being
preserved for future reference.

## Reporting Bugs

* First, check that you are running the version the report or script states it supports in the source file.

* Next, check the GitHub [issues list](https://github.com/netbox-community/reports/issues)
to see if the bug you've found has already been reported. If you think you may
be experiencing a reported issue that hasn't already been resolved, please
click "add a reaction" in the top right corner of the issue and add a thumbs
up (+1). You might also want to add a comment describing how it's affecting your
installation. This will allow us to prioritize bugs based on how many users are
affected.

* When submitting an issue, please be as descriptive as possible. Be sure to
provide all information request in the issue template, including:

* The environment (NetBox version, deployment method, & Python Version) in which NetBox is running
* The exact steps that can be taken to reproduce the issue
* Expected and observed behavior
* Any error messages generated
* Screenshots (if applicable)

* Keep in mind that this is a community crowdsourced report, and maintainers are not
commiting to update or fix scripts submitted to the repo. We will try out best to help
and update submitted scripts.

## Feature Requests

* First, check the GitHub [issues list](https://github.com/netbox-community/reports/issues)
to see if the feature you're requesting is already listed. (Be sure to search
closed issues as well, since some feature requests have been rejected.) If the
feature you'd like to see has already been requested and is open, click "add a
reaction" in the top right corner of the issue and add a thumbs up (+1). This
ensures that the issue has a better chance of receiving attention. Also feel
free to add a comment with any additional justification for the feature.
(However, note that comments with no substance other than a "+1" will be
deleted. Please use GitHub's reactions feature to indicate your support.)

* Before filing a new feature request, consider raising your idea in a
[GitHub discussion](https://github.com/netbox-community/netbox/discussions)
first. Feedback you receive there will help validate and shape the proposed
feature before filing a formal issue.

* Good feature requests are very narrowly defined. Be sure to thoroughly
describe the functionality and data model(s) being proposed. The more effort
you put into writing a feature request, the better its chance is of being
implemented. Overly broad feature requests will be closed.

* When submitting a feature request on GitHub, be sure to include all
information requested by the issue template, including:

* A detailed description of the proposed functionality
* A use case for the feature; who would use it and what value it would add
to NetBox
* A rough description of changes necessary to the database schema (if
applicable)
* Any third-party libraries or other resources which would be involved

* For more information on how feature requests are handled, please see our
[issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).

## Submitting Pull Requests

* If you're interested in contributing to this repo, be sure to check out our
[getting started](https://netbox.readthedocs.io/en/stable/development/getting-started/)
documentation for tips on setting up your development environment.

* Be sure to open an issue **before** starting work on a pull request, and
discuss your idea with the community before beginning work. This will
help prevent wasting time on something that might you might not be able to
implement. When suggesting a new feature, also make sure it won't conflict with
any work that's already in progress.

* Once you've opened or identified an issue you'd like to work on, ask that it
be assigned to you so that others are aware it's being worked on.

* Any pull request which does _not_ relate to an opened issue will be closed.

* Any pull request that duplicates functionality from an existing script or report
will be asked to redirect their functionality updates to the existing script/report.

* All new functionality must include relevant tests where applicable.

* All code submissions should meet the following criteria (CI will enforce
these checks):

* Python syntax is valid
* Black compliance is enforced
* PEP 8 compliance is enforced, with the exception that lines may be
greater than 80 characters in length

## Commenting

Only comment on an issue if you are sharing a relevant idea or constructive
feedback. **Do not** comment on an issue just to show your support (give the
top post a :+1: instead) or ask for an ETA. These comments will be deleted to
reduce noise in the discussion.

## Maintainer Guidance

* Maintainers are expected to help review Pull Request submissions, assist in
troubleshooting PR test failures, and handle general project housekeeping.
This can be employer-sponsored or individual time, with the understanding that
all contributions are submitted under the Apache 2.0 license and that your
employer may not make claim to any contributions. Contributions include code
work, issue management, and community support.
Loading