Skip to content

Commit

Permalink
bump to v1.5.2
Browse files Browse the repository at this point in the history
- Greatly improved docs. Moved module documentation to source code.
- Creating classes via "pregex.classes.Any[But]From" now creates a class range if this is possible. For example, AnyFrom('a', 'b', 'c') => [a-c].
- Modified some existing tests regarding classes.
  • Loading branch information
manoss96 committed Aug 15, 2022
1 parent d311836 commit a727f54
Show file tree
Hide file tree
Showing 15 changed files with 1,020 additions and 664 deletions.
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
myst-parser==0.18.0
pregex==1.5.1
pregex==1.5.2
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
author = 'Manos Stoumpos'

# The full version, including alpha/beta/rc tags
release = '1.5.1'
release = '1.5.2'


# -- 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.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc', 'myst_parser']
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc']

# Supported file suffixes.
source_suffix = ['.rst', '.md']
source_suffix = ['.rst']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
20 changes: 10 additions & 10 deletions docs/source/docstring/modules.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
*******
+++++++
pregex
*******
+++++++

In this page you can learn about each one of pregex's core modules
and how to effectively use them in order to build complex RegEx patterns.

Before diving into the modules themselves, it is important to know that due to the
large number of classes contained within this package, one can simply include
**from pregex import \*** at the top of their Python script, which results
``from pregex import *`` at the top of their Python script, which results
in all of pregex's core modules being imported by using short aliases.
More specifically:

- Module **pregex.assert** is imported as **asr**.
- Module **pregex.classes** is imported as **cl**.
- Module **pregex.groups** is imported as **gr**.
- Module **pregex.operators** is imported as **op**.
- Module **pregex.quantifiers** is imported as **qu**.
- Module **pregex.tokens** is imported as **tk**.
- Classes **pregex.core.pre.{Pregex, Empty}** are imported as is.
- Module :py:mod:`pregex.assertions` is imported as **asr**.
- Module :py:mod:`pregex.classes` is imported as **cl**.
- Module :py:mod:`pregex.groups` is imported as **gr**.
- Module :py:mod:`pregex.operators` is imported as **op**.
- Module :py:mod:`pregex.quantifiers` is imported as **qu**.
- Module :py:mod:`pregex.tokens` is imported as **tk**.
- Classes :class:`~pregex.pre.Pregex` and :class:`~pregex.pre.Empty` are imported as is.

Take a look at the example below to better understand how this works:

Expand Down
Loading

0 comments on commit a727f54

Please sign in to comment.