Skip to content

Commit 49ed33e

Browse files
authored
Merge pull request #203 from djotaku/fix-teamupdates
Fixing team info not updating
2 parents d8f6312 + 0b2d9a0 commit 49ed33e

File tree

6 files changed

+30
-10
lines changed

6 files changed

+30
-10
lines changed

.github/workflows/linttest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v1
12-
- name: Set up Python 3.10.5
12+
- name: Set up Python 3.10.8
1313
uses: actions/setup-python@v1
1414
with:
15-
python-version: 3.10.5
15+
python-version: 3.10.8
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip

.github/workflows/windowsbuild.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v1
12-
- name: Set up Python 3.10.5
12+
- name: Set up Python 3.10.8
1313
uses: actions/setup-python@v1
1414
with:
15-
python-version: 3.10.5
15+
python-version: 3.10.8
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip

eldonationtracker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
22

3-
__version__ = "7.4.8"
3+
__version__ = "7.4.9"
44

55
base_api_url: str = "https://www.extra-life.org/api"
66
api_version_suffix: str = "?version=1.2"

eldonationtracker/api/participant.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ def __init__(self, config):
4040
self._donors_to_display) = self.config.get_cli_values()
4141
donor_drive_participant.Participant.__init__(self, self._extralife_id, self._text_folder, self._currency_symbol,
4242
self._team_id, self._donors_to_display, base_api_url)
43+
if self.team_id:
44+
self._my_team = team.Team(self.team_id, self.text_folder, self.currency_symbol, self.donors_to_display,
45+
self._base_api_url)
46+
47+
def set_config_values(self) -> None:
48+
"""Set participant values, create URLs, and create Team."""
49+
# urls
50+
self._participant_url = f"{self._base_api_url}/participants/{self.donor_drive_id}"
51+
self._donation_url = f"{self.participant_url}/donations"
52+
self._participant_donor_url = f"{self.participant_url}/donors"
53+
self._badge_url = f"{self.participant_url}/badges"
54+
self._milestone_url = f"{self.participant_url}/milestones"
55+
self._incentive_url = f"{self.participant_url}/incentives"
56+
self._activity_url = f"{self.participant_url}/activity"
57+
58+
if self.team_id:
59+
self._my_team = team.Team(self.team_id, self.text_folder, self.currency_symbol, self.donors_to_display,
60+
self._base_api_url)
4361

4462
def output_participant_data(self) -> None: # pragma: no cover
4563
"""Format participant data and write to text files for use by OBS or XSplit.
@@ -92,13 +110,15 @@ def output_milestone_data(self) -> None: # pragma: no cover
92110
}
93111
self.write_text_files(milestone_output)
94112

95-
def output_incentive_data(self) -> None: # pragma: no cover
113+
def output_incentive_data(self) -> None: # pragma: no cover
96114
"""Write out the incentive data to a text file."""
97115
if not self.incentives:
98116
return
99117
for incentive in self.incentives:
100118
incentive_folder = f"{self.text_folder}incentives/{incentive.incentive_id}"
101-
incentive_dictionary = {"amount": str(incentive.amount), "description": incentive.description, "quantity": str(incentive.quantity), "quantity_claimed": str(incentive.quantity_claimed)}
119+
incentive_dictionary = {"amount": str(incentive.amount), "description": incentive.description,
120+
"quantity": str(incentive.quantity),
121+
"quantity_claimed": str(incentive.quantity_claimed)}
102122

103123
extralife_io.write_text_files(incentive_dictionary, incentive_folder)
104124
if incentive.incentive_image_url:

eldonationtracker/ui/call_main_gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
from PyQt5.QtWidgets import (QApplication, QInputDialog, QMainWindow,
1111
QMessageBox)
1212

13+
import eldonationtracker.api.participant as participant
1314
import eldonationtracker.utils.update_available
1415
from eldonationtracker import file_logging
15-
from eldonationtracker.api import participant as participant
1616
from eldonationtracker.ui import (call_about, call_logs, call_settings,
1717
call_tracker)
1818
from eldonationtracker.ui import main_gui as design
@@ -27,7 +27,7 @@ class ELDonationGUI(QMainWindow, design.Ui_MainWindow):
2727
"""The main ui Window."""
2828

2929
def __init__(self):
30-
"""Setup the GUI.
30+
"""Set up the GUI.
3131
3232
Set up QTimers:
3333
1) to allow the text on the GUI to update without blocking the user from interacting with the GUI.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ coverage==6.4.1
1313
dill==0.3.5.1
1414
distlib==0.3.4
1515
docutils==0.18.1
16-
donordrivepython==1.4.4
16+
donordrivepython==1.4.5
1717
filelock==3.7.1
1818
identify==2.5.1
1919
idna==3.3

0 commit comments

Comments
 (0)