Skip to content

Commit 9df0dda

Browse files
authored
Merge pull request #28 from nyu-devops/su24-updates
Changes for Summer 2024 Semester
2 parents 4d8535d + 85dde67 commit 9df0dda

File tree

7 files changed

+327
-295
lines changed

7 files changed

+327
-295
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Image for a Python 3 development environment
22
FROM python:3.11-slim
33

4-
# Add any tools that are needed beyond Python 3.9
5-
RUN apt-get update \
6-
&& apt-get install -y sudo git make zip tree curl wget jq \
7-
&& apt-get autoremove -y \
8-
&& apt-get clean -y \
9-
&& rm -rf /var/lib/apt/lists/*
4+
# Add any tools that are needed beyond Python 3.11
5+
RUN apt-get update && \
6+
apt-get install -y sudo vim make git zip tree curl wget jq procps net-tools && \
7+
apt-get autoremove -y && \
8+
apt-get clean -y
109

1110
# Create a user for development
1211
ARG USERNAME=devops

.devcontainer/devcontainer.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@
88
"customizations": {
99
"vscode": {
1010
"settings": {
11+
"cSpell.words": [
12+
"sqlalchemy",
13+
"psycopg",
14+
"pytest",
15+
"virtualenvs"
16+
],
1117
"[python]": {
1218
"editor.defaultFormatter": "ms-python.black-formatter",
1319
"editor.formatOnSave": true
1420
},
21+
"git.mergeEditor": true,
1522
"markdown-preview-github-styles.colorTheme": "light",
1623
"makefile.extensionOutputFolder": "/tmp",
1724
"python.testing.unittestEnabled": false,
18-
"python.testing.pytestEnabled": true,
25+
"python.testing.pytestEnabled": true,
1926
"python.testing.pytestArgs": [
2027
"tests"
2128
],
@@ -31,29 +38,29 @@
3138
"VisualStudioExptTeam.vscodeintellicode",
3239
"ms-python.python",
3340
"ms-python.vscode-pylance",
41+
"ms-python.debugpy",
3442
"ms-python.pylint",
3543
"ms-python.flake8",
3644
"ms-python.black-formatter",
45+
"njpwerner.autodocstring",
46+
"wholroyd.jinja",
3747
"cstrap.flask-snippets",
48+
"ms-vscode.makefile-tools",
3849
"yzhang.markdown-all-in-one",
3950
"bierner.github-markdown-preview",
40-
"hnw.vscode-auto-open-markdown-preview",
4151
"davidanson.vscode-markdownlint",
52+
"hnw.vscode-auto-open-markdown-preview",
4253
"bierner.markdown-preview-github-styles",
4354
"tamasfe.even-better-toml",
4455
"donjayamanne.githistory",
4556
"GitHub.vscode-pull-request-github",
4657
"hbenl.vscode-test-explorer",
4758
"LittleFoxTeam.vscode-python-test-adapter",
48-
"njpwerner.autodocstring",
49-
"wholroyd.jinja",
5059
"redhat.vscode-yaml",
5160
"rangav.vscode-thunder-client",
52-
"redhat.fabric8-analytics",
53-
"streetsidesoftware.code-spell-checker",
5461
"ms-azuretools.vscode-docker",
5562
"github.vscode-github-actions",
56-
"streetsidesoftware.code-spell-checker",
63+
"streetsidesoftware.code-spell-checker",
5764
"bbenoist.vagrant"
5865
]
5966
}

.flaskenv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
FLASK_RUN_PORT=8080
2-
FLASK_APP=service:app
2+
FLASK_APP=wsgi:app

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ unittests.xml
1212
.scannerwork/
1313
.sonarlint/
1414

15+
# PyTest
16+
.pytest_cache/
17+
1518
# Byte-compiled / optimized / DLL files
1619
__pycache__/
1720
*.py[cod]

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: required
22

33
language: python
44
python:
5-
- '3.7'
5+
- '3.11'
66

77
services:
88
- docker
@@ -15,17 +15,20 @@ before_install:
1515
- docker ps -a
1616

1717
env:
18-
- BINDING_CLOUDANT='{"username": "admin","password": "pass","host": "localhost","port": 5984,"url": "http://admin:pass@localhost:5984"}'
18+
- BINDING_CLOUDANT='{"username":"admin","password":"pass","host":"localhost","port":5984,"url":"http://admin:pass@localhost:5984"}'
1919

2020
# command to install dependencies
21-
install: pip install -r requirements.txt
21+
install:
22+
- python -m pip install -U pip poetry
23+
- poetry config virtualenvs.create false
24+
- poetry install
2225

2326
before_script:
2427
- curl -X GET http://localhost:5984/
2528
- curl -X PUT http://admin:pass@localhost:5984/test
2629

2730
script:
28-
- nosetests
31+
- pytest
2932

3033
after_success:
3134
- codecov

0 commit comments

Comments
 (0)