diff --git a/README.md b/README.md index a2b48ee..1b95ef0 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ $ pypistats recent pillow ┌───────────┬────────────┬────────────┐ │ last_day │ last_month │ last_week │ ├───────────┼────────────┼────────────┤ -│ 1,740,674 │ 50,722,906 │ 11,471,253 │ +│ 3,419,597 │ 91,237,125 │ 21,259,217 │ └───────────┴────────────┴────────────┘ ``` @@ -157,24 +157,25 @@ $ pypistats python_minor pillow --last-month ┌──────────┬─────────┬────────────┐ │ category │ percent │ downloads │ ├──────────┼─────────┼────────────┤ -│ 3.7 │ 36.58% │ 18,620,128 │ -│ 3.8 │ 22.17% │ 11,285,248 │ -│ 3.9 │ 13.83% │ 7,041,419 │ -│ 3.6 │ 10.72% │ 5,454,315 │ -│ null │ 7.39% │ 3,761,767 │ -│ 3.10 │ 6.41% │ 3,263,885 │ -│ 3.11 │ 1.16% │ 589,792 │ -│ 2.7 │ 0.89% │ 451,041 │ -│ 3.5 │ 0.83% │ 422,741 │ -│ 3.12 │ 0.01% │ 3,089 │ -│ 3.4 │ 0.00% │ 2,483 │ -│ 3.3 │ 0.00% │ 251 │ -│ 3.2 │ 0.00% │ 95 │ -│ 2.6 │ 0.00% │ 1 │ -│ Total │ │ 50,896,255 │ +│ 3.8 │ 18.37% │ 16,161,117 │ +│ 3.10 │ 17.47% │ 15,373,666 │ +│ 3.7 │ 16.70% │ 14,691,371 │ +│ 3.11 │ 15.49% │ 13,630,259 │ +│ 3.9 │ 13.19% │ 11,605,389 │ +│ 3.6 │ 9.68% │ 8,519,789 │ +│ null │ 4.64% │ 4,085,994 │ +│ 3.12 │ 3.26% │ 2,871,386 │ +│ 2.7 │ 0.95% │ 837,638 │ +│ 3.5 │ 0.25% │ 216,308 │ +│ 3.13 │ 0.00% │ 2,830 │ +│ 3.4 │ 0.00% │ 1,237 │ +│ 3.3 │ 0.00% │ 109 │ +│ 3.1 │ 0.00% │ 3 │ +│ 3.2 │ 0.00% │ 2 │ +│ Total │ │ 87,997,098 │ └──────────┴─────────┴────────────┘ -Date range: 2022-11-01 - 2022-11-30 +Date range: 2024-02-01 - 2024-02-29 ``` @@ -185,23 +186,24 @@ You can format in Markdown, ready for pasting in GitHub issues and PRs: | category | percent | downloads | | :------- | ------: | ---------: | -| 3.7 | 36.58% | 18,620,128 | -| 3.8 | 22.17% | 11,285,248 | -| 3.9 | 13.83% | 7,041,419 | -| 3.6 | 10.72% | 5,454,315 | -| null | 7.39% | 3,761,767 | -| 3.10 | 6.41% | 3,263,885 | -| 3.11 | 1.16% | 589,792 | -| 2.7 | 0.89% | 451,041 | -| 3.5 | 0.83% | 422,741 | -| 3.12 | 0.01% | 3,089 | -| 3.4 | 0.00% | 2,483 | -| 3.3 | 0.00% | 251 | -| 3.2 | 0.00% | 95 | -| 2.6 | 0.00% | 1 | -| Total | | 50,896,255 | - -Date range: 2022-11-01 - 2022-11-30 +| 3.8 | 18.37% | 16,161,117 | +| 3.10 | 17.47% | 15,373,666 | +| 3.7 | 16.70% | 14,691,371 | +| 3.11 | 15.49% | 13,630,259 | +| 3.9 | 13.19% | 11,605,389 | +| 3.6 | 9.68% | 8,519,789 | +| null | 4.64% | 4,085,994 | +| 3.12 | 3.26% | 2,871,386 | +| 2.7 | 0.95% | 837,638 | +| 3.5 | 0.25% | 216,308 | +| 3.13 | 0.00% | 2,830 | +| 3.4 | 0.00% | 1,237 | +| 3.3 | 0.00% | 109 | +| 3.1 | 0.00% | 3 | +| 3.2 | 0.00% | 2 | +| Total | | 87,997,098 | + +Date range: 2024-02-01 - 2024-02-29 diff --git a/requirements.txt b/requirements.txt index 03f752a..ac6c898 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ httpx==0.26.0 numpy==1.26.3 pandas==2.2.0 platformdirs==4.2.0 -prettytable==3.9.0 +prettytable==3.10.0 pytablewriter[html]==1.2.0 pytest==8.0.0 pytest-cov==4.1.0 diff --git a/tests/data/expected_tabulated.py b/tests/data/expected_tabulated.py index 974efb3..a72c732 100644 --- a/tests/data/expected_tabulated.py +++ b/tests/data/expected_tabulated.py @@ -83,7 +83,7 @@ EXPECTED_TABULATED_MD = """ | category | date | downloads | -|:---------|:----------:|----------:| +| :--------| :--------: |---------: | | 2.6 | 2018-08-15 | 51 | | 2.7 | 2018-08-15 | 63,749 | | 3.2 | 2018-08-15 | 2 | diff --git a/tests/test_pypistats.py b/tests/test_pypistats.py index fc897e0..470ab32 100644 --- a/tests/test_pypistats.py +++ b/tests/test_pypistats.py @@ -456,7 +456,7 @@ def test_valid_json(self) -> None: "markdown", """ | last_day | last_month | last_week | -|----------:|-----------:|-----------:| +|---------: |----------: |----------: | | 2,295,765 | 67,759,913 | 15,706,750 | """, id="markdown", @@ -496,7 +496,7 @@ def test_overall_tabular_start_date(self, monkeypatch) -> None: mocked_response = SAMPLE_RESPONSE_OVERALL expected_output = """ | category | percent | downloads | -|:----------------|--------:|----------:| +| :---------------|-------: |---------: | | with_mirrors | 100.00% | 1,487,218 | | without_mirrors | 99.24% | 1,475,979 | | Total | | 1,487,218 | @@ -522,7 +522,7 @@ def test_overall_tabular_end_date(self, monkeypatch) -> None: mocked_response = SAMPLE_RESPONSE_OVERALL expected_output = """ | category | percent | downloads | -|:----------------|--------:|----------:| +| :---------------|-------: |---------: | | with_mirrors | 100.00% | 2,100,139 | | without_mirrors | 99.21% | 2,083,472 | | Total | | 2,100,139 | @@ -634,7 +634,7 @@ def test_system_tabular(self, monkeypatch) -> None: }""" expected_output = """ | category | percent | downloads | -|:---------|--------:|------------:| +| :--------|-------: |-----------: | | Linux | 83.14% | 236,502,274 | | null | 10.75% | 30,579,325 | | Darwin | 3.77% | 10,734,594 | @@ -694,7 +694,7 @@ def test_versions_are_strings(self) -> None: data = copy.deepcopy(SAMPLE_DATA_VERSION_STRINGS) expected_output = """ | category | date | downloads | -|:---------|:----------:|----------:| +| :--------| :--------: |---------: | | 3.1 | 2018-08-15 | 10 | | 3.10 | 2018-08-15 | 1 | """ diff --git a/tests/test_pypistats_cache.py b/tests/test_pypistats_cache.py index 343046b..e8b3e3c 100644 --- a/tests/test_pypistats_cache.py +++ b/tests/test_pypistats_cache.py @@ -100,7 +100,7 @@ def test_subcommand_with_cache(self) -> None: }""" expected_output = """ | category | downloads | -|:----------------|----------:| +| :---------------|---------: | | without_mirrors | 2,295,765 | Date range: 2018-11-01 - 2018-11-01