Skip to content

Commit

Permalink
Merge 8480fc6 into 375b6cc
Browse files Browse the repository at this point in the history
  • Loading branch information
jim22k committed Mar 29, 2021
2 parents 375b6cc + 8480fc6 commit d5720c6
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 71 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/daily_checkup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ env:
jobs:
daily_check:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Setup conda env
- name: Create env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ env.PYVER }}
- name: Update env
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda create -n mg python=${{ env.PYVER }} pytest coverage pytest-cov
conda activate mg
# TODO: remove this hack once no longer needed; without this, tensorflow gets installed incorrectly
# which leads to a segfault
conda install -c stellargraph -c defaults -c conda-forge stellargraph 'tensorflow-base>=2.3.0'
# Install package using latest "dev" versions from metagraph channel
conda install -c ${{ env.CHANNELS }} metagraph-stellargraph
conda install -c ${{ env.CHANNELS }} metagraph-stellargraph metagraph-dev
conda list
- name: Pytest
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate mg
python -c 'import stellargraph'
pytest --pyargs metagraph_stellargraph
python -m metagraph.tests
Expand Down
47 changes: 23 additions & 24 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,40 @@ env:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup conda env
- name: Create env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: mg
environment-file: continuous_integration/environment.yml
- name: Update env
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda install -q conda-build
conda env create -f continuous_integration/environment-${{ env.MAIN_PYVER }}.yml
conda activate mg
pip install -e .
python setup.py develop --no-deps
- name: Lint with Black
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate mg
black --version
black metagraph_stellargraph *.py --check --diff
- name: Pytest
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate mg
python -c 'import grblas; grblas.Matrix'
pytest --pyargs metagraph
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate mg
conda install -c conda-forge coveralls
coveralls --service=github
- name: Conda Build
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda build -c ${{ env.CHANNELS }} --python ${{ env.MAIN_PYVER }} continuous_integration/conda
# This doesn't rebuild, but simply computes the name of the file that was previously built
OUTPUT=$(conda build --output -c ${{ env.CHANNELS }} --python ${{ env.MAIN_PYVER }} continuous_integration/conda)
Expand All @@ -72,21 +70,24 @@ jobs:
strategy:
matrix:
pyver:
- 3.7
- 3.8
defaults:
run:
shell: bash -l {0}
steps:
- name: Download build artifact
uses: actions/download-artifact@v2
with:
name: built_package
path: ./artifact_storage
- name: Setup conda env
- name: Create env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.pyver }}
- name: Update env
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda create -n mg python=${{ matrix.pyver }} pytest coverage pytest-cov
conda activate mg
conda install -c ${{ env.CHANNELS }} metagraph-dev
# TODO: remove this hack once no longer needed; without this, tensorflow gets installed incorrectly
# which leads to a segfault
conda install -c stellargraph -c defaults -c conda-forge stellargraph 'tensorflow-base>=2.3.0'
Expand All @@ -100,8 +101,6 @@ jobs:
conda list
- name: Pytest
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate mg
python -c 'import stellargraph'
pytest --pyargs metagraph_stellargraph
python -m metagraph.tests
Expand Down
10 changes: 4 additions & 6 deletions continuous_integration/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ build:

requirements:
build:
- python >=3.7
- python
run:
- python >=3.7
- python
- stellargraph
- metagraph >=0.2.3
- metagraph >=0.2.5

test:
requires:
- pytest
- pytest-cov
- coverage
- metagraph-dev
commands:
- py.test --cov-report term-missing --cov=metagraph_stellargraph --pyargs metagraph.tests

Expand Down
20 changes: 0 additions & 20 deletions continuous_integration/environment-3.7.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ channels:
dependencies:
# dev environment
- python=3.8
- coverage
- pytest
- pytest-cov
- black >=20.8b1
- pre-commit
- setuptools
- metagraph-dev
- black

# metagraph-stellargraph dependencies
- metagraph
- stellargraph
- metagraph >=0.2.3

# Unlisted stellargraph dependencies
# If we don't install, pip will and then things break
- tensorflow-estimator
- opt-einsum
7 changes: 2 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ channels:

dependencies:
# dev environment
- python=3.7
- coverage
- pytest
- pytest-cov
- python=3.8
- black
- conda-forge::pre-commit
- setuptools
- metagraph::metagraph
- metagraph::metagraph-dev

# metagraph-stellargraph dependencies
- stellargraph::stellargraph

0 comments on commit d5720c6

Please sign in to comment.