Skip to content

Commit

Permalink
Merge pull request python-validators#337 from yozachar/workshop
Browse files Browse the repository at this point in the history
fix: packaging as well as `rST` & `md` document generation
  • Loading branch information
yozachar committed Mar 20, 2024
2 parents 245bffd + 3a2c513 commit 854375f
Show file tree
Hide file tree
Showing 71 changed files with 449 additions and 669 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docs.yaml.bkp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
# checkout repository
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# set up specific python version
- name: Set up Python v3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
# building
Expand All @@ -30,10 +30,10 @@ jobs:
run: python package/export docs
# set up Pages
- name: Set up Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
# upload static page
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.BUILD_PATH }}/site
deploy:
Expand All @@ -50,4 +50,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
# checkout repository
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# set up specific python version
- name: Set up Python v3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
# install dependencies
Expand All @@ -38,7 +38,7 @@ jobs:
deactivate
# upload package as artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.BUILD_PATH }}/dist
publish:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pycqa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
# checkout repository
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# set up specific python version
- name: Set up Python v3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
# tooling
Expand All @@ -41,10 +41,10 @@ jobs:
# checkout repository again!
# ref: https://github.com/actions/checkout/issues/19
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# set up specific python version
- name: Set up Python v${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Bandit
uses: mdegis/bandit-action@85fcc340c3b0bf5d86029abb49b9aac916d807b2
with:
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ instance/
.scrapy

# Sphinx documentation
# docs/references/
docs/_build/
# temporary
docs/references/*.rst
docs/*.rst
docs/*.1

# PyBuilder
Expand Down
23 changes: 20 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,26 @@ Note to self: Breaking changes must increment either
-->

## 0.23.2 (2024-03-20)

_**Breaking**_

> No breaking changes were introduced in this version.
_**Features**_

> No features were introduced in this version.
_**Maintenance**_

- maint: rectifies changelog by @yozachar in [#336](ttps://github.com/python-validators/validators/pull/336)
- fix: packaging as well as `rST` & `md` document generation by @yozachar in [#337](ttps://github.com/python-validators/validators/pull/337)

**Full Changelog**: [`0.23.1...0.23.2`](https://github.com/python-validators/validators/compare/0.23.1...0.23.2)

## 0.23.1 (2024-03-19)

_**Breaking**_ ⚠️
_**Breaking**_

> No breaking changes were introduced in this version.
Expand All @@ -28,7 +45,7 @@ _**Maintenance**_

## 0.23.0 (2024-03-19)

_**Breaking**_ ⚠️
_**Breaking**_

> No breaking changes were introduced in this version.
Expand Down Expand Up @@ -101,7 +118,7 @@ _**Maintenance**_

## 0.21.1 (2023-04-10)

_**Breaking**_ ⚠️
_**Breaking**_

> No breaking changes were introduced in this version.
Expand Down
18 changes: 14 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
# MANIFEST.in stays as long as pyproject.toml does not officially support it
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/

include docs/*
include .gitignore
# include
include CHANGES.md
include mkdocs.yaml


# global-include


# recursive-include
recursive-include tests *
recursive-include docs *


# graft


# exclude


# global-exclude

recursive-exclude docs *.rst
recursive-exclude docs/references *.md

# recursive-exclude


# prune
prune docs/_build
prune **/__pycache__
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Version | Supported |
| ---------- | ------------------ |
| `>=0.23.0` | :white_check_mark: |
| `>=0.23.2` | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/between.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
between
-------

.. module:: validators.between
.. autofunction:: between
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/btc_address.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
btc_address
-----------

.. module:: validators.btc_address
.. autofunction:: btc_address
File renamed without changes.
12 changes: 12 additions & 0 deletions docs/api/card.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
card
----

.. module:: validators.card
.. autofunction:: amex
.. autofunction:: card_number
.. autofunction:: diners
.. autofunction:: discover
.. autofunction:: jcb
.. autofunction:: mastercard
.. autofunction:: unionpay
.. autofunction:: visa
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/country_code.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
country_code
------------

.. module:: validators.country_code
.. autofunction:: country_code
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/domain.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
domain
------

.. module:: validators.domain
.. autofunction:: domain
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/email.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
email
-----

.. module:: validators.email
.. autofunction:: email
File renamed without changes.
9 changes: 9 additions & 0 deletions docs/api/hashes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
hashes
------

.. module:: validators.hashes
.. autofunction:: md5
.. autofunction:: sha1
.. autofunction:: sha224
.. autofunction:: sha256
.. autofunction:: sha512
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/hostname.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
hostname
--------

.. module:: validators.hostname
.. autofunction:: hostname
File renamed without changes.
12 changes: 12 additions & 0 deletions docs/api/i18n.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
i18n
----

.. module:: validators.i18n
.. autofunction:: es_cif
.. autofunction:: es_doi
.. autofunction:: es_nie
.. autofunction:: es_nif
.. autofunction:: fi_business_id
.. autofunction:: fi_ssn
.. autofunction:: fr_department
.. autofunction:: fr_ssn
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/iban.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
iban
----

.. module:: validators.iban
.. autofunction:: iban
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/api/ip_address.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ip_address
----------

.. module:: validators.ip_address
.. autofunction:: ipv4
.. autofunction:: ipv6
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/length.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
length
------

.. module:: validators.length
.. autofunction:: length
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/mac_address.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mac_address
-----------

.. module:: validators.mac_address
.. autofunction:: mac_address
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/slug.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
slug
----

.. module:: validators.slug
.. autofunction:: slug
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/url.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
url
---

.. module:: validators.url
.. autofunction:: url
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/api/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
utils
-----

.. module:: validators.utils
.. autofunction:: ValidationError
.. autofunction:: validator
File renamed without changes.
5 changes: 5 additions & 0 deletions docs/api/uuid.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
uuid
----

.. module:: validators.uuid
.. autofunction:: uuid
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"sphinx.ext.napoleon",
"myst_parser",
]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "*.md"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**/*.md", "*.md"]


# -- Options for HTML output -------------------------------------------------
Expand Down
69 changes: 69 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
validators - Python Data Validation for Humans™
===============================================

|PyCQA| |SAST| |Docs| |Version| |Downloads|

.. raw:: html

<!-- [![Package][package-badge]][package-link] -->

Python has all kinds of data validation tools, but every one of them
seems to require defining a schema or form. I wanted to create a simple
validation library where validating a simple value does not require
defining a form or a schema.

.. code:: python
>>> import validators
>>>
>>> validators.email('[email protected]')
True
Resources
---------

.. raw:: html

<!-- Temporary documentation URL : https://yozachar.github.io/pyvalidators/ -->

.. raw:: html

<!-- Original documentation URL : https://python-validators.github.io/validators/ -->

- `Documentation <https://yozachar.github.io/pyvalidators/>`__
- `Bugtracker <https://github.com/python-validators/validators/issues>`__
- `Security <https://github.com/python-validators/validators/blob/master/SECURITY.md>`__
- `Code <https://github.com/python-validators/validators/>`__

.. raw:: html

<!-- Original docs URL will be restored, once properly versioned docs is ready. -->

.. raw:: html

<!-- Links -->

.. raw:: html

<!-- [package-badge]: https://github.com/python-validators/validators/actions/workflows/package.yaml/badge.svg
[package-link]: https://github.com/python-validators/validators/actions/workflows/package.yaml -->

.. |PyCQA| image:: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
:target: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
.. |SAST| image:: https://github.com/python-validators/validators/actions/workflows/sast.yaml/badge.svg
:target: https://github.com/python-validators/validators/actions/workflows/sast.yaml
.. |Docs| image:: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
:target: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
.. |Version| image:: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
:target: https://pypi.python.org/pypi/validators/
.. |Downloads| image:: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue
:target: https://pypi.python.org/pypi/validators/


.. toctree::
:hidden:
:maxdepth: 2
:caption: Reference:
:glob:

api/*
Loading

0 comments on commit 854375f

Please sign in to comment.