Skip to content

Commit

Permalink
Merge pull request #32 from 15five/logston/migtrate-to-poetry
Browse files Browse the repository at this point in the history
Migrate to Poetry
  • Loading branch information
caleb15 committed Aug 26, 2022
2 parents c794bf3 + 9ed0e94 commit 00651cf
Show file tree
Hide file tree
Showing 17 changed files with 973 additions and 228 deletions.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
exclude = __pycache__,.eggs/,.tox/
max-line-length = 120
max-complexity = 7
ignore =
W391 # blank line at end of file
26 changes: 19 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,41 @@ jobs:

strategy:
matrix:
python-version: ["3.6", "3.7", "3.8"]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox tox-gh-actions
- run: pip install tox tox-gh-actions poetry
- run: tox

flake8:
name: Flake8

runs-on: ubuntu-latest

container:
image: python:3.10-buster

steps:
- uses: actions/checkout@v2
- run: pip install tox poetry
- run: tox -e flake8

coverage:
name: Coverage

runs-on: ubuntu-latest

container:
image: python:3.8-buster
image: python:3.10-buster

steps:
- uses: actions/checkout@v2
- run: pip install coverage codecov
- run: coverage run setup.py test
- run: coverage report -m
- uses: "codecov/codecov-action@v1"
- run: pip install tox poetry
- run: tox -e coverage
- uses: "codecov/codecov-action@v3"
with:
fail_ci_if_error: true
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
CHANGE LOG
==========

0.4.1
-----
- Migrate library to Poetry for development. #32
- Drop support for Python 3.6.

0.4.0
-----
- Update userName to be case insensitive. #31

BREAKING CHANGE: This allows queries that did not match rows before to
match rows now!


0.3.9
-----
- Allow the use of "$" in attribute names. #25
Expand Down
48 changes: 48 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ Installation

pip install scim2-filter-parser

# Or ...

pip install scim2-filter-parser[django-query]

Use
---

Expand Down Expand Up @@ -225,3 +229,47 @@ Development Speed
Since this project is relatively stable, time is only dedicated to it on
Fridays. Thus if you issue a PR, bug, etc, please note that it may take a week
before we get back to you. Thanks you for your patience.

Development
-----------

This project uses Poetry to manage dependencies, etc. Thus to install the
necessary tools when developing, run:

::

poetry install -v --extras "django-query"

Tests
-----

.. |tests| image:: https://github.com/15five/scim2-filter-parser/workflows/CI%2FCD/badge.svg
:target: https://github.com/15five/scim2-filter-parser/actions

https://github.com/15five/scim2-filter-parser/actions

Tests are typically run locally with `tox` (https://tox.wiki/). Tox will test
all supported versions of Python.

```
tox
```

To run the test suite with a single version of Python (the version you created
the virtualenv with), run:

::

poetry run pytest tests/

Coverage
--------

.. |coverage| image:: https://codecov.io/gh/15five/scim2-filter-parser/graph/badge.svg
:target: https://codecov.io/gh/15five/scim2-filter-parser

https://codecov.io/gh/15five/scim2-filter-parser

::

tox -e coverage
1 change: 0 additions & 1 deletion TODO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
- If attr_map value contains a "." and doesn't start with the name of the main table in a Query object, add joins.
- Ensure SQL injection attacks are not used if column names are foreign.
Eg. userName co "paul" and SQLAttack;[type eq 'bad']

0 comments on commit 00651cf

Please sign in to comment.