diff --git a/.cookiecutter.json b/.cookiecutter.json index 79f31c6a..3230c0b7 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -23,7 +23,15 @@ "pull_request_strategy": "update-or-create", "post_actions": [], "draft": false, +<<<<<<< HEAD +<<<<<<< HEAD "baked_commit_ref": "f89190c77817921c07423320bec1f944ed584503", +======= + "baked_commit_ref": "aa4dc9d386b4803f0fc02e7889aef37acf55849c", +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + "baked_commit_ref": "a5cb520a1b5dd235ec93fb92b8d91bd029d1d6bf", +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) "drift_managed_branch": "develop" } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d0952ad..087cc76a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,19 +11,37 @@ on: # yamllint disable-line rule:truthy rule:comments pull_request: ~ env: +<<<<<<< HEAD +<<<<<<< HEAD INVOKE_PARSER_IMAGE_NAME: "circuit_maintenance_parser" INVOKE_PARSER_IMAGE_VER: "latest" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_NAME: "circuit-maintenance-parser" + INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER: "latest" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_NAME: "circuit-maintenance-parser" + INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER: "latest" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) jobs: ruff-format: runs-on: "ubuntu-latest" env: +<<<<<<< HEAD +<<<<<<< HEAD INVOKE_PARSER_LOCAL: "True" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) steps: - name: "Check out repository code" uses: "actions/checkout@v4" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" - name: "Linting: ruff format" @@ -31,12 +49,20 @@ jobs: ruff-lint: runs-on: "ubuntu-latest" env: +<<<<<<< HEAD +<<<<<<< HEAD INVOKE_PARSER_LOCAL: "True" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) steps: - name: "Check out repository code" uses: "actions/checkout@v4" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" - name: "Linting: ruff" @@ -44,12 +70,20 @@ jobs: check-docs-build: runs-on: "ubuntu-latest" env: +<<<<<<< HEAD +<<<<<<< HEAD INVOKE_PARSER_LOCAL: "True" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) steps: - name: "Check out repository code" uses: "actions/checkout@v4" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" poetry-install-options: "--only dev,docs" @@ -58,12 +92,20 @@ jobs: poetry: runs-on: "ubuntu-latest" env: +<<<<<<< HEAD +<<<<<<< HEAD INVOKE_PARSER_LOCAL: "True" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) steps: - name: "Check out repository code" uses: "actions/checkout@v4" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" - name: "Checking: poetry lock file" @@ -71,12 +113,20 @@ jobs: yamllint: runs-on: "ubuntu-latest" env: +<<<<<<< HEAD +<<<<<<< HEAD INVOKE_PARSER_LOCAL: "True" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) steps: - name: "Check out repository code" uses: "actions/checkout@v4" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" - name: "Linting: yamllint" @@ -91,18 +141,36 @@ jobs: strategy: fail-fast: true matrix: +<<<<<<< HEAD python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] env: +<<<<<<< HEAD INVOKE_PARSER_PYTHON_VER: "${{ matrix.python-version }}" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + python-version: ["3.10"] + env: + INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) steps: - name: "Check out repository code" uses: "actions/checkout@v4" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" - name: "Get image version" +<<<<<<< HEAD +<<<<<<< HEAD run: "echo INVOKE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" +======= + run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) - name: "Set up Docker Buildx" id: "buildx" uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0 @@ -127,19 +195,38 @@ jobs: strategy: fail-fast: true matrix: +<<<<<<< HEAD python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: "ubuntu-latest" env: +<<<<<<< HEAD INVOKE_PARSER_PYTHON_VER: "${{ matrix.python-version }}" +======= + INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + python-version: ["3.10", "3.14"] + runs-on: "ubuntu-latest" + env: + INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) steps: - name: "Check out repository code" uses: "actions/checkout@v4" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" - name: "Get image version" +<<<<<<< HEAD +<<<<<<< HEAD run: "echo INVOKE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" +======= + run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) - name: "Set up Docker Buildx" id: "buildx" uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0 @@ -169,7 +256,7 @@ jobs: with: fetch-depth: "0" - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" - name: "Check for changelog entry" diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml index 727c32df..1a70ab5b 100644 --- a/.github/workflows/prepare_release.yml +++ b/.github/workflows/prepare_release.yml @@ -21,6 +21,10 @@ on: # yamllint disable-line rule:truthy rule:comments description: "Date of the release YYYY-MM-DD (defaults to today's date in the US Eastern TZ)." required: false default: "" + previous_version: + description: "The previous version tag to use for generating release notes (defaults to the latest tag or initial commit if no tags exist)." + required: false + default: "" jobs: prepare-release: @@ -38,7 +42,7 @@ jobs: fetch-depth: 0 # Fetch all history for git tags - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: poetry-version: "2.1.3" poetry-install-options: "--with dev" @@ -53,7 +57,11 @@ jobs: # 2. Try to get the previous version tag # If it fails (no tags), get the hash of the first commit - if PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null); then + if [ -n "${{ github.event.inputs.previous_version }}" ]; then + PREV_TAG="${{ github.event.inputs.previous_version }}" + echo "Using user-specified previous version: $PREV_TAG" + echo "PREVIOUS_TAG=$PREV_TAG" >> $GITHUB_ENV + elif PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null); then echo "PREVIOUS_TAG=$PREV_TAG" >> $GITHUB_ENV echo "Found previous tag: $PREV_TAG" else @@ -65,9 +73,25 @@ jobs: - name: "Determine New Version" id: "versioning" + env: + GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" run: | - # Perform the bump based on the user input - poetry version ${{ github.event.inputs.bump_rule }} + # Bump the poetry version based on the user input + CURRENT_POETRY_VER=$(poetry version --short) + set +e # continue running if the next command fails + GITHUB_RELEASE_EXISTS=$(gh release view v$CURRENT_POETRY_VER --json publishedAt --jq '.publishedAt') + set -e + # Unconditionally bump the version if the current version is alpha0 or beta0 + if [[ $CURRENT_POETRY_VER == *a0 || $CURRENT_POETRY_VER == *b0 || $CURRENT_POETRY_VER == *rc0 ]]; then + poetry version ${{ github.event.inputs.bump_rule }} + # If the bump rule is prerelease and a release doesn't already exist in github we don't bump the version + + # This is because we've already bumped to the prerelease version after the previous release + elif [[ "${{ github.event.inputs.bump_rule }}" == "prerelease" && "$CURRENT_POETRY_VER" =~ (a|b|rc)[0-9]+$ && -z "$GITHUB_RELEASE_EXISTS" ]]; then + echo "Prerelease v$CURRENT_POETRY_VER does not exist in github, using this version" + else + poetry version ${{ github.event.inputs.bump_rule }} + fi # Capture the New version string for use in other steps NEW_VER=$(poetry version --short) @@ -138,7 +162,7 @@ jobs: # 7. Save to a temporary file to avoid shell argument length limits echo "$FINAL_NOTES" > ../consolidated_notes.md - - name: "Generate Release Notes" + - name: "Generate App Release Notes and update mkdocs.yml" run: "poetry run inv generate-release-notes --version '${{ env.NEW_VERSION }}' --date '${{ env.RELEASE_DATE }}'" - name: "Commit Changes and Push" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c17d01cb..e0c7dc7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy rule:comments release: types: ["published"] +env: + POETRY_VERSION: "2.1.3" + PYTHON_VERSION: "3.12" + jobs: build: name: "Build package with poetry" @@ -14,9 +18,16 @@ jobs: - name: "Setup environment" uses: "networktocode/gh-action-setup-poetry-environment@v7" with: +<<<<<<< HEAD poetry-version: "2.1.3" python-version: "3.13" +======= + poetry-version: "${{ env.POETRY_VERSION }}" + python-version: "${{ env.PYTHON_VERSION }}" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) poetry-install-options: "--no-root" + - name: "Build Documentation" + run: "poetry run invoke build-and-check-docs" - name: "Run Poetry Build" run: "poetry build" @@ -56,19 +67,33 @@ jobs: if: "startsWith(github.ref, 'refs/tags/v')" needs: "build" environment: "pypi" - # Steps to publish to PyPI. +<<<<<<< HEAD + # IMPORTANT: this permission is mandatory for trusted publishing. + permissions: +======= + permissions: + # IMPORTANT: this permission is mandatory for Trusted Publishing +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) + id-token: "write" steps: - name: "Retrieve built package from cache" uses: "actions/download-artifact@v4" with: name: "distfiles" path: "dist/" + - name: "Publish package distributions to PyPI" uses: "pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e" # v1.13.0 +<<<<<<< HEAD +<<<<<<< HEAD ## Used for networktocode org since trusted publisher isn't supported for GitHub Plan. with: user: "__token__" password: "${{ secrets.PYPI_API_TOKEN }}" +======= +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) slack-notify: needs: @@ -109,35 +134,42 @@ jobs: permissions: contents: "write" pull-requests: "write" - name: "Create a PR from main into develop" + name: "${{ github.event.release.target_commitish == 'main' && 'Create a PR from main into develop' || format('Create a PR to merge into {0}', github.event.release.target_commitish) }}" needs: - "publish-github" - "publish-pypi" runs-on: "ubuntu-latest" steps: - - name: "Checkout main" + - name: "Checkout source branch" uses: "actions/checkout@v4" with: - ref: "main" + ref: "${{ github.event.release.target_commitish }}" fetch-depth: 0 - name: "Setup environment" - uses: "networktocode/gh-action-setup-poetry-environment@v6" + uses: "networktocode/gh-action-setup-poetry-environment@v7" with: - poetry-version: "2.1.3" + poetry-version: "${{ env.POETRY_VERSION }}" poetry-install-options: "--no-root" - - name: "Create release branch from main" + - name: "Create release branch and bump version" id: "branch" run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" + SOURCE_BRANCH="${{ github.event.release.target_commitish }}" + if [ "$SOURCE_BRANCH" = "main" ]; then + TARGET_BRANCH="develop" + else + TARGET_BRANCH="$SOURCE_BRANCH" + fi + TAG_NAME="${{ github.event.release.tag_name }}" VERSION="${TAG_NAME#v}" - BRANCH_NAME="release-${VERSION}-to-develop" + BRANCH_NAME="release-${VERSION}-to-${TARGET_BRANCH}" # Ensure release branch doesn't already exist if git rev-parse --verify origin/$BRANCH_NAME > /dev/null 2>&1; then @@ -147,18 +179,30 @@ jobs: git checkout -b "$BRANCH_NAME" - poetry version prepatch + poetry version prerelease git add pyproject.toml && git commit -m "Bump version" git push origin "$BRANCH_NAME" echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT + echo "target_branch=$TARGET_BRANCH" >> $GITHUB_OUTPUT + + - name: "Create Pull Request" + env: + GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + run: | + gh pr create \ + --title "Post release ${{ github.event.release.tag_name }} to ${{ steps.branch.outputs.target_branch }}" \ + --body "Please do a merge commit." \ + --base "${{ steps.branch.outputs.target_branch }}" \ + --head "${{ steps.branch.outputs.branch_name }}" - - name: "Create Pull Request to develop" + - name: "Create Pull Request" + if: "steps.branch.outputs.branch_name != ''" env: GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" run: | gh pr create \ - --title "Post release ${{ github.event.release.tag_name }} to develop" \ + --title "Sync release notes from ${{ github.event.release.target_commitish }} (${{ github.event.release.tag_name }}) to develop" \ --body "Please do a merge commit." \ --base "develop" \ --head "${{ steps.branch.outputs.branch_name }}" diff --git a/.gitignore b/.gitignore index bb324eae..f738eeaf 100644 --- a/.gitignore +++ b/.gitignore @@ -309,3 +309,4 @@ docs/CHANGELOG.md public /compose.yaml /dump.sql +/circuit-maintenance-parser/static/* diff --git a/README.md b/README.md index ee5dcae2..e940188b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # circuit-maintenance-parser

+<<<<<<< HEAD +<<<<<<< HEAD +======= +======= +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) + +
+>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) diff --git a/bin/ensure_release_notes.py b/development/bin/ensure_release_notes.py similarity index 92% rename from bin/ensure_release_notes.py rename to development/bin/ensure_release_notes.py index 74794337..f038cc4d 100644 --- a/bin/ensure_release_notes.py +++ b/development/bin/ensure_release_notes.py @@ -8,7 +8,7 @@ It shouldn't be necessary to run this file manually. It is automatically called by `invoke generate-release-notes`. Example: - $ python bin/ensure_release_notes.py --version '1.0' + $ python ensure_release_notes.py --version '1.0.0' """ import argparse @@ -23,7 +23,7 @@ def release_notes_pyproject_toml(version): """Update the pyproject.toml file to set the towncrier filename for the given version.""" - pyproject_file = Path(__file__).parent.parent / "pyproject.toml" + pyproject_file = Path(__file__).parent.parent.parent / "pyproject.toml" pyproject_content = pyproject_file.read_text() pyproject_data = tomllib.loads(pyproject_content) release_notes_file = f"docs/admin/release_notes/version_{version}.md" @@ -62,7 +62,9 @@ def release_notes_pyproject_toml(version): def ensure_release_notes_file(version): """Ensure that the release notes file for the given version exists and is referenced in mkdocs.yml.""" - release_notes_file = Path(__file__).parent.parent / "docs" / "admin" / "release_notes" / f"version_{version}.md" + release_notes_file = ( + Path(__file__).parent.parent.parent / "docs" / "admin" / "release_notes" / f"version_{version}.md" + ) if not release_notes_file.exists(): # Create a new release notes file with a basic template from towncrier_header.txt towncrier_header = Path(__file__).parent.parent / "towncrier_header.txt" @@ -72,7 +74,7 @@ def ensure_release_notes_file(version): def ensure_mkdocs_version(version): """Ensure that mkdocs.yml includes the new release notes file in the navigation.""" - mkdocs_yml_file = Path(__file__).parent.parent / "mkdocs.yml" + mkdocs_yml_file = Path(__file__).parent.parent.parent / "mkdocs.yml" mkdocs_yml_content = mkdocs_yml_file.read_text() release_notes_nav_entry = f' - v{version}: "admin/release_notes/version_{version}.md"\n' if release_notes_nav_entry in mkdocs_yml_content: diff --git a/towncrier_template.j2 b/development/towncrier_template.j2 similarity index 66% rename from towncrier_template.j2 rename to development/towncrier_template.j2 index a4b46c8f..929a814b 100644 --- a/towncrier_template.j2 +++ b/development/towncrier_template.j2 @@ -1,13 +1,4 @@ -# v{{ versiondata.version.split(".")[:2] | join(".") }} Release Notes - -This document describes all new features and changes in the release. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## Release Overview - -- Major features or milestones -- Changes to compatibility with Nautobot and/or other apps, libraries etc. - {% if render_title %} ## [v{{ versiondata.version }} ({{ versiondata.date }})](https://github.com/networktocode/circuit-maintenance-parser/releases/tag/v{{ versiondata.version}}) diff --git a/docs/admin/release_notes/version_1.0.md b/docs/admin/release_notes/version_1.0.md index d87d2b1b..34814891 100644 --- a/docs/admin/release_notes/version_1.0.md +++ b/docs/admin/release_notes/version_1.0.md @@ -4,7 +4,33 @@ This document describes all new features and changes in the `1.x` release series For a complete history of all releases, see the [full changelog](../../release_notes.md). +<<<<<<< HEAD ## v1.0.2 - 2021-05-05 +======= + Types of changes: + + - `Added` for new features. + - `Changed` for changes in existing functionality. + - `Deprecated` for soon-to-be removed features. + - `Removed` for now removed features. + - `Fixed` for any bug fixes. + - `Security` in case of vulnerabilities. + + +This document describes all new features and changes in the release `1.0`. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Release Overview + +- Major features or milestones +- Achieved in this `x.y` release +- Changes to compatibility with Nautobot and/or other apps, libraries etc. + +<<<<<<< HEAD +## [v1.0.0] - 2026-08-12 +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= +## [v1.0.0] - 2026-08-14 +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) ### Added diff --git a/docs/dev/release_checklist.md b/docs/dev/release_checklist.md index 9acd0c3c..04bb208c 100644 --- a/docs/dev/release_checklist.md +++ b/docs/dev/release_checklist.md @@ -12,8 +12,8 @@ This document is intended for library maintainers and outlines the steps to perf Choose your own adventure: -- Patch release from `develop`? Jump [here](#all-releases-from-develop). -- Minor release? Continue with [Minor Version Bumps](#minor-version-bumps) and then [All Releases from `develop`](#all-releases-from-develop). +- Patch release from `develop`? Jump [here](#all-release-branches-branch-off-of-develop). +- Minor release? Continue with [Minor Version Bumps](#minor-version-bumps) and then [All Releases from `develop`](#all-release-branches-branch-off-of-develop). ## Minor Version Bumps @@ -45,7 +45,7 @@ The goal of this step is to walk through the entire install process *as document --- -## All Releases from `develop` +## All `release` branches branch off of `develop` ### Verify CI Build Status diff --git a/example.invoke.yml b/invoke.example.yml similarity index 100% rename from example.invoke.yml rename to invoke.example.yml diff --git a/pyproject.toml b/pyproject.toml index 032824ae..c76686ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,16 @@ [tool.poetry] name = "circuit-maintenance-parser" +<<<<<<< HEAD +<<<<<<< HEAD version = "2.12.1b1" description = "Python library to parse Circuit Maintenance notifications and return a structured data back" +======= +version = "2.10.0" +======= +version = "0.1.0a0" +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +description = "Python library to parse circuit maintenances from network service providers." +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) authors = ["Network to Code, LLC "] license = "Apache-2.0" homepage = "https://circuit-maintenance-parser.readthedocs.io/" @@ -19,13 +28,23 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", ] + include = [ - "LICENSE", - "README.md", + # Poetry by default will exclude files that are in .gitignore + { path = "circuit-maintenance-parser/static/circuit-maintenance-parser/docs/**/*", format = ["sdist", "wheel"] } +] + +packages = [ + { include = "circuit_maintenance_parser" }, +] + +packages = [ + { include = "circuit_maintenance_parser" }, ] [tool.poetry.dependencies] python = ">=3.10,<3.15" +<<<<<<< HEAD click = ">=7.1, <9.0" pydantic = ">=1.10.4,<3" icalendar = "^5.0.0" @@ -57,6 +76,7 @@ openai = [ ] [tool.poetry.group.dev.dependencies] +<<<<<<< HEAD pytest = "^9.0.3" requests_mock = "^1.7.0" pyyaml = "^6.0" @@ -74,31 +94,49 @@ types-chardet = "^5.0.4" pandas-stubs = "^2.3.2" coverage = "^7.6.12" pygments = ">=2.20.0,<3" +======= +======= +click = "*" + +[tool.poetry.group.dev.dependencies] +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +coverage = "~7.15.4" +pytest = "*" +mock = "*" +pyyaml = "^6.0.1" +pylint = "~4.0.6" +yamllint = "~1.38.0" +invoke = "~3.0.3" +toml = "^0.10.2" +attrs = "^23.2.0" +towncrier = "~25.8.0" +ruff = "~0.16.2" +Markdown = "*" +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) [tool.poetry.group.docs.dependencies] # Rendering docs to HTML -mkdocs = "1.6.1" +mkdocs = "~1.6.1" # Embedding YAML files into Markdown documents as tables -markdown-data-tables = "1.0.0" +markdown-data-tables = "~1.0.0" # Render custom markdown for version added/changed/remove notes -markdown-version-annotations = "1.0.1" +markdown-version-annotations = "~1.0.1" # Automatically generate some files as part of mkdocs build -mkdocs-gen-files = "0.5.0" +mkdocs-gen-files = "~0.6.1" # Image lightboxing in mkdocs -mkdocs-glightbox = "0.4.0" +mkdocs-glightbox = "~0.5.2" # Use Jinja2 templating in docs - see settings.md -mkdocs-macros-plugin = "1.3.7" +mkdocs-macros-plugin = "~1.5.0" # Material for mkdocs theme -mkdocs-material = "9.6.15" +mkdocs-material = "~9.7.7" # Handle docs redirections -mkdocs-redirects = "1.2.2" +mkdocs-redirects = "~1.2.3" # Automatically handle index pages for docs sections -mkdocs-section-index = "0.3.10" +mkdocs-section-index = "~0.3.12" # Automatic documentation from sources, for MkDocs -mkdocstrings = "0.27.0" +mkdocstrings = "~1.0.6" # Python-specific extension to mkdocstrings -mkdocstrings-python = "1.13.0" -griffe = "1.1.1" +mkdocstrings-python = "~2.0.5" [tool.poetry.scripts] circuit-maintenance-parser = "circuit_maintenance_parser.cli:main" @@ -182,7 +220,7 @@ addopts = "-vv --doctest-modules -p no:warnings --ignore-glob='*mock*'" package = "circuit_maintenance_parser" directory = "changes" filename = "docs/admin/release_notes/version_X.Y.md" -template = "towncrier_template.j2" +template = "development/towncrier_template.j2" start_string = "" issue_format = "[#{issue}](https://github.com/networktocode/circuit-maintenance-parser/issues/{issue})" diff --git a/tasks.py b/tasks.py index 2ff3557d..278da91e 100644 --- a/tasks.py +++ b/tasks.py @@ -30,16 +30,29 @@ def is_truthy(arg): # Use pyinvoke configuration for default values, see http://docs.pyinvoke.org/en/stable/concepts/configuration.html -# Variables may be overwritten in invoke.yml or by the environment variables INVOKE_CIRCUIT-MAINTENANCE-PARSER_xxx +# Variables may be overwritten in invoke.yml or by the environment variables INVOKE_CIRCUIT_MAINTENANCE_PARSER_xxx namespace = Collection("circuit_maintenance_parser") namespace.configure( { "circuit_maintenance_parser": { "project_name": "circuit_maintenance_parser", +<<<<<<< HEAD "python_ver": "3.10", +<<<<<<< HEAD "local": is_truthy(os.getenv("INVOKE_PARSER_LOCAL", "false")), "image_name": "circuit_maintenance_parser", "image_ver": os.getenv("INVOKE_PARSER_IMAGE_VER", "latest"), +======= + "local": is_truthy(os.getenv("INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL", "false")), + "image_name": "circuit_maintenance_parser", + "image_ver": os.getenv("INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER", "latest"), +>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) +======= + "python_ver": "3.14", + "local": is_truthy(os.getenv("INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL", "false")), + "image_name": "circuit_maintenance_parser", + "image_ver": os.getenv("INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER", "latest"), +>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool) "pwd": Path(__file__).parent, } } @@ -338,18 +351,21 @@ def docs(context): help={ "version": "Version of circuit_maintenance_parser to generate the release notes for.", "date": "Date of the release (default: today).", + "keep": "Keep existing release notes files. Useful for testing. (default: False).", } ) -def generate_release_notes(context, version="", date=""): +def generate_release_notes(context, version="", date="", keep=False): """Generate Release Notes using Towncrier.""" + command = "poetry run towncrier build" if not version: version = context.run("poetry version --short", hide=True).stdout.strip() + command += f" --version {version}" + if date: + command += f" --date {date}" + command += " --keep" if keep else " --yes" version_major_minor = ".".join(version.split(".")[:2]) - context.run(f"poetry run python bin/ensure_release_notes.py --version {version_major_minor}") + context.run(f"poetry run python development/bin/ensure_release_notes.py --version {version_major_minor}") - command = f"poetry run towncrier build --version {version} --yes" - if date: - command += f" --date {date}" # Due to issues with git repo ownership in the containers, this must always run locally. context.run(command) diff --git a/towncrier_header.txt b/towncrier_header.txt deleted file mode 100644 index a350a182..00000000 --- a/towncrier_header.txt +++ /dev/null @@ -1,9 +0,0 @@ -# v{version} Release Notes - -This document describes all new features and changes in the release. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## Release Overview - -- Major features or milestones - -