Skip to content

Commit ac03f37

Browse files
authored
7.1.0 release (#2933)
* 7.1.0 release * add in the PR listing script * remove accidental httpx dependency
1 parent 44e4e02 commit ac03f37

12 files changed

+1389
-888
lines changed

CHANGELOG.md

+520-61
Large diffs are not rendered by default.

CITATION.cff

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ authors:
6969
- family-names: "Stuart"
7070
given-names: "Veyndan"
7171
title: "RDFLib"
72-
version: 7.0.0
73-
date-released: 2023-08-02
72+
version: 7.1.0
73+
date-released: 2024-10-17
7474
url: "https://github.com/RDFLib/rdflib"
7575
doi: 10.5281/zenodo.6845245

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2002-2023, RDFLib Team
3+
Copyright (c) 2002-2024, RDFLib Team
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,18 @@ Help with maintenance of all of the RDFLib family of packages is always welcome
4343

4444
## Versions & Releases
4545

46-
* `7.1.0a0` current `main` branch.
47-
* `7.x.y` current release, supports Python 3.8.1+ only.
46+
* `main` branch in this repository is the unstable release
47+
* `7.1.0` current stable release, bugfixes to 7.0.0
48+
* `7.0.0` previous stable release, supports Python 3.8.1+ only.
4849
* see [Releases](https://github.com/RDFLib/rdflib/releases)
4950
* `6.x.y` supports Python 3.7+ only. Many improvements over 5.0.0
5051
* see [Releases](https://github.com/RDFLib/rdflib/releases)
5152
* `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).
5253

53-
See <https://rdflib.dev> for the release overview.
54+
See <https://github.com/RDFLib/rdflib/releases/> for the release details.
5455

5556
## Documentation
56-
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.
57+
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.
5758

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

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

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

admin/README.md

+2-34
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,5 @@
11
# Admin Tools
22

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

5-
6-
## Release procedure
7-
8-
1. merge all PRs for the release
9-
2. pass all tests
10-
* `python run_tests.py`
11-
3. black everything
12-
* use the config, e.g. `black --config black.toml .` in main dir
13-
4. build docs - check for errors/warnings there
14-
* `python setup.py build_sphinx`
15-
5. alter version & date in rdflib/__init__.py
16-
6. update:
17-
* CHANGELOG.md
18-
* CONTRIBUTORS
19-
* use scripts here to generate "PRs since last release"
20-
* LICENSE (the date)
21-
* setup.py (the long description)
22-
7. update admin steps (here)
23-
8. push to PyPI
24-
* `pip3 install twine wheel`
25-
* `python3 setup.py bdist_wheel sdist`
26-
* `twine upload ./dist/*`
27-
9. Make GitHub release
28-
* `git tag <new-version>`
29-
* `git push --tags`
30-
* go to the tagged version, e.g. https://github.com/RDFLib/rdflib/releases/tag/6.0.0
31-
* edit the release' notes there (likely copy from CHANGELOG)
32-
11. Build readthedocs docco
33-
* `latest` and `stable` need to be built at least
34-
* best to make sure the previous (outgoing) release has a number-pegged version, e.g. 5.0.0
35-
12. update the rdflib.dev website page
36-
14. Update the GitHub master version
37-
* e.g. for release 6.0.2, change version to 6.0.3a and push to GitHub
5+
To make a release of RDFLib, see the [Developer's Guide](https://rdflib.readthedocs.io/en/latest/developers.html).

admin/get_merged_prs.py

+55-26
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,61 @@
22

33
import json
44
from datetime import datetime
5+
import urllib.request
6+
import urllib.parse
57

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

8-
r = httpx.get(
9-
"https://api.github.com/repos/rdflib/rdflib/pulls",
10-
params={
11-
"state": "closed",
14+
# make sequential requests for each page of PRs
15+
while True:
16+
params = {
17+
"q": f"repo:rdflib/rdflib+is:pr+merged:>={LAST_RELEASE_DATE}",
1218
"per_page": 100,
13-
"page": 0, # must get all pages up to date of last release
14-
},
15-
)
16-
prs = []
17-
if r.status_code == 200:
18-
for pr in r.json():
19-
if pr["merged_at"] is not None:
20-
d = datetime.strptime(pr["merged_at"], "%Y-%m-%dT%H:%M:%SZ")
21-
if isinstance(d, datetime):
22-
if d > datetime.strptime("2021-10-10", "%Y-%m-%d"):
23-
prs.append(
24-
{
25-
"url": pr["url"],
26-
"title": pr["title"],
27-
"merged_at": pr["merged_at"],
28-
}
29-
)
30-
with open("prs.json", "w") as f:
31-
json.dump(sorted(prs, key=lambda d: d["merged_at"], reverse=True), f)
32-
else:
33-
print("ERROR")
19+
"page": PAGE,
20+
}
21+
query_string = "&".join([f'{k}={v}' for k, v in params.items()])
22+
url = ISSUES_URL + "?" + query_string
23+
24+
print(f"Getting {url}")
25+
with urllib.request.urlopen(url) as response:
26+
response_text = response.read()
27+
link_headers = response.info()["link"].split(",")
28+
29+
json_data = json.loads(response_text)
30+
ITEMS.extend(json_data["items"])
31+
32+
keep_going = False
33+
for link in link_headers:
34+
if 'rel="next"' in link:
35+
# url = link.strip("<").split(">")[0]
36+
PAGE += 1
37+
keep_going = True
38+
39+
if not keep_going:
40+
break
41+
42+
with open("merged_prs.json", "w") as f:
43+
json.dump(ITEMS, f, indent=4)
44+
45+
# split interesting and boring PRs into two lists
46+
good_prs = []
47+
boring_prs = []
48+
for pr in sorted(ITEMS, key=lambda k: k["closed_at"], reverse=True):
49+
matches = ["bump", "pre-commit.ci"]
50+
if any(x in pr['title'] for x in matches):
51+
boring_prs.append(f"""* {pr['closed_at'][:10]} - {pr['title']}\n [PR #{pr['number']}]({pr['html_url']})""")
52+
else:
53+
good_prs.append(f"""* {pr['closed_at'][:10]} - {pr['title']}\n [PR #{pr['number']}]({pr['html_url']})""")
54+
55+
for pr in good_prs:
56+
print(pr)
57+
58+
print()
59+
print()
60+
61+
for pr in boring_prs:
62+
print(pr)

admin/print_prs.py

-12
This file was deleted.

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181

8282
# General information about the project.
8383
project = "rdflib"
84-
copyright = "2009 - 2023, RDFLib Team"
84+
copyright = "2009 - 2024, RDFLib Team"
8585

8686
# The version info for the project you're documenting, acts as replacement for
8787
# |version| and |release|, also used in various other places throughout the

docs/developers.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,7 @@ Create a release-preparation pull request with the following changes:
451451
* Updated version and date in ``CITATION.cff``.
452452
* Updated copyright year in the ``LICENSE`` file.
453453
* Updated copyright year in the ``docs/conf.py`` file.
454-
* Updated main branch version and current version in the ``README.md`` file. The
455-
main branch version should be the next major version with an ``a0`` suffix to
456-
indicate it is alpha 0. When releasing 6.3.1, the main branch version in the
457-
README should be 6.4.0a0.
454+
* Updated main branch version and current version in the ``README.md`` file.
458455
* Updated version in the ``pyproject.toml`` file.
459456
* Updated ``__date__`` in the ``rdflib/__init__.py`` file.
460457
* Accurate ``CHANGELOG.md`` entry for the release.

0 commit comments

Comments
 (0)