Skip to content

Commit b5645cd

Browse files
authored
save dates in simpler format, without time (#1170)
1 parent 003b074 commit b5645cd

135 files changed

Lines changed: 621 additions & 613 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ badges/
139139
docs/assets/
140140
all_qiskit_versions.json
141141
docs/p/
142-
docs/references/
143142

144143
# Request cache
145144
*_cache.sqlite

ecosystem/check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import tomllib
77

88

9-
from .serializable import JsonSerializable
9+
from .serializable import JsonSerializable, parse_date
1010
from .request import URL
1111

1212

@@ -55,7 +55,7 @@ def __init__(
5555
):
5656
self.id = id_
5757
self.xfailed = xfailed
58-
self.since = since
58+
self.since = parse_date(since)
5959
self.details = details
6060
self.discussion: str | URL | None = discussion
6161

ecosystem/github.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from functools import reduce
55
from jsonpath import findall
66

7-
from .serializable import JsonSerializable, parse_datetime
7+
from .serializable import JsonSerializable, parse_date
88
from .error_handling import EcosystemError, logger
99
from .request import (
1010
request_json,
@@ -50,7 +50,7 @@ class GitHubData(JsonSerializable):
5050
"archived": lambda x: x or None,
5151
"disabled": lambda x: x or None,
5252
"description": lambda x: x[:131] + "..." if len(str(x)) > 135 else x,
53-
"pushed_at": parse_datetime,
53+
"pushed_at": parse_date,
5454
}
5555
reduce = {}
5656

@@ -208,5 +208,5 @@ def total_dependent_packages(self):
208208
def last_activity(self):
209209
"""The creation of the last event"""
210210
if self._json_events and self._json_events["data"]:
211-
return parse_datetime(self._json_events["data"][0]["created_at"])
211+
return parse_date(self._json_events["data"][0]["created_at"])
212212
return self._kwargs.get("last_activity")

ecosystem/member.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from .error_handling import EcosystemError
88
from .julia import JuliaData
9-
from .serializable import JsonSerializable, parse_datetime
9+
from .serializable import JsonSerializable, parse_date
1010
from .github import GitHubData
1111
from .pypi import PyPIData
1212
from .check import CheckData
@@ -80,8 +80,8 @@ def __init__( # pylint: disable=too-many-arguments, too-many-locals
8080
self.maturity = maturity
8181
self.status = status
8282

83-
self.__dict__.setdefault("created_at", parse_datetime("now"))
84-
self.__dict__.setdefault("updated_at", parse_datetime("now"))
83+
self.__dict__.setdefault("created_at", parse_date("now"))
84+
self.__dict__.setdefault("updated_at", parse_date("now"))
8585
if self.uuid is None:
8686
self.uuid = str(uuid4())
8787
if self.labels is None:

ecosystem/pypi.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from jsonpath import findall
1414

1515

16-
from .serializable import JsonSerializable, parse_datetime
16+
from .serializable import JsonSerializable, parse_date
1717
from .error_handling import EcosystemError, logger
1818
from .request import request_json
1919

@@ -131,7 +131,7 @@ def last_release_date(self):
131131
return self._kwargs["last_release_date"]
132132
last_release = self.pypi_json.get("releases", {}).get(self.version, None)
133133
return (
134-
max(parse_datetime(r["upload_time"]) for r in last_release)
134+
max(parse_date(r["upload_time"]) for r in last_release)
135135
if last_release
136136
else None
137137
)
@@ -176,7 +176,7 @@ def all_qiskit_versions(self, force_update=False):
176176
)
177177
if not str_dates:
178178
raise EcosystemError(f"Qiskit {str_version} has no release?")
179-
last_date = max(parse_datetime(d) for d in str_dates)
179+
last_date = max(parse_date(d) for d in str_dates)
180180
self._all_qiskit_versions[str_version] = {"upload_at": last_date}
181181
with open(all_qiskit_versions_json, "w") as json_file:
182182
json.dump(self._all_qiskit_versions, json_file, indent=4, default=str)
@@ -191,7 +191,7 @@ def all_qiskit_versions(self, force_update=False):
191191
)
192192
return self.all_qiskit_versions(force_update=True)
193193
self._all_qiskit_versions = {
194-
k: {"upload_at": parse_datetime(v["upload_at"])}
194+
k: {"upload_at": parse_date(v["upload_at"])}
195195
for k, v in versions_dates_dict.items()
196196
}
197197
return self._all_qiskit_versions
@@ -240,7 +240,7 @@ def highest_supported_qiskit_release_date(self):
240240
"""Returns when was released the highest supported Qiskit version"""
241241
if self.requires_qiskit is None:
242242
return None
243-
return self.highest_supported_qiskit_version_and_release_date[1]
243+
return parse_date(self.highest_supported_qiskit_version_and_release_date[1])
244244

245245
@cached_property
246246
def highest_supported_qiskit_version_and_release_date(self):

ecosystem/serializable.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Utility classes for models."""
22

33
from abc import ABC
4-
from datetime import datetime
4+
from datetime import date
55

66
from ecosystem.request import URL
77

@@ -59,11 +59,13 @@ def to_dict(self) -> dict: # pylint: disable=too-many-branches
5959
return result
6060

6161

62-
def parse_datetime(date_str):
63-
"""Normalize the datetime format from ISO format.
64-
If date_str is "now", then makes a datetime with now."""
65-
if date_str == "now":
66-
_datetime = datetime.now()
67-
else:
68-
_datetime = datetime.fromisoformat(date_str)
69-
return _datetime.replace(microsecond=0)
62+
def parse_date(date_str):
63+
"""Normalize dates to datetime.date ISO format.
64+
If date_str is "now" or "today", then makes a date with today."""
65+
if date_str is None:
66+
return None
67+
if isinstance(date_str, date):
68+
return date_str
69+
if date_str in ["now", "today"]:
70+
return date.today()
71+
return date.fromisoformat(date_str[:10])

resources/members/aer_474599a7.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ status = "Qiskit Project"
1717
url = "https://github.com/Qiskit/qiskit-aer"
1818
owner = "Qiskit"
1919
repo = "qiskit-aer"
20-
stars = 662
20+
stars = 665
2121
homepage = "https://qiskit.github.io/qiskit-aer/"
2222
license = "Apache License 2.0"
2323
description = "Aer is a high performance simulator for quantum circuits that includes noise models"
2424
total_dependent_repositories = 0
2525
total_dependent_packages = 0
26-
last_commit = 2026-02-26T01:13:33Z
27-
last_activity = 2026-05-14T00:21:06Z
26+
last_commit = 2026-05-21
27+
last_activity = 2026-05-21
2828

2929
[badge]
3030
url = "https://qisk.it/e-474599a7"
@@ -39,38 +39,38 @@ importance = "IMPORTANT"
3939
[pypi.qiskit-aer]
4040
package_name = "qiskit-aer"
4141
version = "0.17.2"
42-
last_release_date = 2026-02-04T21:30:59
42+
last_release_date = 2026-02-04
4343
url = "https://pypi.org/project/qiskit-aer/"
4444
requires_qiskit = ">=1.1.0"
4545
compatible_with_qiskit_v1 = true
4646
compatible_with_qiskit_v2 = true
47-
highest_supported_qiskit_release_date = 2026-04-24T22:41:40Z
47+
highest_supported_qiskit_release_date = 2026-04-24
4848
highest_supported_qiskit_version = "2.4.1"
49-
last_month_downloads = 640112
50-
last_180_days_downloads = 3186670
49+
last_month_downloads = 609757
50+
last_180_days_downloads = 3120292
5151

5252
[pypi.qiskit-aer-gpu]
5353
package_name = "qiskit-aer-gpu"
5454
version = "0.15.1"
55-
last_release_date = 2024-09-13T07:46:14
55+
last_release_date = 2024-09-13
5656
url = "https://pypi.org/project/qiskit-aer-gpu/"
5757
requires_qiskit = ">=1.1.0"
5858
compatible_with_qiskit_v1 = true
5959
compatible_with_qiskit_v2 = true
60-
highest_supported_qiskit_release_date = 2026-04-24T22:41:40Z
60+
highest_supported_qiskit_release_date = 2026-04-24
6161
highest_supported_qiskit_version = "2.4.1"
62-
last_month_downloads = 3220
63-
last_180_days_downloads = 26588
62+
last_month_downloads = 3030
63+
last_180_days_downloads = 26231
6464

6565
[pypi.qiskit-aer-gpu-cu11]
6666
package_name = "qiskit-aer-gpu-cu11"
6767
version = "0.17.2"
68-
last_release_date = 2025-09-17T14:11:56
68+
last_release_date = 2025-09-17
6969
url = "https://pypi.org/project/qiskit-aer-gpu-cu11/"
7070
requires_qiskit = ">=1.1.0"
7171
compatible_with_qiskit_v1 = true
7272
compatible_with_qiskit_v2 = true
73-
highest_supported_qiskit_release_date = 2026-04-24T22:41:40Z
73+
highest_supported_qiskit_release_date = 2026-04-24
7474
highest_supported_qiskit_version = "2.4.1"
75-
last_month_downloads = 1972
76-
last_180_days_downloads = 13242
75+
last_month_downloads = 1865
76+
last_180_days_downloads = 13260

resources/members/algorithms_39fba621.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ maturity = "production-ready"
1414
url = "https://github.com/qiskit-community/qiskit-algorithms"
1515
owner = "qiskit-community"
1616
repo = "qiskit-algorithms"
17-
stars = 179
17+
stars = 182
1818
homepage = "https://qiskit-community.github.io/qiskit-algorithms/"
1919
license = "Apache License 2.0"
2020
description = "A library of quantum algorithms for Qiskit."
21-
total_dependent_repositories = 557
21+
total_dependent_repositories = 558
2222
total_dependent_packages = 56
23-
last_commit = 2026-05-14T08:59:26Z
24-
last_activity = 2026-05-14T08:59:27Z
23+
last_commit = 2026-05-21
24+
last_activity = 2026-05-21
2525

2626
[badge]
2727
url = "https://qisk.it/e-39fba621"
@@ -36,12 +36,12 @@ importance = "IMPORTANT"
3636
[pypi.qiskit-algorithms]
3737
package_name = "qiskit-algorithms"
3838
version = "0.4.0"
39-
last_release_date = 2025-08-29T18:32:24
39+
last_release_date = 2025-08-29
4040
url = "https://pypi.org/project/qiskit-algorithms/"
4141
requires_qiskit = ">=1.0"
4242
compatible_with_qiskit_v1 = true
4343
compatible_with_qiskit_v2 = true
44-
highest_supported_qiskit_release_date = 2026-04-24T22:41:40Z
44+
highest_supported_qiskit_release_date = 2026-04-24
4545
highest_supported_qiskit_version = "2.4.1"
46-
last_month_downloads = 103360
47-
last_180_days_downloads = 551912
46+
last_month_downloads = 97433
47+
last_180_days_downloads = 533317

resources/members/alicebobp_00f82ee3.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description = "Qiskit provider to execute quantum circuits on Alice & Bob cat qu
2121
estimated_contributors = 8
2222
total_dependent_repositories = 0
2323
total_dependent_packages = 0
24-
last_commit = 2025-09-30T11:50:37Z
24+
last_commit = 2025-09-30
2525
last_activity = 2026-04-13T13:20:33Z
2626

2727
[badge]
@@ -42,12 +42,12 @@ importance = "IMPORTANT"
4242
[pypi.qiskit-alice-bob-provider]
4343
package_name = "qiskit-alice-bob-provider"
4444
version = "1.2.0"
45-
last_release_date = 2025-03-27T11:48:43
45+
last_release_date = 2025-03-27
4646
url = "https://pypi.org/project/qiskit-alice-bob-provider/"
4747
requires_qiskit = "<2.0,>=1.3.1"
4848
compatible_with_qiskit_v1 = true
4949
compatible_with_qiskit_v2 = false
50-
highest_supported_qiskit_release_date = 2025-10-13T14:23:38Z
50+
highest_supported_qiskit_release_date = 2025-10-13
5151
highest_supported_qiskit_version = "1.4.5"
52-
last_month_downloads = 101
53-
last_180_days_downloads = 1317
52+
last_month_downloads = 159
53+
last_180_days_downloads = 1389

resources/members/antinature_83868867.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ description = "py module for studying antimatter using quantum computing approac
2323
estimated_contributors = 2
2424
total_dependent_repositories = 1
2525
total_dependent_packages = 0
26-
last_commit = 2025-08-11T18:52:41Z
26+
last_commit = 2025-08-11
2727
last_activity = 2026-04-04T16:54:33Z
2828

2929
[badge]
@@ -44,13 +44,13 @@ importance = "IMPORTANT"
4444
[pypi.antinature]
4545
package_name = "antinature"
4646
version = "0.1.2"
47-
last_release_date = 2025-08-11T11:36:44
47+
last_release_date = 2025-08-11
4848
url = "https://pypi.org/project/antinature/"
4949
development_status = "4 - Beta"
5050
requires_qiskit = "==1.4.2"
5151
compatible_with_qiskit_v1 = true
5252
compatible_with_qiskit_v2 = false
53-
highest_supported_qiskit_release_date = 2025-03-14T17:39:31Z
53+
highest_supported_qiskit_release_date = 2025-03-14
5454
highest_supported_qiskit_version = "1.4.2"
55-
last_month_downloads = 35
56-
last_180_days_downloads = 244
55+
last_month_downloads = 31
56+
last_180_days_downloads = 243

0 commit comments

Comments
 (0)