Skip to content

Commit f932246

Browse files
authored
Merge branch 'dev' into feat/sklearn_scorer
2 parents 0a48e3c + 31205c4 commit f932246

File tree

202 files changed

+11741
-4396
lines changed

Some content is hidden

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

202 files changed

+11741
-4396
lines changed

.github/workflows/build-docs.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build and publish docs
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
branches:
9+
- dev
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/dev' }}
15+
16+
permissions:
17+
contents: write
18+
19+
jobs:
20+
publish:
21+
name: build and publish docs
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: set up python 3.10
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.10"
30+
31+
- name: setup poetry
32+
run: |
33+
curl -sSL https://install.python-poetry.org | python -
34+
35+
- name: Install pandoc
36+
run: |
37+
sudo apt install pandoc
38+
39+
- name: install dependencies
40+
run: |
41+
poetry install --with docs
42+
43+
- name: Test documentation
44+
run: |
45+
make test-docs
46+
47+
- name: build documentation
48+
run: |
49+
make docs
50+
51+
- name: save branch name without slashes
52+
env:
53+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
54+
run: |
55+
BRANCH_NAME=${{ env.BRANCH_NAME }}
56+
BRANCH_NAME=${BRANCH_NAME////_}
57+
echo BRANCH_NAME=${BRANCH_NAME} >> $GITHUB_ENV
58+
59+
- name: Upload artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: ${{ format('github-pages-for-branch-{0}', env.BRANCH_NAME) }}
63+
path: docs/build/
64+
retention-days: 3
65+
66+
- name: Deploy to GitHub Pages
67+
uses: JamesIves/[email protected]
68+
if: ${{ github.ref == 'refs/heads/dev' }}
69+
with:
70+
branch: gh-pages
71+
folder: docs/build/html/
72+
single-commit: True

.github/workflows/ruff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v4
8-
- uses: chartboost/ruff-action@v1
8+
- uses: astral-sh/ruff-action@v1
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: test inference
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
branches:
9+
- dev
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
python-version: [ "3.10", "3.11", "3.12" ]
19+
include:
20+
- os: windows-latest
21+
python-version: "3.10"
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: "pip"
32+
33+
- name: Install dependencies
34+
run: |
35+
pip install .
36+
pip install pytest pytest-asyncio
37+
38+
- name: Run tests
39+
run: |
40+
pytest tests/pipeline/test_inference.py
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Tests
1+
name: test nodes
22

33
on:
44
push:
@@ -37,4 +37,4 @@ jobs:
3737
3838
- name: Run tests
3939
run: |
40-
pytest
40+
pytest tests/nodes
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: test optimization
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
branches:
9+
- dev
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
python-version: [ "3.10", "3.11", "3.12" ]
19+
include:
20+
- os: windows-latest
21+
python-version: "3.10"
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: "pip"
32+
33+
- name: Install dependencies
34+
run: |
35+
pip install .
36+
pip install pytest pytest-asyncio
37+
38+
- name: Run tests
39+
run: |
40+
pytest tests/pipeline/test_optimization.py

.github/workflows/unit-tests.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: unit tests
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
branches:
9+
- dev
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
python-version: [ "3.10", "3.11", "3.12" ]
19+
include:
20+
- os: windows-latest
21+
python-version: "3.10"
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: "pip"
32+
33+
- name: Install dependencies
34+
run: |
35+
pip install .
36+
pip install pytest pytest-asyncio
37+
38+
- name: Run tests
39+
run: |
40+
pytest --ignore=tests/nodes --ignore=tests/pipeline

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ instance/
6969
.scrapy
7070

7171
# Sphinx documentation
72-
docs/_build/
72+
docs/build/
73+
docs/source/autoapi
74+
docs/source/tutorials
7375

7476
# PyBuilder
7577
.pybuilder/

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"ruff.configuration": "pyproject.toml"
2+
"ruff.configuration": "pyproject.toml",
3+
"python.analysis.extraPaths": [
4+
"./docs/source"
5+
]
36
}

CONTRIBUTING.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,16 @@ embedder_batch_size: 32
8383
4. Запускаем с конфиг файлом config.yaml:
8484
```bash
8585
autointent --config-path FULL_PATH/test_config --config-name config
86-
```
86+
```
87+
88+
## Построение документации
89+
90+
Построить html версию в папке `docs/build`:
91+
```bash
92+
make docs
93+
```
94+
95+
Построить html версию и захостить локально:
96+
```bash
97+
make serve-docs
98+
```

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ poetry = poetry run
33

44
.PHONY: install
55
install:
6-
poetry install --with dev,test,lint,typing
6+
poetry install --with dev,test,lint,typing,docs
77

88
.PHONY: test
99
test:
@@ -22,5 +22,21 @@ lint:
2222
$(poetry) ruff format
2323
$(poetry) ruff check --fix
2424

25+
.PHONY: sync
26+
sync:
27+
poetry install --sync --with dev,test,lint,typing,docs
28+
29+
.PHONY: docs
30+
docs:
31+
$(poetry) python -m sphinx build -b html docs/source docs/build/html
32+
33+
.PHONY: test-docs
34+
test-docs: docs
35+
$(poetry) python -m sphinx build -b doctest docs/source docs/build/html
36+
37+
.PHONY: serve-docs
38+
serve-docs: docs
39+
$(poetry) python -m http.server -d docs/build/html 8333
40+
2541
.PHONY: all
2642
all: lint

0 commit comments

Comments
 (0)