Skip to content

Commit

Permalink
Update test data for PrettyTable 3.10.0's GitHub Flavored Markdown (#426
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hugovk authored Mar 1, 2024
2 parents dbabe4c + bcb5904 commit 8f969a5
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 42 deletions.
70 changes: 36 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $ pypistats recent pillow
┌───────────┬────────────┬────────────┐
│ last_day │ last_month │ last_week │
├───────────┼────────────┼────────────┤
1,740,67450,722,90611,471,253
3,419,59791,237,12521,259,217
└───────────┴────────────┴────────────┘
```

Expand Down Expand Up @@ -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
```

<!-- [[[end]]] -->
Expand All @@ -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

<!-- [[[end]]] -->

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected_tabulated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
10 changes: 5 additions & 5 deletions tests/test_pypistats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pypistats_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f969a5

Please sign in to comment.