Skip to content

Commit

Permalink
Merge branch 'release/0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Dec 14, 2024
2 parents 453ea26 + cee951f commit 99e5b64
Show file tree
Hide file tree
Showing 22 changed files with 291 additions and 194 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "develop", "main" ]
pull_request:
branches: [ "develop" ]
schedule:
- cron: "56 4 * * 4"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python ]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
33 changes: 17 additions & 16 deletions .github/workflows/test_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15]
os: [ubuntu-latest, macos-latest]
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- 'pypy-3.8'
- '3.11'
- '3.12'
- '3.13'
- 'pypy-3.9'

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -37,15 +38,15 @@ jobs:

test-docs:
name: Test documentation
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: '3.x'
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -61,18 +62,18 @@ jobs:
publish-to-test-pypi:
name: Publish to TestPyPI
environment: staging
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs:
- test-code
- test-docs

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -92,16 +93,16 @@ jobs:
publish-to-pypi:
name: Publish to PyPI
environment: production
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: publish-to-test-pypi

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,10 @@ target/
# Output files
*.csv

# Others
*.swp
# Text editors
*~
*.sw[nop]

# Virtual environments
venv/
.venv/
16 changes: 6 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 8fe62d14e0b4d7d845a7022c5c2c3ae41bdd3f26 # frozen: v4.1.0
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-ast
- id: check-executables-have-shebangs
- id: check-yaml
- id: trailing-whitespace

- repo: https://github.com/pycqa/flake8
rev: cbeb4c9c4137cff1568659fcc48e8b85cddd0c8d # frozen: 4.0.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 0710b94280408eef12748cde4782972942370ad2 # frozen: v0.8.0
hooks:
- id: flake8

- repo: https://github.com/pycqa/pylint
rev: eec287fae66f8fc514d5daa9caee46fd0e0cb6d9 # frozen: v2.12.2
hooks:
- id: pylint
- id: ruff
args: [ --fix ]
- id: ruff-format
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2022 Paul-Emmanuel Raoul <[email protected]>
Copyright (c) 2018-2024 Paul-Emmanuel Raoul <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 2 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
Faker Wi-Fi ESSID
=================

|PyPI Package| |PyPI Downloads| |PyPI Python Versions| |Build Status| |LGTM
Grade| |LGTM Alerts|
|PyPI Package| |PyPI Downloads| |PyPI Python Versions| |Build Status|

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

Expand Down Expand Up @@ -32,20 +31,12 @@ Usage
License
=======

`MIT <https://opensource.org/licenses/MIT>`__
This project is `MIT <https://opensource.org/license/MIT>`__ licensed.

.. |Build Status| image:: https://github.com/SkypLabs/faker-wifi-essid/actions/workflows/test_and_publish.yml/badge.svg?branch=develop
:target: https://github.com/SkypLabs/faker-wifi-essid/actions/workflows/test_and_publish.yml?query=branch%3Adevelop
:alt: Build Status

.. |LGTM Alerts| image:: https://img.shields.io/lgtm/alerts/g/SkypLabs/faker-wifi-essid.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/SkypLabs/fake-wifi-essid/alerts/
:alt: LGTM Alerts

.. |LGTM Grade| image:: https://img.shields.io/lgtm/grade/python/g/SkypLabs/faker-wifi-essid.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/SkypLabs/faker-wifi-essid/context:python
:alt: LGTM Grade

.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/faker-wifi-essid.svg?style=flat
:target: https://pypi.org/project/faker-wifi-essid/
:alt: PyPI Package Downloads Per Month
Expand Down
33 changes: 17 additions & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@

# pylint: skip-file

from pkg_resources import get_distribution
from datetime import datetime

from faker_wifi_essid import __version__ as VERSION

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

project = 'Faker Wi-Fi ESSID'
copyright = '2022, Paul-Emmanuel Raoul'
author = 'Paul-Emmanuel Raoul'
project = "Faker Wi-Fi ESSID"
copyright = f"2018-{datetime.now().year}, Paul-Emmanuel Raoul"
author = "Paul-Emmanuel Raoul"

# The full version, including alpha/beta/rc tags
release = get_distribution("faker_wifi_essid").version
release = VERSION


# -- General configuration ---------------------------------------------------
Expand All @@ -35,39 +36,39 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
"sphinx.ext.autodoc",
]

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

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- 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 = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# 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']
html_static_path = ["_static"]

# -- Options for GitHub integration -------------------------------------------

html_context = {
'display_github': True, # Integrate GitHub
'github_user': 'SkypLabs', # Username
'github_repo': 'faker-wifi-essid', # Repo name
'github_version': 'develop', # Version
'conf_py_path': '/docs/', # Path in the checkout to the docs root
"display_github": True, # Integrate GitHub
"github_user": "SkypLabs", # Username
"github_repo": "faker-wifi-essid", # Repo name
"github_version": "develop", # Version
"conf_py_path": "/docs/", # Path in the checkout to the docs root
}
9 changes: 9 additions & 0 deletions docs/development.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
===========
Development
===========

.. toctree::
:glob:
:maxdepth: 2

development/*
6 changes: 3 additions & 3 deletions docs/documentation.rst → docs/development/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ folder.
Install the dependencies
------------------------

The dependencies required to build the documentation are defined in `setup.py`
as an optional dependency group called `docs`.
The dependencies required to build the documentation are defined in
`pyproject.toml` as an optional dependency group called `docs`.

To install the dependencies in `docs`:

::

pip3 install .[docs]
pip install .[docs]


Build the documentation
Expand Down
28 changes: 28 additions & 0 deletions docs/development/drop-deprecated-py-versions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
===============================================
Dropping support for deprecated Python versions
===============================================

When a Python version is officially deprecated, it needs to be removed from the
versions supported by this package. To do so, the following actions need to be taken:

* In `pyproject.toml`:

* Remove the Python version from the classifiers.
* Update the minimum supported Python version in `requires-python`.

* In `tox.ini`:

* Remove the Python version from `tox.envlist`.

* In `.github/workflows/test_and_publish.yml`:

* Remove the Python version from the build matrix.

* In the GitHub repository settings:

* If necessary, update the required status checks in the branch protection
rules.

The status of the Python versions can be found `here
<https://devguide.python.org/versions/>`_.

2 changes: 1 addition & 1 deletion docs/modules.rst → docs/development/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Modules
The different modules of Faker Wi-Fi ESSID will be listed here.

.. toctree::
:maxdepth: 1
:glob:
:maxdepth: 1

modules/*
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Faker Wi-Fi ESSID is a `Faker`_ provider for Wi-Fi ESSIDs.

.. toctree::
:caption: Contents
:maxdepth: 2

installation
usage
modules
documentation
development

.. _Faker: https://github.com/joke2k/faker/
Loading

0 comments on commit 99e5b64

Please sign in to comment.