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

Feat/build with poetry #132

Merged
merged 109 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 106 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
def7f79
versions frozen
pseusys Apr 27, 2023
5297d20
Merge branch 'dev' of https://github.com/deeppavlov/dialog_flow_frame…
pseusys Apr 27, 2023
c6c4acf
example poetry
pseusys May 18, 2023
196d52a
typos fixed
pseusys May 18, 2023
3d2fe11
poetry scripts
pseusys May 19, 2023
7e99cf4
all scripts ready
pseusys May 23, 2023
1274497
github actions updated
pseusys May 23, 2023
d0be96a
linting fixed
pseusys May 24, 2023
2db1ea8
remove get_extra_deps_line_number
RLKRo May 30, 2023
38774fe
Merge branch 'docs/remove-setup-deps' into feat/build_with_poetry
RLKRo May 30, 2023
36881af
add inplace patching for sphinx
RLKRo May 30, 2023
4388be4
codestyle
RLKRo May 30, 2023
70fa969
add dependencies required for poetry
RLKRo May 30, 2023
1d59d63
fix coverage job
RLKRo May 30, 2023
4052d98
separate doc and test; add test_no_cov
RLKRo Jun 1, 2023
c7841bb
change called script in jobs; modify dff installation
RLKRo Jun 1, 2023
566b7ff
Merge branch 'dev' into feat/build_with_poetry
pseusys Sep 26, 2023
7ad74d0
dependencies update
pseusys Sep 26, 2023
079f9c9
lint applied
pseusys Sep 27, 2023
dd3f53f
tests + docs fixed
pseusys Sep 27, 2023
9be69cf
Merge branch 'dev' into feat/build_with_poetry
pseusys Sep 27, 2023
0b76cc7
versions updated
pseusys Sep 27, 2023
61e8088
scripting fixed
pseusys Sep 27, 2023
3af41e7
actions updated
pseusys Sep 27, 2023
eda63da
attempt to fix test_full
pseusys Sep 27, 2023
c8be148
docker client adapted
pseusys Sep 27, 2023
020ce8d
docker context manager once again updated
pseusys Sep 27, 2023
2a735e3
tests no deps fixed
pseusys Sep 27, 2023
e36b291
coverage test fixed
pseusys Sep 27, 2023
ec90648
setuptools added
pseusys Sep 27, 2023
a1e8510
test coverage poetry install added
pseusys Sep 27, 2023
0ae263c
all dependencies added
pseusys Sep 27, 2023
da5d469
test coverage now in main
pseusys Sep 27, 2023
fcb0424
backup files fixed + build and upload fail added
pseusys Sep 27, 2023
0018153
context manager replaced with decorator (better)
pseusys Sep 27, 2023
0786c98
1 return added
pseusys Sep 27, 2023
2992b76
add patch to suppress logger
RLKRo Sep 27, 2023
b4d2742
Merge branch 'dev' into feat/build_with_poetry
pseusys Sep 29, 2023
193b5cd
new dependencies
pseusys Sep 29, 2023
fa1c7f9
all extras
pseusys Sep 29, 2023
4d3f23e
docker quiet + containers always down
pseusys Sep 29, 2023
0fbb421
specified exception
pseusys Sep 29, 2023
7d878ee
relint
pseusys Sep 29, 2023
b89cb58
reformatted
pseusys Sep 29, 2023
014eb14
poetry scripts return ints
pseusys Sep 29, 2023
03c8de4
benchmark added to coverage
pseusys Sep 29, 2023
89244fa
test full no coverage
pseusys Sep 29, 2023
4e40242
image building postponed
pseusys Sep 29, 2023
2382191
otel volumes path fixed
pseusys Sep 29, 2023
c8dd12d
image build placing reverted
pseusys Sep 29, 2023
60897b9
building removed
pseusys Sep 29, 2023
92b6ba6
lint removed from coverage
pseusys Sep 29, 2023
df22a26
tests deps fixed
pseusys Sep 29, 2023
6d890d5
poetry tests docker added
pseusys Sep 29, 2023
361ffe3
tqdm added to benchmark
pseusys Sep 29, 2023
b674b28
iploading fixed
pseusys Oct 3, 2023
2e9af33
pypi token added
pseusys Oct 3, 2023
d02b683
Merge branch 'dev' into feat/build_with_poetry
pseusys Oct 3, 2023
70686fb
scripts updated
pseusys Oct 3, 2023
f268933
lint + dry build
pseusys Oct 3, 2023
b44aabc
build with publish + dirs exist ok
pseusys Oct 3, 2023
0c409d0
apt -> apt-get + glob -> pathlib
pseusys Oct 3, 2023
02b0485
fix bumpversion
RLKRo Oct 10, 2023
1069a93
contributing changed
pseusys Nov 8, 2023
f3c9e14
Merge branch 'feat/build_with_poetry' of https://github.com/deeppavlo…
pseusys Nov 8, 2023
9889c18
some reviews addressed
pseusys Nov 8, 2023
89e2a52
Merge branch 'dev' into feat/build_with_poetry
pseusys Nov 8, 2023
63852db
pyproject updated to 0.6.1
pseusys Nov 8, 2023
1121cce
lint applied
pseusys Nov 8, 2023
c049d87
docker compose call updated
pseusys Nov 8, 2023
bfda20d
test_ch exception check
pseusys Nov 8, 2023
9ef23c8
test tutorials exception check
pseusys Nov 8, 2023
56e1a96
exception in rows
pseusys Nov 8, 2023
bf3196a
assert reverted
pseusys Nov 8, 2023
0eea0d2
some comments fixed
pseusys Nov 8, 2023
1db01d2
restricted, docker tests run on windows
pseusys Nov 8, 2023
1b9c1be
docker any platform reverted
pseusys Nov 8, 2023
59dffc6
versions commenting started
pseusys Nov 10, 2023
5b709df
Merge branch 'dev' into feat/build_with_poetry
pseusys Nov 10, 2023
da5fe00
codestyle comments added
pseusys Nov 10, 2023
259ef7e
extras -> groups
pseusys Nov 10, 2023
e870927
lint applied
pseusys Nov 10, 2023
506ec20
comment added
pseusys Nov 10, 2023
a4ccca1
poethepoet introduced
pseusys Nov 10, 2023
e809853
poe added as lib in poetry
pseusys Nov 10, 2023
51645ff
default script type changed
pseusys Nov 10, 2023
42ec6e1
codestyle fixed
pseusys Nov 10, 2023
a17a67a
extract dff version from importlib
RLKRo Nov 23, 2023
52257e5
add emails; merge maintainers with authors
RLKRo Nov 23, 2023
43b5fc4
Merge branch 'dev' into feat/build_with_poetry
RLKRo Nov 23, 2023
1d3c611
Merge branch 'dev' into feat/build_with_poetry
RLKRo Dec 14, 2023
2b34962
rework codestyle && fix codestyle
RLKRo Dec 14, 2023
9dce7b5
remove docker-compose usage
RLKRo Dec 14, 2023
3b83a14
fix test_coverage && update includes and excludes
RLKRo Dec 14, 2023
7877e0f
remove lint from tests
RLKRo Dec 14, 2023
50d096e
replace returns with exits in scripts
RLKRo Dec 14, 2023
4dc6153
move coverage config to pyproject.toml
RLKRo Dec 14, 2023
db4fadb
freeze coverage version
RLKRo Dec 14, 2023
0ba7785
add poetry lock to git
RLKRo Dec 14, 2023
0fc84c4
update poetry lock && add information about poetry lock updates
RLKRo Dec 14, 2023
c6b151e
update ignore files
RLKRo Dec 14, 2023
3ffccaf
make devel group required
RLKRo Dec 14, 2023
d5d0747
update dff version
RLKRo Dec 14, 2023
eb9b384
remove redundant groups from workflows
RLKRo Dec 14, 2023
af0eeef
keep poetry.lock during cleaning
RLKRo Dec 14, 2023
fe2738a
unfreeze and update devel deps
RLKRo Dec 15, 2023
3f71947
freeze urllib only in devel
RLKRo Dec 15, 2023
93beae9
replace exclude_lines with exclude_also
RLKRo Dec 19, 2023
37db249
add python -m for workflows commands
RLKRo Dec 19, 2023
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
15 changes: 0 additions & 15 deletions .coveragerc
RLKRo marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*.DS_Store*
*.egg-info/
dist/
venv/
build/
docs/source/apiref
docs/source/_misc
Expand All @@ -22,9 +21,9 @@ GlobalUserTableAccessor*
memory_debugging*
opening_database*
_globals.py
venv*
.vscode
.coverage
.coverage.*
.pytest_cache
htmlcov
tutorials/context_storages/dbs
Expand Down
1 change: 1 addition & 0 deletions .github/process_github_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def post_comment_on_pr(comment: str, pr_number: int):
Here's a release checklist:

- [ ] Update package version
- [ ] Update `poetry.lock`
- [ ] Change PR merge option
- [ ] Test modules without automated testing:
- [ ] Requiring telegram `api_id` and `api_hash`
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/build_and_publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@ jobs:
with:
python-version: 3.9

- name: Build images
run: |
make docker_up

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '3.1.6'

- name: install dependencies
- name: setup poetry and install dependencies
run: |
make venv
pip install --upgrade pip poetry
poetry install --with tutorials,docs --all-extras --no-ansi --no-interaction

- name: build documentation
env:
Expand All @@ -46,7 +43,7 @@ jobs:
TG_API_HASH: ${{ secrets.TG_API_HASH }}
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
run: |
make doc
poetry run poe docs

- name: remove jekyll theming
run: touch docs/build/.nojekyll
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/build_and_upload_release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: build_and_upload_release

on:
push:
tags:
- '*'
release:
types:
- published
pull_request:
branches:
- dev
- master

jobs:
build:
Expand All @@ -16,22 +20,24 @@ jobs:
- name: set up python
uses: actions/setup-python@v4

- name: install latest pip, setuptools, twine + wheel
- name: setup poetry
run: |
python -m pip install --upgrade pip setuptools twine wheel
pip install --upgrade pip poetry

- name: build wheels
- name: build wheels and test uploading to pypi
if: startsWith(github.ref, 'refs/tags/v') != true
run: |
python setup.py bdist_wheel
python setup.py sdist
poetry --build publish --dry-run

- name: upload to pypi via twine
- name: build wheels and upload to pypi
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload --verbose -u '__token__' dist/*
poetry --build publish

- name: upload binaries into release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:
with:
python-version: 3.9

- name: install dependencies
- name: setup poetry and install dependencies
run: |
make venv
pip install --upgrade pip poetry
poetry install --with lint --no-ansi --no-interaction

- name: run codestyle
run: |
make lint
poetry run poe lint
23 changes: 4 additions & 19 deletions .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build images
run: |
make docker_up

- name: set up python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: build & install package
run: |
python -m pip install build
python -m build
find . -name "*.whl" -exec python -m pip install {}[test_full] ';'

- name: clean environment
- name: setup poetry and install dependencies
run: |
export backup_files=( tests tutorials utils .env_file makefile .coveragerc pytest.ini docs )
mkdir /tmp/backup
for i in "${backup_files[@]}" ; do mv "$i" /tmp/backup ; done
rm -rf ..?* .[!.]* *
for i in "${backup_files[@]}" ; do mv "/tmp/backup/$i" . ; done
rm -rf /tmp/backup
touch venv # disable venv target
pip install --upgrade pip poetry
poetry install --with test,tutorials --all-extras --no-ansi --no-interaction

- name: run tests
env:
Expand All @@ -57,4 +42,4 @@ jobs:
TG_API_HASH: ${{ secrets.TG_API_HASH }}
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
run: |
make test TEST_ALLOW_SKIP=telegram
poetry run poe test_all
32 changes: 7 additions & 25 deletions .github/workflows/test_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build images
if: matrix.os == 'ubuntu-latest'
run: |
make docker_up

- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test_full]
shell: bash
pip install --upgrade pip poetry
poetry install --with test,tutorials --all-extras --no-ansi --no-interaction

- name: run pytest
env:
Expand All @@ -50,32 +44,22 @@ jobs:
TG_API_HASH: ${{ secrets.TG_API_HASH }}
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
source <(cat .env_file | sed 's/=/=/' | sed 's/^/export /')
pytest --tb=long -vv --cache-clear --no-cov --allow-skip=telegram tests/
else
pytest -m "not docker" --tb=long -vv --cache-clear --no-cov --allow-skip=telegram,docker tests/
fi
shell: bash
poetry run poe test_no_cov

test_no_deps:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4

- name: Build images
run: |
make docker_up

- name: set up python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[tests]
shell: bash
pip install --upgrade pip poetry
poetry install --with test --no-ansi --no-interaction

- name: run pytest
env:
Expand All @@ -84,6 +68,4 @@ jobs:
TG_API_HASH: ${{ secrets.TG_API_HASH }}
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
run: |
source <(cat .env_file | sed 's/=/=/' | sed 's/^/export /')
pytest --tb=long -vv --cache-clear --no-cov --allow-skip=all tests/
shell: bash
poetry run poe test_no_deps
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*.DS_Store*
*.egg-info/
dist/
venv/
build/
docs/source/apiref
docs/source/_misc
Expand All @@ -22,9 +21,9 @@ GlobalUserTableAccessor*
memory_debugging*
opening_database*
_globals.py
venv*
.vscode
.coverage
.coverage.*
.pytest_cache
htmlcov
tutorials/context_storages/dbs
Expand Down
Loading
Loading