Skip to content

Commit d3dee02

Browse files
committed
Merge branch 'release/0.3.0'
2 parents c61574b + a38af34 commit d3dee02

24 files changed

+676
-163
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: SkypLabs
2+
ko_fi: skyplabs
3+
custom: ["https://blog.skyplabs.net/support/", "https://www.buymeacoffee.com/skyplabs", "https://paypal.me/skyplabs"]

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "09:00"
8+
timezone: Europe/Dublin
9+
open-pull-requests-limit: 10
10+
target-branch: develop
11+
ignore:
12+
- dependency-name: faker
13+
versions:
14+
- 5.0.0
15+
- 7.0.1

.github/workflows/publish.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Publish
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- Test
7+
branches:
8+
- master
9+
types:
10+
- completed
11+
12+
jobs:
13+
publish-to-test-pypi:
14+
name: Publish to TestPyPI
15+
environment: staging
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
- name: Check out code
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.x'
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install setuptools wheel twine
31+
32+
- name: Build and publish
33+
env:
34+
TWINE_USERNAME: '__token__'
35+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
36+
run: |
37+
python setup.py sdist bdist_wheel
38+
twine upload --repository testpypi dist/*
39+
40+
publish-to-pypi:
41+
name: Publish to PyPI
42+
environment: production
43+
runs-on: ubuntu-20.04
44+
needs: publish-to-test-pypi
45+
46+
steps:
47+
- name: Check out code
48+
uses: actions/checkout@v2
49+
50+
- name: Set up Python
51+
uses: actions/setup-python@v2
52+
with:
53+
python-version: '3.x'
54+
55+
- name: Install dependencies
56+
run: |
57+
python -m pip install --upgrade pip
58+
pip install setuptools wheel twine
59+
60+
- name: Build and publish
61+
env:
62+
TWINE_USERNAME: '__token__'
63+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
64+
run: |
65+
python setup.py sdist bdist_wheel
66+
twine upload dist/*

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
test-code:
9+
name: Test code
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-20.04, macos-10.15]
14+
python-version: [3.5, 3.6, 3.7, 3.8]
15+
16+
steps:
17+
- name: Check out code
18+
uses: actions/checkout@v2
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install .[tests] tox-gh-actions
29+
30+
- name: Test with Tox
31+
run: tox
32+
33+
test-docs:
34+
name: Test documentation
35+
runs-on: ubuntu-20.04
36+
env:
37+
PYTHON_VERSION: 3.8
38+
steps:
39+
- name: Check out code
40+
uses: actions/checkout@v2
41+
42+
- name: Set up Python ${{ env.PYTHON_VERSION }}
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: ${{ env.PYTHON_VERSION }}
46+
47+
- name: Install dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install .[docs]
51+
52+
- name: Build documentation
53+
working-directory: docs
54+
run: make html

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: 0b70e285e369bcb24b57b74929490ea7be9c4b19 # v2.2.3
4+
hooks:
5+
- id: check-ast
6+
- id: check-executables-have-shebangs
7+
- id: check-yaml
8+
- id: flake8
9+
- id: trailing-whitespace
10+
- repo: https://github.com/pre-commit/mirrors-pylint
11+
rev: 59c5533087e77a99a5697b1faac86615f3ce4a10 # frozen: v3.0.0a4
12+
hooks:
13+
- id: pylint
14+
entry: python3 -m pylint.__main__
15+
language: system

.travis.yml

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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Paul-Emmanuel Raoul <skyper@skyplabs.net>
3+
Copyright (c) 2018-2021 Paul-Emmanuel Raoul <skyper@skyplabs.net>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Faker Wi-Fi ESSID
33
=================
44

5-
|PyPI Package| |Build Status| |Code Coverage|
5+
|PyPI Package| |Build Status|
66

77
`Faker <https://github.com/joke2k/faker/>`__ provider for Wi-Fi ESSIDs.
88

9-
.. image:: docs/img/faker_wifi_essid_demo.gif
9+
.. image:: docs/_static/img/faker_wifi_essid_demo.gif
1010
:target: https://asciinema.org/a/191287
1111
:alt: Faker Wi-Fi ESSID - Demo
1212

@@ -15,25 +15,27 @@ Usage
1515

1616
.. code-block:: python
1717
18-
from faker import Faker
19-
from faker_wifi_essid import WifiESSID
18+
# Import Faker.
19+
from faker import Faker
20+
# Import the WifiESSID class from Faker Wi-Fi ESSID.
21+
from faker_wifi_essid import WifiESSID
2022
21-
fake = Faker()
22-
fake.add_provider(WifiESSID)
23+
# Create an instance of Faker.
24+
fake = Faker()
25+
# Add Faker Wi-Fi ESSID to the Faker providers.
26+
fake.add_provider(WifiESSID)
2327
24-
fake.wifi_essid()
28+
# Call 'wifi_essid()' to get a random fake Wi-Fi ESSID.
29+
fake.wifi_essid()
2530
2631
License
2732
=======
2833

2934
`MIT <https://opensource.org/licenses/MIT>`__
3035

31-
.. |Build Status| image:: https://travis-ci.org/SkypLabs/faker-wifi-essid.svg
32-
:target: https://travis-ci.org/SkypLabs/faker-wifi-essid
36+
.. |Build Status| image:: https://github.com/SkypLabs/faker-wifi-essid/actions/workflows/test.yml/badge.svg?branch=develop
37+
:target: https://github.com/SkypLabs/faker-wifi-essid/actions/workflows/test.yml
3338
:alt: Build Status
34-
.. |Code Coverage| image:: https://api.codacy.com/project/badge/Grade/81340af8ccae48fea7ecede19a2d8cfa
35-
:target: https://www.codacy.com/app/skyper/faker-wifi-essid?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=SkypLabs/faker-wifi-essid&amp;utm_campaign=Badge_Grade
36-
:alt: Code Coverage
3739
.. |PyPI Package| image:: https://badge.fury.io/py/faker-wifi-essid.svg
3840
:target: https://badge.fury.io/py/faker-wifi-essid
3941
:alt: PyPI Package

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 = .
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/conf.py

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+
# pylint: skip-file
18+
19+
from pkg_resources import get_distribution
20+
21+
22+
# -- Project information -----------------------------------------------------
23+
24+
project = 'Faker Wi-Fi ESSID'
25+
copyright = '2021, Paul-Emmanuel Raoul'
26+
author = 'Paul-Emmanuel Raoul'
27+
28+
# The full version, including alpha/beta/rc tags
29+
release = get_distribution("faker_wifi_essid").version
30+
31+
32+
# -- General configuration ---------------------------------------------------
33+
34+
# Add any Sphinx extension module names here, as strings. They can be
35+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36+
# ones.
37+
extensions = [
38+
'sphinx.ext.autodoc',
39+
]
40+
41+
# Add any paths that contain templates here, relative to this directory.
42+
templates_path = ['_templates']
43+
44+
# The master toctree document.
45+
master_doc = 'index'
46+
47+
# List of patterns, relative to source directory, that match files and
48+
# directories to ignore when looking for source files.
49+
# This pattern also affects html_static_path and html_extra_path.
50+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
51+
52+
53+
# -- Options for HTML output -------------------------------------------------
54+
55+
# The theme to use for HTML and HTML Help pages. See the documentation for
56+
# a list of builtin themes.
57+
#
58+
html_theme = 'sphinx_rtd_theme'
59+
60+
# Add any paths that contain custom static files (such as style sheets) here,
61+
# relative to this directory. They are copied after the builtin static files,
62+
# so a file named "default.css" will overwrite the builtin "default.css".
63+
html_static_path = ['_static']
64+
65+
# -- Options for GitHub integration -------------------------------------------
66+
67+
html_context = {
68+
'display_github': True, # Integrate GitHub
69+
'github_user': 'SkypLabs', # Username
70+
'github_repo': 'faker-wifi-essid', # Repo name
71+
'github_version': 'develop', # Version
72+
'conf_py_path': '/docs/', # Path in the checkout to the docs root
73+
}

docs/documentation.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
=============
2+
Documentation
3+
=============
4+
5+
The documentation is written with `Sphinx`_ and is available in the `docs` folder.
6+
7+
Install the dependencies
8+
------------------------
9+
10+
The dependencies required to build the documentation are defined in `setup.py` as an optional dependency group called `docs`.
11+
12+
To install the dependencies in `docs`:
13+
14+
::
15+
16+
pip3 install .[docs]
17+
18+
19+
Build the documentation
20+
-----------------------
21+
22+
Sphinx provides a `Makefile` to build the documentation easily. Several output formats are available.
23+
24+
For example, to build the documentation in HTML:
25+
26+
::
27+
28+
cd docs/
29+
make html
30+
31+
The documentation website will be available in `docs/_build/html`.
32+
33+
To see the full list of the supported output formats, just execute `make` without any specific target.
34+
35+
.. _Sphinx: https://www.sphinx-doc.org

docs/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. Faker Wi-Fi ESSID documentation master file, created by
2+
sphinx-quickstart on Thu Jun 11 12:23:16 2020.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to Faker Wi-Fi ESSID's documentation!
7+
=============================================
8+
9+
Faker Wi-Fi ESSID is a `Faker`_ provider for Wi-Fi ESSIDs.
10+
11+
.. image:: _static/img/faker_wifi_essid_demo.gif
12+
:target: https://asciinema.org/a/191287
13+
:alt: Faker Wi-Fi ESSID - Demo
14+
15+
.. toctree::
16+
:caption: Contents
17+
18+
installation
19+
usage
20+
modules
21+
documentation
22+
23+
.. _Faker: https://github.com/joke2k/faker/

0 commit comments

Comments
 (0)