Skip to content

Commit

Permalink
Better os compatibility (#21)
Browse files Browse the repository at this point in the history
* fixing tensorflow requirement on mac

* trying to get tests working on different os

* simplifying pip installs

* fixing windows pip install readme read

* install requirements one line at a time

* modifying constraints on requirements

* modifying constraints on requirements

* apparently tensorflow-macos is only supported for python 3.8-3.10

* reverting to previous method for installing requirements

* bumping version number
  • Loading branch information
htjb authored Jul 24, 2023
1 parent dce5bb0 commit fd89b48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -27,7 +28,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Introduction

:globalemu: Robust Global 21-cm Signal Emulation
:Author: Harry Thomas Jones Bevins
:Version: 1.7.3
:Version: 1.8.0
:Homepage: https://github.com/htjb/globalemu
:Documentation: https://globalemu.readthedocs.io/

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
numpy
tensorflow
tensorflow-macos; sys_platform == 'darwin'
tensorflow; sys_platform != 'darwin'
pandas
matplotlib
Pillow
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

def readme(short=False):
with open('README.rst') as f:
with open('README.rst', encoding='utf-8') as f:
if short:
return f.readlines()[1].strip()
else:
Expand Down

0 comments on commit fd89b48

Please sign in to comment.