Skip to content

Commit

Permalink
Merge pull request #39 from AavHRF/master
Browse files Browse the repository at this point in the history
Various changes inc. bugfix
  • Loading branch information
AavHRF authored Apr 10, 2023
2 parents 59d5313 + 2ac1e17 commit 359621b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ jobs:
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'

- name: Build with pyInstaller
run: |
Expand Down
33 changes: 33 additions & 0 deletions installers/install_spyglass.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/zsh

echo "Installing Spyglass..."
# Get the latest version of Spyglass
git clone https://github.com/Derpseh/Spyglass.git
cd Spyglass

# Check out the latest tag (the latest release)
# NOTE: Hardcoding this to v3.0.1 for now because releases after that
# are not considered stable. Leaving in my tag search code for now though.
# git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) # Uncomment this line to get the latest release
git checkout 3.0.1

py3=$(python3 --version)
# Check if python 3 is 3.9 or higher
if [[ $py3 == *"3.9"* || $py3 == *"3.10"* || $py3 == *"3.11"* ]]; then
echo "Python 3.9 or higher detected."
else
echo "Python 3.9 or higher not detected. Please install Python 3.9 or higher."
exit 1
fi

# Check to see if the user wants a virtual environment
read -q "REPLY?Do you want to create a virtual environment? (y/n) "
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Creating virtual environment..."
python3 -m venv venv
source venv/bin/activate
fi

# Install requirements
pip install -r requirements.txt
2 changes: 1 addition & 1 deletion spyglass.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def sanitize(string: str) -> Optional[str]:

for region in regions:
CumuNatList.append(CumuNatList[-1] + region["num_nations"])
region.update({"cumu_nations": CumuNatList[-1] + region["num_nations"]})
region.update({"cumu_nations": CumuNatList[-1]})
logger.info("Cumulative nation list created!")
logger.info(f"Total number of nations: {CumuNatList[-1]}")

Expand Down

0 comments on commit 359621b

Please sign in to comment.