Skip to content

Commit ac998de

Browse files
Worldometer v2.0.0 (#30)
## Added - **New module structure (#22)** - new scraper module; - new world module for public api; - get home page counters, like in the old api, but now having a special data class; - get population and geography data; - set new dependencies; - new mapped pages; - add some tests. - **Add docstrings to the new api (#23)** - **Define explicit fields in all counter dataclasses (#26)** ## Changed - **Reformulation of all docs (#24)** - new fully documented API; - new package logo and icon. - **Use the new API in the old core module. This is a temporary measure until the module is completely removed. (#25)** - warn about the deprecation of the old API and indicate the use of the new one. - **Update all project metadata (#27)** - **Change package manager and add action to run tests (#29)** - **Support only Python `>=3.9, <3.12` (#29)** ## Removed - **Removed support for Python 3.7 and 3.8 (#29)** ## Deprecated - **`worldometer.core` and `worldometer.api` deprecated (#25)** ## Fixed - **Fix old API (#25)** - fix: import "requests_html" could not be resolved (#12) - fix: problem with Importing and Crashing (#13) - fix: issue with "sanitize_metrics" method (#18) - fix: navigation Timeout Exceeded Error (#20) - fix: import error (#21)
2 parents 7b430a5 + a07a60d commit ac998de

Some content is hidden

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

52 files changed

+5110
-1233
lines changed
57.7 KB
Loading

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [master, dev]
6+
pull_request:
7+
branches: [master, dev]
8+
9+
jobs:
10+
unittests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9', '3.10', '3.11']
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install poetry
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install poetry
29+
30+
- name: Install dependencies
31+
run: |
32+
poetry install
33+
34+
- name: Run unittests
35+
run: |
36+
poetry run pytest --verbose

.gitignore

Lines changed: 187 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,195 @@
1-
# Ignore local directory
2-
.vscode/
1+
# Created by https://www.toptal.com/developers/gitignore/api/python,visualstudiocode
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,visualstudiocode
33

4-
# Ignore local secret file
5-
.env
6-
.pypirc
7-
8-
# Ignore cache
4+
### Python ###
5+
# Byte-compiled / optimized / DLL files
96
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
1012

11-
# Ignore build and distribution directories/files
13+
# Distribution / packaging
14+
.Python
1215
build/
16+
develop-eggs/
1317
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
share/python-wheels/
1428
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
cover/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
# For a library or package, you might want to ignore these files since the code is
91+
# intended to run in multiple environments; otherwise, check them in:
92+
.python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# poetry
102+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103+
# This is especially recommended for binary packages to ensure reproducibility, and is more
104+
# commonly ignored for libraries.
105+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106+
#poetry.lock
107+
108+
# pdm
109+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110+
#pdm.lock
111+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112+
# in version control.
113+
# https://pdm.fming.dev/#use-with-ide
114+
.pdm.toml
115+
116+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117+
__pypackages__/
118+
119+
# Celery stuff
120+
celerybeat-schedule
121+
celerybeat.pid
122+
123+
# SageMath parsed files
124+
*.sage.py
125+
126+
# Environments
127+
.env
128+
.venv
129+
env/
130+
venv/
131+
ENV/
132+
env.bak/
133+
venv.bak/
134+
135+
# Spyder project settings
136+
.spyderproject
137+
.spyproject
138+
139+
# Rope project settings
140+
.ropeproject
141+
142+
# mkdocs documentation
143+
/site
144+
145+
# mypy
146+
.mypy_cache/
147+
.dmypy.json
148+
dmypy.json
149+
150+
# Pyre type checker
151+
.pyre/
152+
153+
# pytype static type analyzer
154+
.pytype/
155+
156+
# Cython debug symbols
157+
cython_debug/
158+
159+
# PyCharm
160+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162+
# and can be added to the global gitignore or merged into this file. For a more nuclear
163+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
164+
#.idea/
165+
166+
### Python Patch ###
167+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
168+
poetry.toml
169+
170+
# ruff
171+
.ruff_cache/
172+
173+
# LSP config files
174+
pyrightconfig.json
175+
176+
### VisualStudioCode ###
177+
.vscode/*
178+
!.vscode/settings.json
179+
!.vscode/tasks.json
180+
!.vscode/launch.json
181+
!.vscode/extensions.json
182+
!.vscode/*.code-snippets
183+
184+
# Local History for Visual Studio Code
185+
.history/
186+
187+
# Built Visual Studio Code Extensions
188+
*.vsix
15189

16-
# Ignore the docs build directory
17-
docs/build/
190+
### VisualStudioCode Patch ###
191+
# Ignore all local history of files
192+
.history
193+
.ionide
18194

19-
# Ignore local tests
20-
local_test.py
195+
# End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode

.readthedocs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ version: 2
77

88
# Select the Docker image used for building the docs.
99
build:
10-
image: latest
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.8"
1113

1214
# Build documentation in the docs/ directory with Sphinx
1315
sphinx:
1416
builder: html
1517
configuration: docs/source/conf.py
16-
fail_on_warning: true
18+
fail_on_warning: false
1719

1820
# Build all formats (htmlzip, pdf and epub)
1921
formats: all
2022

2123
# Configure python for install requirements
2224
python:
23-
version: 3.8
2425
install:
2526
- requirements: docs/docs_requirements.txt

Pipfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)