Skip to content

Prepare Release 0.1.2 (And Release Helper)#110

Merged
posborne merged 5 commits into
mainfrom
posborne/rel-0.1.2
Jun 3, 2026
Merged

Prepare Release 0.1.2 (And Release Helper)#110
posborne merged 5 commits into
mainfrom
posborne/rel-0.1.2

Conversation

@posborne
Copy link
Copy Markdown
Member

@posborne posborne commented Jun 2, 2026

Release bump; so I don't forget the steps I added a helper with a Make target for doing the bumps a little bit easier. Mostly just wanted to be a bit more competent in getting all the uv.lock updates for the examples as they exist currently.

The docs were also updated to reference this and added the pre-release -> release step to get things on to PyPI.

posborne added 3 commits June 2, 2026 17:31
This is not necessary but bumping the example uv.lock files
felt a bit annoying, so I decided to script it.  The pre-release ->
release instructions in our notes were also missing, so I added
that in.
If the examples dependencies haven't been already pulled in by
another command, lint can fail.  Run our ruff checks with those
extra bits in the environment explicitly.
Using the fancy helper.
@posborne posborne requested a review from erikrose June 2, 2026 22:37
Copy link
Copy Markdown
Member

@erikrose erikrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the lookbehind? Then we're ready to rock.

Comment thread CONTRIBUTING.md Outdated
5. (Pending) If the release is built successfully, it will make its way to PyPI
via trusted publishing.

5. If the release workflow succeeds, a new pre-release will be avilable on
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avilable

Comment thread CONTRIBUTING.md Outdated
via trusted publishing.

5. If the release workflow succeeds, a new pre-release will be avilable on
Github. Afer review and update of the generated changelog, use the
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub

Comment thread scripts/bump_version.py Outdated
cargo_path = root_dir / "crates" / "fastly-compute-py" / "Cargo.toml"

# pyrpoject.toml: Matches `version = "X.Y.Z"` under [project]
update_file_version(pyproject_path, r'(?<=^version = ")[^"]+', new_version)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine (though didn't measure) that the lookbehind is less efficient than doing this…

    # pyrpoject.toml: Matches `version = "X.Y.Z"` under [project]
    update_file_version(pyproject_path, r'^version = "[^"]+', 'version = "' + new_version)

    # Cargo.toml: Matches `version = "X.Y.Z"` under [package]
    update_file_version(cargo_path, r'^version = "[^"]+', 'version = "' + new_version)

…since it has to find every instance of a run of non-quote chars and then look behind it to see if it's preceded by "version = ". The forward-looking version shouldn't do any unnecessary work.

Okay, I couldn't help myself. I measured. Before:

100,000 iterations in 2.436s — 24.358 µs/iter

After:

100,000 iterations in 0.013s — 0.134 µs/iter

:-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove the lookbehind; N here (the size of the file) will never be large enough for it to matter at all and this is a utility running on a controlled input run in a context that is not performance sensitive in the least.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, it's just that it hurts my soul. :-)

@posborne posborne merged commit 891eb32 into main Jun 3, 2026
1 check passed
@posborne posborne deleted the posborne/rel-0.1.2 branch June 3, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants