From 40ce3a8174ed1e507b6f22c2e5143226798e40b9 Mon Sep 17 00:00:00 2001 From: pacrob <5199899+pacrob@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:11:12 -0600 Subject: [PATCH] fix code blocks and version parsing --- Makefile | 2 +- docs/contributing.rst | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 98d53312..b8afdba4 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ package-test: clean notes: check-bump # Let UPCOMING_VERSION be the version that is used for the current bump - $(eval UPCOMING_VERSION=$(shell bump-my-version show --increment $(bump) new_version)) + $(eval UPCOMING_VERSION=$(shell bump-my-version bump --dry-run $(bump) -v | awk -F"'" '/New version will be / {print $$2}')) # Now generate the release notes to have them included in the release commit towncrier build --yes --version $(UPCOMING_VERSION) # Before we bump the version, make sure that the towncrier-generated docs will build diff --git a/docs/contributing.rst b/docs/contributing.rst index 68d258af..61584f54 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -12,12 +12,14 @@ To get started, fork the repository to your own github account, then clone it to development machine: .. code:: sh + git clone git@github.com:your-github-username/.git Next, install the development dependencies. We recommend using a virtual environment, such as `virtualenv `_. .. code:: sh + cd virtualenv -p python venv . venv/bin/activate @@ -32,6 +34,7 @@ A great way to explore the code base is to run the tests. We can run all tests with: .. code:: sh + pytest tests Code Style @@ -42,6 +45,7 @@ the library. This tool runs automatically with every commit, but you can also ru manually with: .. code:: sh + make lint If you need to make a commit that skips the ``pre-commit`` checks, you can do so with @@ -91,6 +95,7 @@ Final test before each release Before releasing a new version, build and test the package that will be released: .. code:: sh + git checkout main && git pull make package-test @@ -100,6 +105,7 @@ the instructions to activate the venv and test whatever you think is important. You can also preview the release notes: .. code:: sh + towncrier --draft Build the release notes @@ -110,6 +116,7 @@ the version to bump (see below), which changes how the version number will show release notes. .. code:: sh + make notes bump=$$VERSION_PART_TO_BUMP$$ If there are any errors, be sure to re-run make notes until it works. @@ -120,6 +127,7 @@ Push the release to github & pypi After confirming that the release package looks okay, release a new version: .. code:: sh + make release bump=$$VERSION_PART_TO_BUMP$$ This command will: