Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tensorflow to >=2.3.1 #35

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
83 changes: 56 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,49 @@ jobs:

working_directory: ~/timeserio

environment:
PIPENV_VENV_IN_PROJECT: true
environment: # these don't get interpolated
POETRY_VERSION: 1.1.2
POETRY_HOME: /home/circleci/.poetry
POETRY_VIRTUALENVS_IN_PROJECT: "true"

steps:
- checkout

- restore_cache:
keys:
# when lock file changes, use increasingly general patterns to restore cache
- pip-packages-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- pip-packages-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "poetry.lock" }}
- pip-packages-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-
- pip-packages-{{ .Environment.CACHE_VERSION }}-

- run:
name: Update pip
name: Set up build tools
command: |
pipenv run pip install --upgrade pip
mkdir -p $POETRY_HOME
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
cat $POETRY_HOME/env >> $BASH_ENV

- run:
# we remove untracked to avoid issues with stail/removed dependencies
name: Install dependencies
command: |
make sync
poetry install -vvv --remove-untracked

- save_cache:
paths:
- ./.venv/
key: pip-packages-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
key: pip-packages-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ checksum "poetry.lock" }}

- run:
name: Run lint
command: |
make lint

- persist_to_workspace:
root: . # absolute, or relative from working directory
root: /home/circleci # absolute, or relative from working directory
paths: # Must be relative path from root
- ./.venv
- timeserio/.venv
- .poetry

test:
docker:
Expand All @@ -55,20 +61,24 @@ jobs:
working_directory: ~/timeserio

environment:
PIPENV_VENV_IN_PROJECT: true
POETRY_VIRTUALENVS_IN_PROJECT: "true"

steps:

- checkout

- attach_workspace:
at: . # Must be absolute path or relative path from working_directory

at: /home/circleci # Must be absolute path or relative path from working_directory

- run:
name: Configure poetry
command: cat ~/.poetry/env >> $BASH_ENV

- run:
name: Run tests
command: |
TESTFILES=$(circleci tests glob "tests/**/*.py" | circleci tests split --split-by=timings)
pipenv run pytest --cov=./timeserio/ --cov-report xml --junitxml=junit/pytest/results.xml --keep-duplicates $TESTFILES
poetry run pytest --cov=./timeserio/ --cov-report xml --junitxml=junit/pytest/results.xml --keep-duplicates $TESTFILES

- store_test_results:
path: ./junit
Expand All @@ -83,14 +93,19 @@ jobs:
working_directory: ~/timeserio

environment:
PIPENV_VENV_IN_PROJECT: true
POETRY_VIRTUALENVS_IN_PROJECT: "true"

steps:

- checkout

- attach_workspace:
at: . # Must be absolute path or relative path from working_directory
at: /home/circleci # Must be absolute path or relative path from working_directory

- run:
name: Configure poetry
command: cat ~/.poetry/env >> $BASH_ENV


- run:
name: Run doctests
Expand All @@ -106,19 +121,23 @@ jobs:
working_directory: ~/timeserio

environment:
PIPENV_VENV_IN_PROJECT: true
TWINE_NON_INTERACTIVE: true
TWINE_NON_INTERACTIVE: "true"

steps:

- checkout

- attach_workspace:
at: . # Must be absolute path or relative path from working_directory
at: /home/circleci # Must be absolute path or relative path from working_directory

- run:
name: Configure poetry
command: cat ~/.poetry/env >> $BASH_ENV

- run:
name: Create source and wheel distribution
command: make package
command: |
make package

- run:
name: Release to PyPI
Expand All @@ -130,7 +149,8 @@ jobs:

- persist_to_workspace:
root: .
paths: ./build
paths:
- ./build

release-prod:
docker:
Expand All @@ -139,16 +159,20 @@ jobs:
working_directory: ~/timeserio

environment:
PIPENV_VENV_IN_PROJECT: true
TWINE_NON_INTERACTIVE: true
TWINE_NON_INTERACTIVE: "true"
POETRY_VIRTUALENVS_IN_PROJECT: "true"

steps:

- checkout

- attach_workspace:
at: . # Must be absolute path or relative path from working_directory
at: /home/circleci # Must be absolute path or relative path from working_directory

- run:
name: Configure poetry
command: cat ~/.poetry/env >> $BASH_ENV

- run:
name: Release to PyPI
command: |
Expand All @@ -164,7 +188,7 @@ jobs:
working_directory: ~/timeserio

environment:
PIPENV_VENV_IN_PROJECT: true
POETRY_VIRTUALENVS_IN_PROJECT: "true"

steps:

Expand All @@ -177,7 +201,11 @@ jobs:
sudo dpkg -i pandoc-2.7.3-1-amd64.deb

- attach_workspace:
at: . # Must be absolute path or relative path from working_directory
at: /home/circleci # Must be absolute path or relative path from working_directory

- run:
name: Configure poetry
command: cat ~/.poetry/env >> $BASH_ENV

- run:
name: Build sphinx docs
Expand All @@ -186,7 +214,8 @@ jobs:

- persist_to_workspace:
root: docs/_build
paths: html
paths:
- html

docs-deploy:
docker:
Expand Down
37 changes: 19 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,43 @@ CPU_IMAGE?="timeserio:latest"
.PHONY: yapf lint clean sync lock test test-parallel docs-build docs-clean circle build-cpu build-gpu release

yapf:
pipenv run yapf -vv -ir .
pipenv run isort -y
poetry run yapf -vv -ir .
poetry run isort -y

lint:
pipenv run flake8 .
pipenv run pydocstyle .
pipenv run mypy .
poetry run flake8 .
poetry run pydocstyle .
poetry run mypy .

clean:
find . | grep -E '(__pycache__|\.pyc|\.pyo$$)' | xargs rm -rf
rm -rf dist/
rm -rf build/

sync:
pipenv sync --dev
poetry install

lock:
pipenv lock --dev
poetry lock

test:
pipenv run pytest tests/
poetry run pytest tests/

test-parallel:
pipenv run pytest -n auto tests/
poetry run pytest -n auto tests/

doctest:
pipenv run pytest --doctest-modules timeserio/
poetry run pytest --doctest-modules timeserio/

docs-build:
pipenv run $(MAKE) -C docs html
poetry run $(MAKE) -C docs html

docs-clean:
pipenv run $(MAKE) -C docs clean
poetry run $(MAKE) -C docs clean
rm -rf docs/source/api

docs-serve:
pipenv run $(SHELL) -c "cd docs/_build/html; python -m http.server 8000"
poetry run $(SHELL) -c "cd docs/_build/html; python -m http.server 8000"

circle:
circleci config validate
Expand All @@ -51,14 +53,13 @@ build-gpu:
docker build -t ${GPU_IMAGE} . --build-arg gpu_tag="-gpu"

version:
@pipenv run python -c "import timeserio; print(timeserio.__version__)"
@poetry run python -c "import timeserio; print(timeserio.__version__)"

package:
pipenv run python setup.py sdist
pipenv run python setup.py bdist_wheel
poetry buil

test-release: package
pipenv run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
poetry run twine upload --repository-url https://test.pypi.org/legacy/ dist/*

release: package
pipenv run twine upload dist/*
poetry run twine upload dist/*
41 changes: 0 additions & 41 deletions Pipfile

This file was deleted.

Loading