diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1f9222f..4ed47f0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.8 uses: actions/setup-python@v2 @@ -73,32 +73,34 @@ jobs: continue-on-error: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Setup Conda - uses: s-weigand/setup-conda@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 with: - # Whether to activate the conda base env (Default: 'true') - activate-conda: true - # If conda should be updated before running other commands (Default: 'false') - update-conda: true - # Python version which should be installed with conda (default: 'Default') python-version: 3.8 - name: Install Workflow dependencies run: | python -m pip install --upgrade pip pip install wheel - - - name: Brew graphviz + + - name: Install graphviz for visualization test if: ${{ runner.os == 'macOS' }} - run: | - brew install graphviz - # execute dot - dot -V - sudo dot -c + uses: ts-graphviz/setup-graphviz@v2 + with: + macos-skip-brew-update: 'true' # default false - - name: install graphviz for visualization test + - name: Setup Conda + if: ${{ runner.os == 'Windows' }} + uses: s-weigand/setup-conda@v1 + with: + # Whether to activate the conda base env (Default: 'true') + activate-conda: true + # Python version which should be installed with conda (default: 'Default') + python-version: 3.8 + + - name: Install graphviz via conda if: ${{ runner.os == 'Windows' }} run: | conda install -c anaconda graphviz @@ -109,7 +111,6 @@ jobs: # should give base conda python $python=Get-Command python $pypath=Split-Path $python.Source -Parent - # Add to PATH, we know pypath is on it $dot=[IO.Path]::Combine($pypath, 'Library', 'bin', 'graphviz') echo $dot | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append diff --git a/requirements.txt b/requirements.txt index 1bf1bad..7e53bb8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ graphviz~=0.20 hypothesis~=6.82.0 -psycopg2~=2.9.6 +psycopg2-binary~=2.9.6 python-benedict~=0.32.0 python-benedict[xml]~=0.32.0 pytest~=7.4.0 diff --git a/setup.py b/setup.py index 06c437e..fc50a90 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ def read_files(files, delim: str = "\n") -> str: license='GPLv3', packages=['tdvisu'], platforms='any', - install_requires=['graphviz', 'psycopg2', 'python-benedict', 'python-benedict[xml]', 'PyYAML'], + install_requires=['graphviz', 'psycopg2-binary', 'python-benedict', 'python-benedict[xml]', 'PyYAML'], extras_require={'test': tests_require}, classifiers=classifiers, keywords='graph visualization dynamic-programming msol-solver')