Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon committed Nov 29, 2019
2 parents 5910fa1 + 29122e4 commit 6629897
Show file tree
Hide file tree
Showing 95 changed files with 4,719 additions and 3,659 deletions.
90 changes: 90 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2.0

references:

install_deps: &install_deps
run:
name: Install Dependences
command: |
# PyPI
pip install "$TORCH_VERSION" --user
pip install -r requirements.txt --user
sudo pip install pytest pytest-cov pytest-flake8
pip install -r ./tests/requirements.txt --user
tests_format: &tests_format
run:
name: Tests and formating
command: |
python --version ; pip --version ; pip list
py.test pytorch_lightning tests pl_examples -v --doctest-modules --junitxml=test-reports/pytest_junit.xml --flake8
no_output_timeout: 15m

make_docs: &make_docs
run:
name: Make Documentation
command: |
# sudo apt-get install pandoc
pip install -r requirements.txt --user
sudo pip install -r docs/requirements.txt
# sphinx-apidoc -o ./docs/source ./pytorch_lightning **/test_* --force --follow-links
cd docs; make clean ; make html
jobs:

Build-Docs:
docker:
- image: circleci/python:3.7
steps:
- checkout
- *make_docs

PyTorch:
docker:
- image: circleci/python:3.7
environment:
- TORCH_VERSION: "torch"
steps: &steps
- checkout

- *install_deps
- *tests_format

- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports

PyTorch-v1.1:
docker:
- image: circleci/python:3.6
environment:
- TORCH_VERSION: "torch>=1.1, <1.2"
steps: *steps

PyTorch-v1.2:
docker:
- image: circleci/python:3.6
environment:
- TORCH_VERSION: "torch>=1.2, <1.3"
steps: *steps

PyTorch-v1.3:
docker:
- image: circleci/python:3.6
environment:
- TORCH_VERSION: "torch>=1.3, <1.4"
steps: *steps

workflows:
version: 2
build:
jobs:
- Build-Docs
- PyTorch-v1.1
- PyTorch-v1.2
- PyTorch-v1.3
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Before submitting

- Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- Did you read the [contributor guideline](https://github.com/williamFalcon/pytorch-lightning/blob/master/.github/CONTRIBUTING.md)?
- Did you make sure to update the docs?
- Did you write any new necessary tests?
- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [ ] Did you read the [contributor guideline](https://github.com/williamFalcon/pytorch-lightning/blob/master/.github/CONTRIBUTING.md)?
- [ ] Did you make sure to update the docs?
- [ ] Did you write any new necessary tests?

## What does this PR do?
Fixes # (issue).

## PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

## Did you have fun?
Make sure you had fun coding 🙃
11 changes: 8 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Build documentation with MkDocs
mkdocs:
configuration: mkdocs.yml
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all
Expand All @@ -16,4 +20,5 @@ formats: all
python:
version: 3.7
install:
- requirements: docs/requirements.txt
#- requirements: requirements.txt
- requirements: docs/requirements.txt
1 change: 1 addition & 0 deletions .run_local_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
rm -rf _ckpt_*
rm -rf tests/save_dir*
rm -rf tests/mlruns_*
rm -rf tests/cometruns*
rm -rf tests/tests/*
rm -rf lightning_logs
coverage run --source pytorch_lightning -m py.test pytorch_lightning tests pl_examples -v --doctest-modules
Expand Down
28 changes: 21 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ language: python

matrix:
include:
- os: linux
dist: xenial # Ubuntu 16.04
- dist: xenial # Ubuntu 16.04
python: 3.6
env: TOXENV=py36
- os: linux
dist: bionic # Ubuntu 18.04
env:
- TOXENV=py36
- MIN_REQUIREMENTS=1
- dist: xenial # Ubuntu 16.04
python: 3.7
env:
- TOXENV=py37
- MIN_REQUIREMENTS=1
- dist: bionic # Ubuntu 18.04
python: 3.6
env: TOXENV=py36
- os: linux
dist: bionic # Ubuntu 18.04
- dist: bionic # Ubuntu 18.04
python: 3.7
env: TOXENV=py37
- os: osx
Expand Down Expand Up @@ -54,10 +58,20 @@ install:
- pip install future # needed for `builtins`
- sudo pip install tox

before_script:
# rewrite all minimal requirements as strict
- if [[ "${MIN_REQUIREMENTS}" == "1" ]]; then
python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements-ci.txt', 'w').write(req)" ;
else
cp requirements.txt requirements-ci.txt ;
fi
- pip install -r requirements-ci.txt -U

script:
# integration
- tox --sitepackages
- pip install --editable .
#- python setup.py install --dry-run --user

after_success:
- coverage report
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exclude *.yml

prune .git
prune .github
prune .circleci
prune notebook*
prune temp*
prune test*
Loading

0 comments on commit 6629897

Please sign in to comment.