Skip to content

Commit

Permalink
Merge pull request #1 from matheusfelipeog/feat/release-1.0.0
Browse files Browse the repository at this point in the history
Release 1.0.0 of worldometer module
  • Loading branch information
matheusfelipeog authored Feb 19, 2021
2 parents 5f809b2 + d74c985 commit 3dc220e
Show file tree
Hide file tree
Showing 16 changed files with 944 additions and 219 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ build/
dist/
*.egg-info/

# Ignore the docs build directory
docs/build/

# Ignore local tests
local_test.py
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ verify_ssl = true
name = "pypi"

[packages]
requests-html = "*"
requests-html = "0.10.0"

[dev-packages]
pylint = "*"
pylint = "2.6.0"
sphinx = "3.5.0"

[requires]
python_version = "3.8"
256 changes: 243 additions & 13 deletions Pipfile.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ $ pip install worldometer
>>> import worldometer

>>> worldometer.current_world_population()
7845085923
{'current_world_population': 7845085923}

>>> worldometer.tweets_sent_today()
4539558
{'tweets_sent_today': 4539558}

>>> worldometer.get_metric_of(label='computers_produced_this_year')
27760858
{'computers_produced_this_year': 27760858}
```

**Or complete use with Worldometer Class:**
Expand Down Expand Up @@ -125,7 +125,7 @@ $ pip install worldometer
... # compressed
]

>>> w.metrics
>>> w.metrics()
[
7845087963,
15741371,
Expand Down Expand Up @@ -154,11 +154,11 @@ $ pip install worldometer

All contributions are welcome!

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

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

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


# License
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Binary file added docs/source/_static/worldometer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))


# -- Project information -----------------------------------------------------

project = 'worldometer'
copyright = '2021, Matheus Felipe'
author = 'Matheus Felipe'

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation <https://alabaster.readthedocs.io/en/latest/customization.html>.
html_theme_options = {
'logo': 'worldometer.png',
'description': 'Get current metrics in the world with this python module.',
'fixed_sidebar': True,
'github_user': 'matheusfelipeog',
'github_repo': 'worldometer',
'github_banner': True,
'github_button': True,
'github_type': 'star',
'show_powered_by': False
}

# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'index': [
'about.html',
'localtoc.html',
'relations.html',
'sourcelink.html',
'searchbox.html'
],
'**': [
'about.html',
'localtoc.html',
'navigation.html',
'relations.html',
'sourcelink.html',
'searchbox.html'
]
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
Loading

0 comments on commit 3dc220e

Please sign in to comment.