Skip to content

Commit

Permalink
7.1.0 release (#2933)
Browse files Browse the repository at this point in the history
* 7.1.0 release

* add in the PR listing script

* remove accidental httpx dependency
  • Loading branch information
nicholascar authored Oct 17, 2024
1 parent 44e4e02 commit ac03f37
Show file tree
Hide file tree
Showing 12 changed files with 1,389 additions and 888 deletions.
581 changes: 520 additions & 61 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ authors:
- family-names: "Stuart"
given-names: "Veyndan"
title: "RDFLib"
version: 7.0.0
date-released: 2023-08-02
version: 7.1.0
date-released: 2024-10-17
url: "https://github.com/RDFLib/rdflib"
doi: 10.5281/zenodo.6845245
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2002-2023, RDFLib Team
Copyright (c) 2002-2024, RDFLib Team
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,18 @@ Help with maintenance of all of the RDFLib family of packages is always welcome

## Versions & Releases

* `7.1.0a0` current `main` branch.
* `7.x.y` current release, supports Python 3.8.1+ only.
* `main` branch in this repository is the unstable release
* `7.1.0` current stable release, bugfixes to 7.0.0
* `7.0.0` previous stable release, supports Python 3.8.1+ only.
* see [Releases](https://github.com/RDFLib/rdflib/releases)
* `6.x.y` supports Python 3.7+ only. Many improvements over 5.0.0
* see [Releases](https://github.com/RDFLib/rdflib/releases)
* `5.x.y` supports Python 2.7 and 3.4+ and is [mostly backwards compatible with 4.2.2](https://rdflib.readthedocs.io/en/stable/upgrade4to5.html).

See <https://rdflib.dev> for the release overview.
See <https://github.com/RDFLib/rdflib/releases/> for the release details.

## Documentation
See <https://rdflib.readthedocs.io> for our documentation built from the code. Note that there are `latest`, `stable` `5.0.0` and `4.2.2` documentation versions, matching releases.
See <https://rdflib.readthedocs.io> for our documentation built from the code. Note that there are `latest`, `stable` and versioned builds, such as `5.0.0`, matching releases.

## Installation
The stable release of RDFLib may be installed with Python's package management tool *pip*:
Expand All @@ -67,7 +68,7 @@ Some features of RDFLib require optional dependencies which may be installed usi
Alternatively manually download the package from the Python Package
Index (PyPI) at https://pypi.python.org/pypi/rdflib

The current version of RDFLib is 7.0.0, see the ``CHANGELOG.md`` file for what's new in this release.
The current version of RDFLib is 7.1.0, see the ``CHANGELOG.md`` file for what's new in this release.

### Installation of the current main branch (for developers)

Expand Down
36 changes: 2 additions & 34 deletions admin/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
# Admin Tools

Tools to assist with RDFlib releases, like extracting all merged PRs from GitHub since last release.
Tools to assist with RDFlib releases, like extracting all merged PRs from GitHub since last release and printing them into MArkdown lists.


## Release procedure

1. merge all PRs for the release
2. pass all tests
* `python run_tests.py`
3. black everything
* use the config, e.g. `black --config black.toml .` in main dir
4. build docs - check for errors/warnings there
* `python setup.py build_sphinx`
5. alter version & date in rdflib/__init__.py
6. update:
* CHANGELOG.md
* CONTRIBUTORS
* use scripts here to generate "PRs since last release"
* LICENSE (the date)
* setup.py (the long description)
7. update admin steps (here)
8. push to PyPI
* `pip3 install twine wheel`
* `python3 setup.py bdist_wheel sdist`
* `twine upload ./dist/*`
9. Make GitHub release
* `git tag <new-version>`
* `git push --tags`
* go to the tagged version, e.g. https://github.com/RDFLib/rdflib/releases/tag/6.0.0
* edit the release' notes there (likely copy from CHANGELOG)
11. Build readthedocs docco
* `latest` and `stable` need to be built at least
* best to make sure the previous (outgoing) release has a number-pegged version, e.g. 5.0.0
12. update the rdflib.dev website page
14. Update the GitHub master version
* e.g. for release 6.0.2, change version to 6.0.3a and push to GitHub
To make a release of RDFLib, see the [Developer's Guide](https://rdflib.readthedocs.io/en/latest/developers.html).
81 changes: 55 additions & 26 deletions admin/get_merged_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,61 @@

import json
from datetime import datetime
import urllib.request
import urllib.parse

import httpx
# https://api.github.com/search/issues?q=repo:rdflib/rdflib+is:pr+merged:%3E=2023-08-02&per_page=300&page=1
LAST_RELEASE_DATE = "2023-08-02"
ISSUES_URL = "https://api.github.com/search/issues"
ITEMS = []
PAGE = 1

r = httpx.get(
"https://api.github.com/repos/rdflib/rdflib/pulls",
params={
"state": "closed",
# make sequential requests for each page of PRs
while True:
params = {
"q": f"repo:rdflib/rdflib+is:pr+merged:>={LAST_RELEASE_DATE}",
"per_page": 100,
"page": 0, # must get all pages up to date of last release
},
)
prs = []
if r.status_code == 200:
for pr in r.json():
if pr["merged_at"] is not None:
d = datetime.strptime(pr["merged_at"], "%Y-%m-%dT%H:%M:%SZ")
if isinstance(d, datetime):
if d > datetime.strptime("2021-10-10", "%Y-%m-%d"):
prs.append(
{
"url": pr["url"],
"title": pr["title"],
"merged_at": pr["merged_at"],
}
)
with open("prs.json", "w") as f:
json.dump(sorted(prs, key=lambda d: d["merged_at"], reverse=True), f)
else:
print("ERROR")
"page": PAGE,
}
query_string = "&".join([f'{k}={v}' for k, v in params.items()])
url = ISSUES_URL + "?" + query_string

print(f"Getting {url}")
with urllib.request.urlopen(url) as response:
response_text = response.read()
link_headers = response.info()["link"].split(",")

json_data = json.loads(response_text)
ITEMS.extend(json_data["items"])

keep_going = False
for link in link_headers:
if 'rel="next"' in link:
# url = link.strip("<").split(">")[0]
PAGE += 1
keep_going = True

if not keep_going:
break

with open("merged_prs.json", "w") as f:
json.dump(ITEMS, f, indent=4)

# split interesting and boring PRs into two lists
good_prs = []
boring_prs = []
for pr in sorted(ITEMS, key=lambda k: k["closed_at"], reverse=True):
matches = ["bump", "pre-commit.ci"]
if any(x in pr['title'] for x in matches):
boring_prs.append(f"""* {pr['closed_at'][:10]} - {pr['title']}\n [PR #{pr['number']}]({pr['html_url']})""")
else:
good_prs.append(f"""* {pr['closed_at'][:10]} - {pr['title']}\n [PR #{pr['number']}]({pr['html_url']})""")

for pr in good_prs:
print(pr)

print()
print()

for pr in boring_prs:
print(pr)
12 changes: 0 additions & 12 deletions admin/print_prs.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

# General information about the project.
project = "rdflib"
copyright = "2009 - 2023, RDFLib Team"
copyright = "2009 - 2024, RDFLib Team"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
5 changes: 1 addition & 4 deletions docs/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,7 @@ Create a release-preparation pull request with the following changes:
* Updated version and date in ``CITATION.cff``.
* Updated copyright year in the ``LICENSE`` file.
* Updated copyright year in the ``docs/conf.py`` file.
* Updated main branch version and current version in the ``README.md`` file. The
main branch version should be the next major version with an ``a0`` suffix to
indicate it is alpha 0. When releasing 6.3.1, the main branch version in the
README should be 6.4.0a0.
* Updated main branch version and current version in the ``README.md`` file.
* Updated version in the ``pyproject.toml`` file.
* Updated ``__date__`` in the ``rdflib/__init__.py`` file.
* Accurate ``CHANGELOG.md`` entry for the release.
Expand Down
Loading

0 comments on commit ac03f37

Please sign in to comment.