Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvements #33

Open
wants to merge 130 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
e7a4804
implement finditer as generator
andreasvc Jul 31, 2015
2d86f8e
Python 2/3 compatibility, support buffer objects, &c.
andreasvc Aug 1, 2015
0d0aeae
minor changes
andreasvc Aug 1, 2015
5c60555
re-organize code
andreasvc Aug 2, 2015
1621e47
properly translate pos, endpos indices with unicode, &c.
andreasvc Aug 2, 2015
27786c2
new buffer API; precompute groups/spans; &c.
andreasvc Aug 3, 2015
4dd5ec0
pickle Patterns; non-char buffers; &c.
andreasvc Aug 3, 2015
1ea4aeb
handle named groups in replacement string; &c.
andreasvc Aug 3, 2015
1956617
workaround for sub(...) with count > 1
andreasvc Aug 3, 2015
f295a00
update performance table / missing features
andreasvc Aug 3, 2015
ce4899d
add flags parameter to toplevel functions
andreasvc Aug 5, 2015
cbb681b
Improve substitutions, Python 3 compatibility.
andreasvc Aug 10, 2015
35359ce
move functions around
andreasvc Aug 10, 2015
073074f
add count method
andreasvc Oct 24, 2015
d62d055
document support syntax &c.
andreasvc Nov 25, 2015
bb30450
add tests for bug with \\b
andreasvc Dec 21, 2015
415fd39
fix Match repr
andreasvc Dec 21, 2015
224abc5
Fix bugs; ensure memory is released; simplify C++ interfacing;
andreasvc Apr 26, 2016
2d27f8c
add C++11 param; update URL
andreasvc May 5, 2016
aa944fe
fix setup.py unicode error
andreasvc Jul 19, 2016
dad49cd
Ignore non-matched groups when replacing with sub
Mar 15, 2017
e880a02
Merge pull request #1 from pvaneynd/master
andreasvc Mar 17, 2017
2cea5e4
Fix groupdict decode bug
messense Apr 14, 2017
5f2b622
Merge pull request #2 from messense/master
andreasvc Apr 14, 2017
0241bb4
disable non-matched group tests; irrelevant after dad49cd
andreasvc Apr 14, 2017
83e72ab
add -std=c++11 only for clang, because gcc on CentOS 6 does not suppo…
andreasvc Apr 14, 2017
1b16800
update README
andreasvc Apr 14, 2017
d8f08f6
only translate unicode indices when needed
andreasvc May 31, 2017
94aa3fe
use STL map for unicodeindices
andreasvc May 31, 2017
c91d670
macports support
podhmo Jun 1, 2017
9bc0e5a
Merge pull request #3 from podhmo/macports
andreasvc Jun 1, 2017
7cb2220
Adding c++ 11 compile flag on Ubuntu
Aug 14, 2017
7881780
Merge pull request #5 from mayk93/master
andreasvc Aug 14, 2017
7146ce3
make -std=c++11 the default; fixes #4
andreasvc Aug 14, 2017
3e01eba
decode named groups even with bytes patterns; fixes #6
andreasvc Feb 22, 2018
8ec8217
remove tests with re.LOCALE flag since it is not allowed with str in …
andreasvc Apr 30, 2020
53bddf9
disable failing test for known corner case
andreasvc Apr 30, 2020
e05bad3
Disable dubious tests
andreasvc Apr 30, 2020
cfc6f2a
Add contains() method
andreasvc Apr 30, 2020
7dfcfb5
created pyproject.toml
yoav-orca Oct 26, 2020
61659eb
Creating github actions for building wheels
yoav-orca Oct 27, 2020
8a90db3
Merge pull request #14 from yoav-orca/master
andreasvc Oct 27, 2020
1ef0f0f
bump version
andreasvc Oct 27, 2020
a3e13fd
change package name for pypi
andreasvc Oct 27, 2020
2a14413
bump version
andreasvc Oct 27, 2020
c8a08ed
fix: pkg: workaroud for manylinux dependency install error, add relea…
sarnold Dec 9, 2020
9f5df5a
Merge pull request #18 from freepn/github-ci
andreasvc Dec 10, 2020
d48a20a
bump version
andreasvc Dec 16, 2020
85bc93e
new: pkg: convert to pep517 with cmake and pybind11 build config
sarnold Jan 13, 2021
0e4330f
chg: ci: update wheel builds for Linux, Macos, and Windows
sarnold Jan 13, 2021
f6f7ae8
fix: pkg: update macos wheel repair, simplify wheel building
sarnold Jan 15, 2021
835ba9e
fix: ci: make sure wheel path is correct for uploading
sarnold Jan 15, 2021
b5869bd
chg: doc: add .gitchangelog.rc and generated CHANGELOG.rst (keep HIST…
sarnold Jan 18, 2021
b649c61
Merge pull request #20 from freepn/new-bld
andreasvc Jan 20, 2021
3efb3d8
update README.rst. fixes #21
andreasvc Jan 26, 2021
d13052c
bump version
andreasvc Jan 26, 2021
b1631ef
add missing tests to sdist package, update readme and ci worflows (#1)
sarnold Feb 2, 2021
6356912
update changelog (and trigger ci rebuild)
sarnold Feb 2, 2021
d167fe0
fix pickle_test (tests.test_re.ReTests) ... ERROR (run tests with nose)
sarnold Dec 5, 2020
d8c3500
fix: pkg: add simplejson to test deps, remove excelude for wikidata blob
sarnold Feb 2, 2021
6a85410
Merge pull request #22 from sarnold/missing-tests
andreasvc Feb 5, 2021
44b702b
update README, fix Makefile
andreasvc Feb 5, 2021
f163033
Makefile: default to Python 3
andreasvc Feb 5, 2021
98db9d4
tweak order of badges
andreasvc Feb 5, 2021
2ffea84
use pytest; fixes #23
andreasvc Feb 5, 2021
5105a66
fix Python 2 compatibility
andreasvc Feb 6, 2021
bf6fd1a
chg: test: rename imported test helpers to avoid any discovery issues
sarnold Feb 4, 2021
5117422
fix: dev: encode test data, add pytest and tox cfgs, update reqs
sarnold Feb 6, 2021
7e28b5f
chg: dev: add more clean plus cleanup cfgs and remove cruft
sarnold Feb 7, 2021
a3a5754
fix: test: handle invalid escape sequence warnings, revert path changes
sarnold Feb 7, 2021
5bb2c49
chg: ci: update workflows and tox cfg (use tox for smoke test)
sarnold Feb 7, 2021
3bcc431
chg: pkg: add .gitattributes and revert conda test change
sarnold Feb 7, 2021
4c86ec7
chg: pkg: add pytest to conda recipe (plus test patch)
sarnold Feb 7, 2021
63cf13d
Merge pull request #24 from sarnold/tst-cleanup
andreasvc Feb 7, 2021
6ed77f5
fix narrow unicode detection
andreasvc Feb 7, 2021
7b28dba
fix "make test"; rename doctest files for autodetection
andreasvc Feb 7, 2021
e0f47d7
fix conda patch
andreasvc Feb 7, 2021
25e83ce
fix fix of conda patch
andreasvc Feb 7, 2021
0a389d6
another one
andreasvc Feb 7, 2021
85e4349
fix: test: apply test patch, cleanup tox and pytest args
sarnold Feb 7, 2021
94db661
chg: pkg: remove test patch from conda recipe
sarnold Feb 7, 2021
4de5484
Merge pull request #25 from sarnold/last-moves
andreasvc Feb 8, 2021
94cb4f7
fix "make test" and "make test2"
andreasvc Apr 6, 2021
0974fae
fix infinite loop on substitutions of empty matches; fixes #26
andreasvc Apr 6, 2021
db47c4e
add test for #26
andreasvc Apr 8, 2021
8ab3163
improve fix for #26
andreasvc Apr 10, 2021
e967c05
bump version
andreasvc Apr 10, 2021
92ad32b
move pypi upload to end of release.yml, use gitchangelog action
sarnold Apr 11, 2021
6928409
Merge pull request #28 from sarnold/use-action
andreasvc Apr 12, 2021
699767f
bump version again
andreasvc Apr 13, 2021
d1caa23
add missing sdist job and artifact check to workflows, bump version
sarnold May 4, 2021
a732777
Merge pull request #30 from sarnold/release-pr
andreasvc May 5, 2021
f58792a
Make Match objects subscriptable
JustAnotherArchivist Jul 30, 2021
e887418
Add test for Match subscripting
JustAnotherArchivist Jul 30, 2021
94491a5
Merge pull request #32 from JustAnotherArchivist/match-getitem
andreasvc Jul 30, 2021
72f648b
fix: dev: add conda-only patch for test_emptygroups failure
sarnold Sep 10, 2021
f3cb8f0
fix: dev: conda build workflow: drop py 3.6 and add py 3.10
sarnold Sep 10, 2021
de67b09
fix: dev: limit conda build workflow to py 3.8 and 3.9
sarnold Sep 10, 2021
bb60374
fix: apply emptygroups fix and remove conda-only patch, also
sarnold Sep 12, 2021
8d853ab
Merge pull request #33 from sarnold/conda-patch
andreasvc Sep 12, 2021
e632dbe
remove python versions for make valgrind
andreasvc Dec 20, 2022
01c73c9
add NOFLAGS and RegexFlags constants; #41
andreasvc Dec 20, 2022
017328a
make tests pass on my system; if this behavior turns out to be incons…
andreasvc Dec 20, 2022
27a0d98
document lack of support for possessive quantifiers and atomic groups
andreasvc Dec 20, 2022
6bb18c2
support fallback to Python re for possessive quantifiers
andreasvc Dec 20, 2022
195c923
include current notification level in cache key
andreasvc Dec 20, 2022
76cdec7
fix #42
andreasvc Apr 13, 2023
03caeb0
chg: dev: update python, deps, GH action versions, and tox file
sarnold Apr 8, 2024
fb2d2df
fix: dev: remove failing subscript test in single match group
sarnold Apr 9, 2024
f3d03ac
chg: dev: update packaging files, add setuptools_scm support
sarnold Apr 9, 2024
b985764
chg: dev: bump cibw version, update workflows and min py version
sarnold Apr 9, 2024
7fea650
chg: dev: add/update cfgs, modernize cibw build workflow
sarnold Apr 10, 2024
9e6daec
chg: dev: update cmake and workflow files, delete unused bits
sarnold Apr 10, 2024
7a32942
chg: dev: cleanup metadata and test imports, disable platform whl tests
sarnold Apr 13, 2024
816705b
chg: dev: enable findpython policy, use matrix uploads
sarnold Apr 13, 2024
621888a
chg: dev: try pkgconf on windows CI runner
sarnold Apr 13, 2024
df921a8
fix: dev: bump CMake to c++17 with extensions to build against re2-0.…
sarnold Sep 6, 2024
c3ebb30
fix: dev: bump ubuntu and mac workflow runners
sarnold Sep 6, 2024
8fcfded
chg: swap out flake8 for cython-lint, update setup files, remove pep8…
sarnold Sep 7, 2024
e975b7c
fix: cleanup tests and fix a raw string test, enable more win32
sarnold Sep 7, 2024
1465367
chg: switch conda workflow to condadev environment
sarnold Sep 8, 2024
db22ef1
chg: dev: make sure conda-devenv installs specific pkgs with pip
sarnold Sep 8, 2024
f254daa
chg: dev: switch conda env to use mamba with newer workflow cmds
sarnold Sep 8, 2024
ae58b0b
chg: dev: one more conda-devenv refactor based on latest docs
sarnold Sep 9, 2024
00ff29d
Merge pull request #47 from sarnold/py-cleanup
andreasvc Sep 10, 2024
8d64c5f
new: doc: add basic sphinx docs build using apidoc, update changelog
sarnold Sep 8, 2024
4a38e78
chg: add gh workflow for sphinx build/deploy
sarnold Sep 10, 2024
772faa1
fix: dev: update release workflow for new platform wheels
sarnold Sep 10, 2024
ba4931b
chg: dev: minor workflow changes to kickstart deployment
sarnold Sep 10, 2024
aed0536
Merge pull request #50 from sarnold/sphinx-apidocs
andreasvc Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Set default behaviour to automatically normalize line endings.
* text=auto

# Force batch scripts to always use CRLF line endings so that if a repo is
# accessed in Windows via a file share from Linux, the scripts will work.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf

# Force bash scripts to always use LF line endings so that if a repo is
# accessed in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf
297 changes: 297 additions & 0 deletions .gitchangelog.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,297 @@
# -*- coding: utf-8; mode: python -*-
##
## Format
##
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
##
## Description
##
## ACTION is one of 'chg', 'fix', 'new'
##
## Is WHAT the change is about.
##
## 'chg' is for refactor, small improvement, cosmetic changes...
## 'fix' is for bug fixes
## 'new' is for new features, big improvement
##
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
##
## Is WHO is concerned by the change.
##
## 'dev' is for developpers (API changes, refactors...)
## 'usr' is for final users (UI changes)
## 'pkg' is for packagers (packaging changes)
## 'test' is for testers (test only related changes)
## 'doc' is for doc guys (doc only changes)
##
## COMMIT_MSG is ... well ... the commit message itself.
##
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
##
## They are preceded with a '!' or a '@' (prefer the former, as the
## latter is wrongly interpreted in github.) Commonly used tags are:
##
## 'refactor' is obviously for refactoring code only
## 'minor' is for a very meaningless change (a typo, adding a comment)
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
## 'wip' is for partial functionality but complete subfunctionality.
##
## Example:
##
## new: usr: support of bazaar implemented
## chg: re-indentend some lines !cosmetic
## new: dev: updated code to be compatible with last version of killer lib.
## fix: pkg: updated year of licence coverage.
## new: test: added a bunch of test around user usability of feature X.
## fix: typo in spelling my name in comment. !minor
##
## Please note that multi-line commit message are supported, and only the
## first line will be considered as the "summary" of the commit message. So
## tags, and other rules only applies to the summary. The body of the commit
## message will be displayed in the changelog without reformatting.


##
## ``ignore_regexps`` is a line of regexps
##
## Any commit having its full commit message matching any regexp listed here
## will be ignored and won't be reported in the changelog.
##
ignore_regexps = [
r'@minor', r'!minor',
r'@cosmetic', r'!cosmetic',
r'@refactor', r'!refactor',
r'@wip', r'!wip',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
r'^([cC]i)\s*:',
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
r'^$', ## ignore commits with empty messages
]


## ``section_regexps`` is a list of 2-tuples associating a string label and a
## list of regexp
##
## Commit messages will be classified in sections thanks to this. Section
## titles are the label, and a commit is classified under this section if any
## of the regexps associated is matching.
##
## Please note that ``section_regexps`` will only classify commits and won't
## make any changes to the contents. So you'll probably want to go check
## ``subject_process`` (or ``body_process``) to do some changes to the subject,
## whenever you are tweaking this variable.
##
section_regexps = [
('New', [
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Features', [
r'^([nN]ew|[fF]eat)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Changes', [
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Fixes', [
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Other', None ## Match all lines
),
]


## ``body_process`` is a callable
##
## This callable will be given the original body and result will
## be used in the changelog.
##
## Available constructs are:
##
## - any python callable that take one txt argument and return txt argument.
##
## - ReSub(pattern, replacement): will apply regexp substitution.
##
## - Indent(chars=" "): will indent the text with the prefix
## Please remember that template engines gets also to modify the text and
## will usually indent themselves the text if needed.
##
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
##
## - noop: do nothing
##
## - ucfirst: ensure the first letter is uppercase.
## (usually used in the ``subject_process`` pipeline)
##
## - final_dot: ensure text finishes with a dot
## (usually used in the ``subject_process`` pipeline)
##
## - strip: remove any spaces before or after the content of the string
##
## - SetIfEmpty(msg="No commit message."): will set the text to
## whatever given ``msg`` if the current text is empty.
##
## Additionally, you can `pipe` the provided filters, for instance:
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
#body_process = noop
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip


## ``subject_process`` is a callable
##
## This callable will be given the original subject and result will
## be used in the changelog.
##
## Available constructs are those listed in ``body_process`` doc.
subject_process = (strip |
ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
SetIfEmpty("No commit message.") | ucfirst | final_dot)


## ``tag_filter_regexp`` is a regexp
##
## Tags that will be used for the changelog must match this regexp.
##
#tag_filter_regexp = r'^v?[0-9]+\.[0-9]+(\.[0-9]+)?$'
#tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'
tag_filter_regexp = r'.*?$' # accept funky tag strings


## ``unreleased_version_label`` is a string or a callable that outputs a string
##
## This label will be used as the changelog Title of the last set of changes
## between last valid tag and HEAD if any.
#unreleased_version_label = "(unreleased)"
unreleased_version_label = lambda: swrap(
["git", "describe", "--tags"],
shell=False,
)


## ``output_engine`` is a callable
##
## This will change the output format of the generated changelog file
##
## Available choices are:
##
## - rest_py
##
## Legacy pure python engine, outputs ReSTructured text.
## This is the default.
##
## - mustache(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mustache/*.tpl``.
## Requires python package ``pystache``.
## Examples:
## - mustache("markdown")
## - mustache("restructuredtext")
##
## - makotemplate(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mako/*.tpl``.
## Requires python package ``mako``.
## Examples:
## - makotemplate("restructuredtext")
##
output_engine = rest_py
#output_engine = mustache("restructuredtext")
#output_engine = mustache("markdown")
#output_engine = makotemplate("restructuredtext")


## ``include_merge`` is a boolean
##
## This option tells git-log whether to include merge commits in the log.
## The default is to include them.
include_merge = True


## ``log_encoding`` is a string identifier
##
## This option tells gitchangelog what encoding is outputed by ``git log``.
## The default is to be clever about it: it checks ``git config`` for
## ``i18n.logOutputEncoding``, and if not found will default to git's own
## default: ``utf-8``.
#log_encoding = 'utf-8'


## ``publish`` is a callable
##
## Sets what ``gitchangelog`` should do with the output generated by
## the output engine. ``publish`` is a callable taking one argument
## that is an interator on lines from the output engine.
##
## Some helper callable are provided:
##
## Available choices are:
##
## - stdout
##
## Outputs directly to standard output
## (This is the default)
##
## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start(), flags)
##
## Creates a callable that will parse given file for the given
## regex pattern and will insert the output in the file.
## ``idx`` is a callable that receive the matching object and
## must return a integer index point where to insert the
## the output in the file. Default is to return the position of
## the start of the matched string.
##
## - FileRegexSubst(file, pattern, replace, flags)
##
## Apply a replace inplace in the given file. Your regex pattern must
## take care of everything and might be more complex. Check the README
## for a complete copy-pastable example.
##
# publish = FileInsertAtFirstRegexMatch(
# "CHANGELOG.rst",
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
# idx=lambda m: m.start(1)
# )
#publish = stdout


## ``revs`` is a list of callable or a list of string
##
## callable will be called to resolve as strings and allow dynamical
## computation of these. The result will be used as revisions for
## gitchangelog (as if directly stated on the command line). This allows
## to filter exaclty which commits will be read by gitchangelog.
##
## To get a full documentation on the format of these strings, please
## refer to the ``git rev-list`` arguments. There are many examples.
##
## Using callables is especially useful, for instance, if you
## are using gitchangelog to generate incrementally your changelog.
##
## Some helpers are provided, you can use them::
##
## - FileFirstRegexMatch(file, pattern): will return a callable that will
## return the first string match for the given pattern in the given file.
## If you use named sub-patterns in your regex pattern, it'll output only
## the string matching the regex pattern named "rev".
##
## - Caret(rev): will return the rev prefixed by a "^", which is a
## way to remove the given revision and all its ancestor.
##
## Please note that if you provide a rev-list on the command line, it'll
## replace this value (which will then be ignored).
##
## If empty, then ``gitchangelog`` will act as it had to generate a full
## changelog.
##
## The default is to use all commits to make the changelog.
#revs = ["^1.0.3", ]
#revs = [
# Caret(
# FileFirstRegexMatch(
# "CHANGELOG.rst",
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
# "HEAD"
#]
revs = []
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Smoke

on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
python_wheels:
name: Python wheels for ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
PYTHONIOENCODING: utf-8
PIP_DOWNLOAD_CACHE: ${{ github.workspace }}/../.pip_download_cache
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
python-version: [3.9, '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Add requirements
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions

- name: Install Ubuntu build deps
run: |
sudo apt-get -qq update
sudo apt-get install -y libre2-dev

- name: Test using pip install
run: |
tox
env:
PLATFORM: ${{ matrix.os }}

- name: Build sdist and wheel pkgs
run: |
tox -e build,check
Loading