Skip to content

Commit 3dc220e

Browse files
Merge pull request #1 from matheusfelipeog/feat/release-1.0.0
Release 1.0.0 of worldometer module
2 parents 5f809b2 + d74c985 commit 3dc220e

File tree

16 files changed

+944
-219
lines changed

16 files changed

+944
-219
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ build/
1313
dist/
1414
*.egg-info/
1515

16+
# Ignore the docs build directory
17+
docs/build/
18+
1619
# Ignore local tests
1720
local_test.py

Pipfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
requests-html = "*"
7+
requests-html = "0.10.0"
88

99
[dev-packages]
10-
pylint = "*"
10+
pylint = "2.6.0"
11+
sphinx = "3.5.0"
1112

1213
[requires]
1314
python_version = "3.8"

Pipfile.lock

Lines changed: 243 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ $ pip install worldometer
8888
>>> import worldometer
8989

9090
>>> worldometer.current_world_population()
91-
7845085923
91+
{'current_world_population': 7845085923}
9292

9393
>>> worldometer.tweets_sent_today()
94-
4539558
94+
{'tweets_sent_today': 4539558}
9595

9696
>>> worldometer.get_metric_of(label='computers_produced_this_year')
97-
27760858
97+
{'computers_produced_this_year': 27760858}
9898
```
9999

100100
**Or complete use with Worldometer Class:**
@@ -125,7 +125,7 @@ $ pip install worldometer
125125
... # compressed
126126
]
127127

128-
>>> w.metrics
128+
>>> w.metrics()
129129
[
130130
7845087963,
131131
15741371,
@@ -154,11 +154,11 @@ $ pip install worldometer
154154

155155
All contributions are welcome!
156156

157-
Found a problem, want to give a tip? open an issue.
157+
Found a problem, want to give a tip? [open an issue](https://github.com/matheusfelipeog/worldometer/issues)
158158

159-
Do you have a solution to the problem? Send me a PR.
159+
Do you have a solution to the problem? [Send me a PR](https://github.com/matheusfelipeog/worldometer/pulls)
160160

161-
Did you like this project? [Click on the star](https://github.com/matheusfelipeog/worldometer/stargazers)
161+
Did you like this project? [Click on the star](https://github.com/matheusfelipeog/worldometer/stargazers)
162162

163163

164164
# License

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd
12.8 KB
Loading

docs/source/conf.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
sys.path.insert(0, os.path.abspath('../..'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'worldometer'
21+
copyright = '2021, Matheus Felipe'
22+
author = 'Matheus Felipe'
23+
24+
# -- General configuration ---------------------------------------------------
25+
26+
# Add any Sphinx extension module names here, as strings. They can be
27+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
28+
# ones.
29+
extensions = [
30+
'sphinx.ext.autodoc',
31+
'sphinx.ext.napoleon'
32+
]
33+
34+
# Add any paths that contain templates here, relative to this directory.
35+
templates_path = ['_templates']
36+
37+
# -- Options for HTML output -------------------------------------------------
38+
39+
# The theme to use for HTML and HTML Help pages. See the documentation for
40+
# a list of builtin themes.
41+
#
42+
html_theme = 'alabaster'
43+
44+
# Theme options are theme-specific and customize the look and feel of a theme
45+
# further. For a list of options available for each theme, see the
46+
# documentation <https://alabaster.readthedocs.io/en/latest/customization.html>.
47+
html_theme_options = {
48+
'logo': 'worldometer.png',
49+
'description': 'Get current metrics in the world with this python module.',
50+
'fixed_sidebar': True,
51+
'github_user': 'matheusfelipeog',
52+
'github_repo': 'worldometer',
53+
'github_banner': True,
54+
'github_button': True,
55+
'github_type': 'star',
56+
'show_powered_by': False
57+
}
58+
59+
# Custom sidebar templates, maps document names to template names.
60+
html_sidebars = {
61+
'index': [
62+
'about.html',
63+
'localtoc.html',
64+
'relations.html',
65+
'sourcelink.html',
66+
'searchbox.html'
67+
],
68+
'**': [
69+
'about.html',
70+
'localtoc.html',
71+
'navigation.html',
72+
'relations.html',
73+
'sourcelink.html',
74+
'searchbox.html'
75+
]
76+
}
77+
78+
# Add any paths that contain custom static files (such as style sheets) here,
79+
# relative to this directory. They are copied after the builtin static files,
80+
# so a file named "default.css" will overwrite the builtin "default.css".
81+
html_static_path = ['_static']

0 commit comments

Comments
 (0)