From f324d3432301bf0c846153d6c14b835c36ceeb3c Mon Sep 17 00:00:00 2001 From: thatmattlove Date: Sat, 1 Jun 2024 23:23:08 -0400 Subject: [PATCH] housekeeping --- .github/ISSUE_TEMPLATE/1-feature-request.md | 30 ------ .github/ISSUE_TEMPLATE/1-feature-request.yaml | 49 ++++++++++ .github/ISSUE_TEMPLATE/2-bug-report.md | 64 ------------ .github/ISSUE_TEMPLATE/2-bug-report.yaml | 98 +++++++++++++++++++ .github/ISSUE_TEMPLATE/3-new-nos.yaml | 27 ----- .github/ISSUE_TEMPLATE/config.yml | 4 + .github/pull_request_template.md | 2 +- CONTRIBUTING.md | 29 ++---- LICENSE | 2 +- version.py | 9 ++ 10 files changed, 171 insertions(+), 143 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/1-feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/1-feature-request.yaml delete mode 100644 .github/ISSUE_TEMPLATE/2-bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/2-bug-report.yaml delete mode 100644 .github/ISSUE_TEMPLATE/3-new-nos.yaml diff --git a/.github/ISSUE_TEMPLATE/1-feature-request.md b/.github/ISSUE_TEMPLATE/1-feature-request.md deleted file mode 100644 index 083ad84..0000000 --- a/.github/ISSUE_TEMPLATE/1-feature-request.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea for hyperglass -labels: - - feature ---- - - - -# Feature Description - - - -### Is your feature request related to a problem? Please describe. - - - -# Environment & Use Case - - - -# Additional Context - - diff --git a/.github/ISSUE_TEMPLATE/1-feature-request.yaml b/.github/ISSUE_TEMPLATE/1-feature-request.yaml new file mode 100644 index 0000000..d73bc97 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-feature-request.yaml @@ -0,0 +1,49 @@ +name: Feature Request +description: Suggest an idea for hyperglass +labels: + - feature +assignees: + - thatmattlove +body: + - type: markdown + attributes: + value: > + If the answer to any of these questions is "no", your feature request will most likely be rejected (but may still be considered). + - Is the new feature _only_ applicable to one [platform](https://hyperglass.dev/platforms)? + - Would the new feature work only on mobile, or only on desktop? + - Would the new feature only support IPv4, or IPv6? + - Is the new feature something that can be reasonably customized by hyperglass users? + - type: input + id: version + attributes: + label: Version + description: What version of hyperglass are you currently running? + placeholder: v2.0.2 + validations: + required: true + - type: textarea + id: feature-details + attributes: + label: Feature Details + description: Describe the solution or change you would like in detail. + validations: + required: true + - type: dropdown + id: feature-type + validations: + required: true + attributes: + label: Feature Type + multiple: true + options: + - New Platform + - Web UI + - New Functionality + - Change to Existing Functionality + - type: textarea + id: use-case + validations: + required: true + attributes: + label: Use Case + description: How will this feature benefit hyperglass users (providers, end-users, or both)? diff --git a/.github/ISSUE_TEMPLATE/2-bug-report.md b/.github/ISSUE_TEMPLATE/2-bug-report.md deleted file mode 100644 index 167e9ae..0000000 --- a/.github/ISSUE_TEMPLATE/2-bug-report.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -name: Bug Report -about: Report a problem or unexpected behavior -labels: - - possible-bug -assignees: thatmattlove ---- - - - -# Bug Description - - - -# Expected behavior - - - -# Steps to Reproduce - - - -## Local Configurations - - - -``` - -``` - -## Logs - - - -``` - -``` - -# Possible Solution - - - -# Environment - -## Server - - - - - -## Client - -- OS & Version: -- Browser: - -### Smartphone Details (if applicable) - -- Device: -- OS: -- Browser: diff --git a/.github/ISSUE_TEMPLATE/2-bug-report.yaml b/.github/ISSUE_TEMPLATE/2-bug-report.yaml new file mode 100644 index 0000000..9ca5d2c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-bug-report.yaml @@ -0,0 +1,98 @@ +name: Bug Report +description: Report a problem or unexpected behavior +labels: + - possible-bug +assignees: + - thatmattlove +body: + - type: dropdown + id: deployment-type + validations: + required: true + attributes: + label: Deployment Type + description: How are you running hyperglass? + multiple: false + options: + - Docker + - Manual + - Other (please explain) + - type: input + id: version + attributes: + label: Version + description: What version of hyperglass are you currently running? + placeholder: v2.0.2 + validations: + required: true + - type: textarea + id: steps-to-reproduce + validations: + required: true + attributes: + label: Steps to Reproduce + description: > + Describe in detail the exact steps one can take to reproduce this bug. + If reporting a UI bug, be sure to include screenshots, browser version, and operating system and platform. + If you've deployed hyperglass manually, be sure to include Python and NodeJS versions. + placeholder: | + 1. Click the thing + 2. Type the stuff + 3. See the error + - type: textarea + id: expected-behavior + validations: + required: true + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: A thing should have happened. + - type: textarea + id: observed-behavior + validations: + required: true + attributes: + label: Observed Behavior + description: What actually happened? + placeholder: An error was shown. + - type: textarea + id: configuration + attributes: + label: Configuration + description: hyperglass [config](https://hyperglass.dev/configuration/config) file in YAML format. + placeholder: | + org_name: Beloved Hyperglass User + plugins: [] + primary_asn: 65000 + request_timeout: 90 + site_description: Beloved Hyperglass User Network Looking Glass + site_title: Beloved Hyperglass User + render: yaml + - type: textarea + id: devices + attributes: + label: Devices + description: > + hyperglass [devices](https://hyperglass.dev/configuration/devices) file in YAML format + **with passwords obfuscated or removed**. + placeholder: | + devices: + - name: New York, NY + address: 192.0.2.1 + platform: cisco_ios + credential: + username: *** + password: *** + - name: San Francisco, CA + address: 192.0.2.2 + platform: juniper + credential: + username: *** + password: *** + render: yaml + - type: textarea + id: logs + attributes: + label: Logs + description: Include any relevant log messages related to the bug. + render: console diff --git a/.github/ISSUE_TEMPLATE/3-new-nos.yaml b/.github/ISSUE_TEMPLATE/3-new-nos.yaml deleted file mode 100644 index 0d43a6b..0000000 --- a/.github/ISSUE_TEMPLATE/3-new-nos.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: New Platform -description: Request native support for a network operating system/platform -labels: - - feature -body: - - type: markdown - attributes: - value: > - In order to natively support a new platform for hyperglass, please make sure it is supported by Netmiko ([see here](https://hyperglass.dev/platforms)). - - type: input - attributes: - label: Manufacturer - description: What is the network vendor? For example, for Juniper Junos, this would be Juniper. - validations: - required: true - - type: input - attributes: - label: Name - description: What is the name of this platform? For example, for Juniper Junos, this would be Junos - validations: - required: true - - type: textarea - attributes: - label: Commands - description: > - Please provide the commands required to execute the default hyperglass commands (IPv4 BGP Route, IPv6 BGP Route, BGP AS Path, BGP Community, IPv4 ping, IPv6 ping, IPv4 traceroute, and IPv6 traceroute). If you do not know the commands, it is likely that this request will be either denied or may take a long time to implement. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3ba13e0..3b75330 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,5 @@ blank_issues_enabled: false +contact_links: + - name: Contributing Policy + url: https://github.com/thatmattlove/hyperglass/blob/main/CONTRIBUTING.md + about: Please read through the contributing policy before opening an issue or pull request. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6222c32..a9503d4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ - + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f060ade..1e7d8fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,29 +1,18 @@ -hyperglass is primarily maintained by me, [Matt Love](https://github.com/thatmattlove). This is my first ever open source application, and as such, it's kind of my "baby". When I first started writing hyperglass, I knew _nothing_ about development, Python, Javascript, or Github. I was a network engineer trying to solve a problem and learn a few things while I was at it. +hyperglass is primarily maintained by me, [Matt Love](https://github.com/thatmattlove). This was my first ever open source application, and as such, it's kind of my "baby". When I first started writing hyperglass, I knew _nothing_ about development, Python, JavaScript/TypeScript, or GitHub. I was a network engineer trying to solve a problem and learn a few things while I was at it. -Because I've been solo-maintaining and building hyperglass since around April 2019, I've become pretty particular about things that might seem trivial to someone just trying to help out. While I **absolutely welcome development contributions**, please don't be offended if pull requests are denied, or if I request things to be done a certain way. To help understand why, here are some of the development design goals for hyperglass: +Because I've been solo-maintaining and building hyperglass since around April 2019, I've become pretty particular about things that might seem trivial to someone just trying to help out. While I welcome development contributions, please don't be offended if pull requests are denied, if I request things to be done a certain way, or if I integrate something similar to your changes separately from your PR. To help understand why, here are some of the development design goals for hyperglass: - **Pristine code quality** - - [Black](https://github.com/python/black) formatting for Python - - Strict adherence to ESLint/Prettier configs for Javascript/React - - _ZERO_ linting errors + - [Black](https://github.com/python/black) formatting for Python. + - Strict adherence to ESLint/Prettier configs for frontend code. + - _ZERO_ linting errors. - Linting exceptions only used when there is _no other way_, and should be accompanied with comments about why there is no other way. - **No hard-coding** - Anything visible to the end-user _must_ be customizable by the administrator. If it's not, or can't be, leave code or PR comments as to why. - This includes things like timeouts, error messages, etc. - **Mobile & Accessible** - - All UI element must be available on both desktop and mobile devices - - UI must achieve a 100 Lighthouse/PageInsights score for accessibility + - All UI element must be available on both desktop and mobile devices. + - UI must achieve a 100 Lighthouse/PageInsights score for accessibility. - **IPv6 Support** - - Any new device support must include IPv6 commands - - All frontend and backend code must support IPv6, both for running the application and processing queries - -## Branches - -The following are the primary branches used for development and release management: - -| Branch Name | Function | -| :---------- | :--------------------- | -| `main` | Tagged Stable Releases | -| `develop` | Ongoing Development | - -Pull requests should be made against the `develop` branch. + - Any new device support must include IPv6 commands. + - All frontend and backend code must support IPv6, both for running the application and processing queries. diff --git a/LICENSE b/LICENSE index 0e59931..3f48246 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The Clear BSD License -Copyright (c) 2021 Matthew Love +Copyright (c) 2024 Matthew Love All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/version.py b/version.py index a73a683..29fea92 100755 --- a/version.py +++ b/version.py @@ -21,11 +21,20 @@ CONSTANT_PATTERN = re.compile(r"^__version__\s\=\s\"(.+)\"$") UPGRADE_DOC = Path(__file__).parent / "docs" / "pages" / "installation" / "upgrading.mdx" UPGRADE_DOC_PATTERN = re.compile(r"^git\scheckout\sv(.+)$") +UPGRADE_GH_FEATURE = Path(__file__).parent / ".github" / "ISSUE_TEMPLATE" / "1-feature-request.yaml" +UPGRADE_GH_FEATURE_PATTERN = re.compile(r"^[\s\t]+placeholder\:\sv(.+)$") + +UPGRADE_GH_BUG = Path(__file__).parent / ".github" / "ISSUE_TEMPLATE" / "2-bug-report.yaml" + +UPGRADE_GH_BUG_PATTERN = re.compile(r"^[\s\t]+placeholder\:\sv(.+)$") + UPGRADES = ( ("package.json", PACKAGE_JSON, PACKAGE_JSON_PATTERN), ("pyproject.toml", PYPROJECT_TOML, PYPROJECT_PATTERN), ("constants.py", CONSTANTS, CONSTANT_PATTERN), ("upgrading.mdx", UPGRADE_DOC, UPGRADE_DOC_PATTERN), + ("1-feature-request.yaml", UPGRADE_GH_FEATURE, UPGRADE_GH_FEATURE_PATTERN), + ("2-bug-report.yaml", UPGRADE_GH_BUG, UPGRADE_GH_BUG_PATTERN), ) cli = typer.Typer(name="version", no_args_is_help=True)