Skip to content

Commit c9f81ed

Browse files
authored
Remove python 3.6 support (#78)
* Remove python 3.6 support * Remove easydict and pin requirements * Fix typo * Set python minor version on travis * Also remove local db in delete script
1 parent 66365b7 commit c9f81ed

26 files changed

+78
-93
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
repos:
2-
- repo: https://github.com/pre-commit/mirrors-isort
3-
rev: 'v4.3.16'
4-
hooks:
5-
- id: isort
6-
additional_dependencies: ['future-fstrings==1.0.0', 'isort[pyproject]']
7-
- repo: https://github.com/ambv/black
8-
rev: stable
9-
hooks:
10-
- id: black
11-
language_version: python3.6
12-
additional_dependencies: ['future-fstrings==1.0.0']
13-
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: 'v0.730'
15-
hooks:
16-
- id: mypy
17-
additional_dependencies: ['future-fstrings==1.0.0']
2+
- repo: https://github.com/pre-commit/mirrors-isort
3+
rev: "v5.10.1"
4+
hooks:
5+
- id: isort
6+
- repo: https://github.com/ambv/black
7+
rev: stable
8+
hooks:
9+
- id: black
10+
language_version: python3.7
11+
- repo: https://github.com/pre-commit/mirrors-mypy
12+
rev: "v0.960"
13+
hooks:
14+
- id: mypy

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
sudo: required
22
language: python
33
python:
4-
# - "3.5"
5-
- "3.6"
6-
- "3.7"
4+
- "3.7.13"
75
- "3.8"
8-
os: linux
6+
os: linux
97
dist: xenial
108
cache: pip
119
services:

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"python.testing.unittestEnabled": false,
55
"python.testing.nosetestsEnabled": false,
66
"python.testing.pytestEnabled": true,
7-
"restructuredtext.confPath": "${workspaceFolder}/.tox/py36/lib/python3.6/site-packages/importlib_resources/docs"
7+
"restructuredtext.confPath": "${workspaceFolder}/.tox/py36/lib/python3.7/site-packages/importlib_resources/docs",
8+
"esbonio.sphinx.confDir": "${workspaceFolder}/.tox/py36/lib/python3.7/site-packages/importlib_resources/docs"
89
}

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ RUN groupadd --gid $USER_GID $USERNAME \
2323
# Install git, process tools, lsb-release (common in install instructions for CLIs)
2424
RUN apt -y install git procps lsb-release ffmpeg vim exuberant-ctags zsh wget
2525

26-
# Install any missing dependencies for enhanced language service
27-
RUN apt install -y libicu[0-9][0-9]
26+
# # Install any missing dependencies for enhanced language service
27+
# RUN apt install -y libicu[0-9][0-9]
2828

2929
# Clean up
3030
RUN apt-get autoremove -y \
@@ -46,7 +46,7 @@ RUN mkdir -p ${HOME}/.ssh \
4646
WORKDIR ${HOME}/workspace
4747

4848
# Install Python dependencies from requirements.txt if it exists
49-
RUN conda create -n env python=3.6
49+
RUN conda create -n env python=3.7
5050
RUN echo "source activate env" > ~/.bashrc
5151
ENV PATH /opt/conda/envs/env/bin:$PATH
5252
RUN conda install virtualenv

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Alternatively, you can use conda to set up your local development environment.
8383

8484
::
8585

86-
$ conda create -n incense-dev python=3.6
86+
$ conda create -n incense-dev python=3.7
8787
$ conda activate incense-dev
8888
# virtualenv is required for the precommit environments.
8989
$ conda install virtualenv

binder/environment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- anaconda
55
dependencies:
6-
- python=3.6
6+
- python=3.7
77
- numpy
88
- matplotlib
99
- pandas
@@ -12,5 +12,5 @@ dependencies:
1212
- mongodb
1313
- seaborn
1414
- pip:
15-
- git+https://github.com/IDSIA/sacred.git
16-
- incense
15+
- git+https://github.com/IDSIA/sacred.git
16+
- incense

delete_db.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import os
2+
import shutil
23
from pathlib import Path
34

45
from dotenv import load_dotenv
5-
from pymongo import MongoClient
6+
from pymongo.mongo_client import MongoClient
67

78
env_path = Path(".") / "infrastructure" / "sacred_setup" / ".env"
89
load_dotenv(dotenv_path=env_path)
910

1011
DB_NAME = os.environ["MONGO_DATABASE"]
1112

12-
client = MongoClient(host="mongo")
13+
client: MongoClient = MongoClient(host="mongo")
1314
client.drop_database(DB_NAME)
15+
16+
shutil.rmtree(Path("~/data/incense_test/").expanduser(), ignore_errors=True)
17+
1418
print(f"Database {DB_NAME} successfully deleted.")

demo.ipynb

Lines changed: 9 additions & 6 deletions
Large diffs are not rendered by default.

incense/artifact.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: future_fstrings -*-
21
import os
32
import pickle
43
import warnings

incense/experiment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# -*- coding: future_fstrings -*-
21
import json
32
from pathlib import Path
43
from typing import *
54

65
import jsonpickle
76
import pandas as pd
8-
from incense.artifact import Artifact, content_type_to_artifact_cls
97
from pyrsistent import freeze, thaw
108

9+
from incense.artifact import Artifact, content_type_to_artifact_cls
10+
1111

1212
class Experiment:
1313
def __init__(self, id_, database, grid_filesystem, data, artifact_links, loader):

0 commit comments

Comments
 (0)