Skip to content

Commit

Permalink
Update the insights workflows and examples. (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jteijema authored Sep 26, 2024
1 parent 1abe5ef commit ccb8783
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
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
10 changes: 6 additions & 4 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")

0 comments on commit ccb8783

Please sign in to comment.