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

Update the insights workflows and examples. #67

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
12 changes: 6 additions & 6 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ jobs:
name: lint-python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install ruff
Expand All @@ -20,15 +20,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
asr_versions: ['1.0', '1.1', '1.2']
asr_versions: ['1.0', '1.2', '1.4', '1.6']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install packages and run tests
run: |
pip install pytest
pip install asreview[all]==${{ matrix.asr_versions }}
pip install asreview==${{ matrix.asr_versions }}
pip install .
pytest tests
2 changes: 1 addition & 1 deletion docs/example_absolute_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from asreviewcontrib.insights.plot import plot_recall

with open_state("tests/asreview_files/sim_van_de_schoot_2017_1.asreview") as s:
with open_state("tests/asreview_files/sim_van_de_schoot_2017_logistic.asreview") as s:
fig, ax = plt.subplots()
plot_recall(ax, s, x_absolute=True, y_absolute=True)

Expand Down
2 changes: 1 addition & 1 deletion docs/example_custom_title.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from asreviewcontrib.insights.plot import plot_wss

with open_state("tests/asreview_files/sim_van_de_schoot_2017_1.asreview") as s:
with open_state("tests/asreview_files/sim_van_de_schoot_2017_logistic.asreview") as s:
fig, ax = plt.subplots()

plot_wss(ax, s)
Expand Down
12 changes: 7 additions & 5 deletions docs/example_multiple_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@

fig, ax = plt.subplots()

with open_state("tests/asreview_files/sim_van_de_schoot_2017_1.asreview") as s1:
with open_state(
"tests/asreview_files/sim_van_de_schoot_2017_stop_if_min.asreview"
) as s1:
plot_recall(ax, s1)

with open_state(
"tests/asreview_files/" "sim_van_de_schoot_2017_logistic.asreview"
) as s2:
plot_recall(ax, s2)

# Set the labels for the legend. Both plots add the recall line and the random
# line. Hence the recall lines are the 0th and 2nd line.
# Set the labels for the legend. Both plots add the recall line, the random
# curve, and the perfect curve. Hence the recall lines are the 0th and 3nd line.
ax.lines[0].set_label("Naive Bayes")
ax.lines[2].set_label("Logistic")
ax.lines[3].set_label("Logistic")
ax.legend()

fig.savefig("docs/example_multiple_lines.png")
fig.savefig("docs/example_multiple_lines.png")
J535D165 marked this conversation as resolved.
Show resolved Hide resolved