Skip to content

Commit 224eaf1

Browse files
authored
Merge pull request #333 from deeppavlov/dev
Release v0.7.0
2 parents 18908d0 + 1042493 commit 224eaf1

File tree

139 files changed

+8649
-2036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+8649
-2036
lines changed

.coveragerc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.dockerignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
*.DS_Store*
22
*.egg-info/
33
dist/
4-
venv/
54
build/
65
docs/source/apiref
76
docs/source/_misc
@@ -22,9 +21,9 @@ GlobalUserTableAccessor*
2221
memory_debugging*
2322
opening_database*
2423
_globals.py
25-
venv*
2624
.vscode
2725
.coverage
26+
.coverage.*
2827
.pytest_cache
2928
htmlcov
3029
tutorials/context_storages/dbs

.env_file

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
TG_BOT_TOKEN=token
12
MYSQL_USERNAME=root
23
MYSQL_PASSWORD=pass
34
MYSQL_ROOT_PASSWORD=pass

.github/process_github_events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def post_comment_on_pr(comment: str, pr_number: int):
4646
Here's a release checklist:
4747
4848
- [ ] Update package version
49+
- [ ] Update `poetry.lock`
4950
- [ ] Change PR merge option
5051
- [ ] Test modules without automated testing:
5152
- [ ] Requiring telegram `api_id` and `api_hash`

.github/workflows/build_and_publish_docs.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,18 @@ jobs:
2323
- uses: actions/checkout@v4
2424

2525
- name: set up python 3.9
26-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2727
with:
2828
python-version: 3.9
2929

30-
- name: Build images
31-
run: |
32-
make docker_up
33-
3430
- uses: r-lib/actions/setup-pandoc@v2
3531
with:
3632
pandoc-version: '3.1.6'
3733

38-
- name: install dependencies
34+
- name: setup poetry and install dependencies
3935
run: |
40-
make venv
36+
python -m pip install --upgrade pip poetry
37+
python -m poetry install --with tutorials,docs --all-extras --no-ansi --no-interaction
4138
4239
- name: build documentation
4340
env:
@@ -46,7 +43,7 @@ jobs:
4643
TG_API_HASH: ${{ secrets.TG_API_HASH }}
4744
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
4845
run: |
49-
make doc
46+
python -m poetry run poe docs
5047
5148
- name: remove jekyll theming
5249
run: touch docs/build/.nojekyll
@@ -62,7 +59,7 @@ jobs:
6259
6360
- name: save artifact
6461
if: ${{ github.ref != 'refs/heads/master' }}
65-
uses: actions/upload-artifact@v3
62+
uses: actions/upload-artifact@v4
6663
with:
6764
name: ${{ format('github-pages-for-branch-{0}', env.BRANCH_NAME) }}
6865
path: docs/build/

.github/workflows/build_and_upload_release.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: build_and_upload_release
22

33
on:
4-
push:
5-
tags:
6-
- '*'
4+
release:
5+
types:
6+
- published
7+
pull_request:
8+
branches:
9+
- dev
10+
- master
711

812
jobs:
913
build:
@@ -14,24 +18,26 @@ jobs:
1418
- uses: actions/checkout@v4
1519

1620
- name: set up python
17-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
1822

19-
- name: install latest pip, setuptools, twine + wheel
23+
- name: setup poetry
2024
run: |
21-
python -m pip install --upgrade pip setuptools twine wheel
25+
python -m pip install --upgrade pip poetry
2226
23-
- name: build wheels
27+
- name: build wheels and test uploading to pypi
28+
if: startsWith(github.ref, 'refs/tags/v') != true
2429
run: |
25-
python setup.py bdist_wheel
26-
python setup.py sdist
30+
python -m poetry --build publish --dry-run
2731
28-
- name: upload to pypi via twine
32+
- name: build wheels and upload to pypi
33+
if: startsWith(github.ref, 'refs/tags/v')
2934
env:
30-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
35+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
3136
run: |
32-
twine upload --verbose -u '__token__' dist/*
37+
python -m poetry --build publish
3338
3439
- name: upload binaries into release
40+
if: startsWith(github.ref, 'refs/tags/v')
3541
uses: svenstaro/upload-release-action@v2
3642
with:
3743
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codestyle.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ jobs:
2222
- uses: actions/checkout@v4
2323

2424
- name: set up python 3.9
25-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: 3.9
2828

29-
- name: install dependencies
29+
- name: setup poetry and install dependencies
3030
run: |
31-
make venv
31+
python -m pip install --upgrade pip poetry
32+
python -m poetry install --with lint --no-ansi --no-interaction
3233
3334
- name: run codestyle
3435
run: |
35-
make lint
36+
python -m poetry run poe lint

.github/workflows/event_handler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: set up python 3.10
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.10"
1919

.github/workflows/test_coverage.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,15 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727

28-
- name: Build images
29-
run: |
30-
make docker_up
31-
3228
- name: set up python 3.10
33-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5
3430
with:
3531
python-version: "3.10"
3632

37-
- name: build & install package
38-
run: |
39-
python -m pip install build
40-
python -m build
41-
find . -name "*.whl" -exec python -m pip install {}[test_full] ';'
42-
43-
- name: clean environment
33+
- name: setup poetry and install dependencies
4434
run: |
45-
export backup_files=( tests tutorials utils .env_file makefile .coveragerc pytest.ini docs )
46-
mkdir /tmp/backup
47-
for i in "${backup_files[@]}" ; do mv "$i" /tmp/backup ; done
48-
rm -rf ..?* .[!.]* *
49-
for i in "${backup_files[@]}" ; do mv "/tmp/backup/$i" . ; done
50-
rm -rf /tmp/backup
51-
touch venv # disable venv target
35+
python -m pip install --upgrade pip poetry
36+
python -m poetry install --with test,tutorials --all-extras --no-ansi --no-interaction
5237
5338
- name: run tests
5439
env:
@@ -57,4 +42,4 @@ jobs:
5742
TG_API_HASH: ${{ secrets.TG_API_HASH }}
5843
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
5944
run: |
60-
make test TEST_ALLOW_SKIP=telegram
45+
python -m poetry run poe test_all

.github/workflows/test_full.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,15 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v4
2929

30-
- name: Build images
31-
if: matrix.os == 'ubuntu-latest'
32-
run: |
33-
make docker_up
34-
3530
- name: set up python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
3732
with:
3833
python-version: ${{ matrix.python-version }}
3934

4035
- name: install dependencies
4136
run: |
42-
python -m pip install --upgrade pip
43-
python -m pip install -e .[test_full]
44-
shell: bash
37+
python -m pip install --upgrade pip poetry
38+
python -m poetry install --with test,tutorials --all-extras --no-ansi --no-interaction
4539
4640
- name: run pytest
4741
env:
@@ -50,32 +44,22 @@ jobs:
5044
TG_API_HASH: ${{ secrets.TG_API_HASH }}
5145
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
5246
run: |
53-
if [ "$RUNNER_OS" == "Linux" ]; then
54-
source <(cat .env_file | sed 's/=/=/' | sed 's/^/export /')
55-
pytest --tb=long -vv --cache-clear --no-cov --allow-skip=telegram tests/
56-
else
57-
pytest -m "not docker" --tb=long -vv --cache-clear --no-cov --allow-skip=telegram,docker tests/
58-
fi
59-
shell: bash
47+
python -m poetry run poe test_no_cov
48+
6049
test_no_deps:
6150
runs-on: "ubuntu-latest"
6251
steps:
6352
- uses: actions/checkout@v4
6453

65-
- name: Build images
66-
run: |
67-
make docker_up
68-
6954
- name: set up python 3.8
70-
uses: actions/setup-python@v4
55+
uses: actions/setup-python@v5
7156
with:
7257
python-version: 3.8
7358

7459
- name: install dependencies
7560
run: |
76-
python -m pip install --upgrade pip
77-
python -m pip install -e .[tests]
78-
shell: bash
61+
python -m pip install --upgrade pip poetry
62+
python -m poetry install --with test --no-ansi --no-interaction
7963
8064
- name: run pytest
8165
env:
@@ -84,6 +68,4 @@ jobs:
8468
TG_API_HASH: ${{ secrets.TG_API_HASH }}
8569
TG_BOT_USERNAME: ${{ secrets.TG_BOT_USERNAME }}
8670
run: |
87-
source <(cat .env_file | sed 's/=/=/' | sed 's/^/export /')
88-
pytest --tb=long -vv --cache-clear --no-cov --allow-skip=all tests/
89-
shell: bash
71+
python -m poetry run poe test_no_deps

0 commit comments

Comments
 (0)