Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8132487
adding github action file
ThomVett Mar 23, 2021
c9c5f6a
adding github action that does the same thing as travis
ThomVett Mar 23, 2021
417cd2d
adding dill dependency for testing
ThomVett Mar 23, 2021
10d5971
adding code coverage
ThomVett Mar 23, 2021
9e5ad24
intalling miniconda
ThomVett Mar 23, 2021
ba04b89
setting up conda env
ThomVett Mar 23, 2021
1f9daee
adding conda specific values
ThomVett Mar 23, 2021
6c7a1a9
refering to correct env variable
ThomVett Mar 23, 2021
98c7e4c
adding sudo
ThomVett Mar 23, 2021
067fe28
adding cache and removing tqdm install
ThomVett Mar 23, 2021
b30462c
adding cache
ThomVett Mar 23, 2021
2e4b0cf
installing matplotlib with conda
ThomVett Mar 23, 2021
37d9607
removing empty pip step
ThomVett Mar 23, 2021
b6c0354
adding back tqdm
ThomVett Mar 23, 2021
268d5b1
using pytest
ThomVett Mar 23, 2021
ec19fbc
running pytest as a python module
ThomVett Mar 23, 2021
6428dae
insalling dill
ThomVett Mar 23, 2021
6933b8a
adding conda commands
ThomVett Mar 23, 2021
484f771
conda commands
ThomVett Mar 23, 2021
23f38e3
adding new steps
ThomVett Mar 23, 2021
b556756
removign debug steps
ThomVett Mar 23, 2021
455f51d
adding env activation step
ThomVett Mar 23, 2021
af8b0c2
adding new step to activate environment
ThomVett Mar 23, 2021
398a016
activating env with raw conda path
ThomVett Mar 23, 2021
9e0953f
we cannot activate the env
ThomVett Mar 23, 2021
edc7b81
use the pip in conda
ThomVett Mar 23, 2021
cbc63d9
using conda pip everywhere
ThomVett Mar 23, 2021
eaebcbe
adding coverall github action
ThomVett Mar 23, 2021
07914e1
removing coveralls step
ThomVett Mar 23, 2021
128e8f6
adding matrix job for all python version back
ThomVett Mar 23, 2021
2fd3933
Merge remote-tracking branch 'upstream/master'
ThomVett Mar 26, 2021
c791d03
adding a step to build the docs
ThomVett Mar 26, 2021
d229954
adding a test gcloud command
ThomVett Mar 26, 2021
ed92d15
adding fake credentials for gsutil
ThomVett Mar 26, 2021
c219e47
adding step to push to gcs
ThomVett Mar 26, 2021
4847f97
using sphinx build installed by conda
ThomVett Mar 26, 2021
9c9e1a6
removing step
ThomVett Mar 26, 2021
383a8b9
adding a separate action that builds the documentatiuon only when pus…
ThomVett Mar 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/publish_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Publish Documentation

on:
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Installing environment and dependencies
run: |
$CONDA/bin/conda env update --file environment.yml --name base
- name: Install package
run: |
sudo python setup.py develop
- name: Dependencies needed for sphinx
run: |
$CONDA/bin/pip install sphinx sphinx-gallery
$CONDA/bin/pip install memory_profiler
- name: Building the documentation
working-directory: doc/
run: |
$CONDA/bin/sphinx-build -M html "." "_build"
- name: Uploading docs to gcs
uses: actions-hub/gcloud@master
env:
PROJECT_ID: test # This is a placeholder value that is only needed for the action to succeed, it's not an optional parameter
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
with:
args: -m doc/rsync -r _build/html gs://openo.pt/chop
cli: gsutil

76 changes: 76 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Installing environment and dependencies
run: |
$CONDA/bin/conda env update --file environment.yml --name base
- name: Install package
run: |
sudo python setup.py develop
- name: Dependencies needed for coverage and unit tests
run: |
$CONDA/bin/pip install matplotlib
$CONDA/bin/pip install tqdm
$CONDA/bin/pip install tensorboardX cox requests
$CONDA/bin/pip install advertorch copt
$CONDA/bin/pip install git+https://github.com/RobustBench/robustbench
$CONDA/bin/pip install coveralls coverage pytest-cov
- name: Dependencies needed for sphinx
run: |
$CONDA/bin/pip install sphinx sphinx-gallery
$CONDA/bin/pip install memory_profiler
- name: Running unit tests
run: |
$CONDA/bin/pytest -v --cov=chop
- name: Building the documentation
working-directory: doc/
run: |
$CONDA/bin/sphinx-build -M html "." "_build"
- name: Uploading docs to gcs
uses: actions-hub/gcloud@master
env:
PROJECT_ID: test # This is a placeholder value that is only needed for the action to succeed, it's not an optional parameter
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
with:
args: -m doc/rsync -r _build/html gs://openo.pt/chop
cli: gsutil


# - name: Publishing coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}