Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rofrano/nyu-devops-base:su23
FROM rofrano/nyu-devops-base:fa23

# Add Python package requiremnets to the dev environment
WORKDIR /app
Expand Down
19 changes: 17 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,27 @@
"remoteUser": "vscode",
"customizations": {
"vscode": {
"settings": {
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"markdown-preview-github-styles.colorTheme": "light",
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.pyc": true,
"**/__pycache__": true,
"**/.pytest_cache": true
}
},
"extensions": [
"VisualStudioExptTeam.vscodeintellicode",
"ms-python.python",
"ms-python.pylint",
"ms-python.vscode-pylance",
"alexkrechik.cucumberautocomplete",
"cstrap.flask-snippets",
"yzhang.markdown-all-in-one",
"bierner.github-markdown-preview",
Expand All @@ -31,7 +46,7 @@
"bbenoist.vagrant"
]
}
},
}
//"forwardPorts": [8000],
// "postCreateCommand": ""
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Run unit tests with green
run: |
export FLASK_APP=service:app
green
pytest --disable-warnings
env:
DATABASE_URI: "postgresql://postgres:pgs3cr3t@postgres:5432/testdb"

Expand Down
15 changes: 2 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@
"makefile.extensionOutputFolder": "./.vscode",
"git.mergeEditor": true,
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.testing.pytestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": true,
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"test*.py"
],
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.pyc": true,
"**/__pycache__": true
}
]
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: ## Run the linter

test: ## Run the unit tests
$(info Running tests...)
green -vvv --processes=1 --run-coverage --termcolor --minimum-coverage=95
pytest --disable-warnings

##@ Runtime

Expand Down
25 changes: 14 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
# Pinned dependencies that cause breakage
Werkzeug==2.3.3
Werkzeug==2.3.7
SQLAlchemy==2.0.0

# Runtime dependencies
Flask==2.3.2
Flask==2.3.3
Flask-SQLAlchemy==3.0.2
psycopg2==2.9.5
python-dotenv==0.21.1
python-dotenv==1.0.0

# Runtime tools
gunicorn==20.1.0
gunicorn==21.2.0
honcho==1.1.0

# Code quality
pylint==2.16.2
flake8==6.0.0
black==23.1.0
pylint==2.17.5
flake8==6.1.0
black==23.7.0

# Testing dependencies
green==3.4.3
factory-boy==3.2.1
coverage==7.1.0
pytest==7.4.0
pytest-pspec==0.0.4
pytest-cov==4.1.0

factory-boy==3.3.0
coverage==7.3.0

# Utilities
httpie==3.2.1
httpie==3.2.2
14 changes: 7 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[green]
verbose=3
processes=1
run-coverage=1
termcolor=1
minimum-coverage=95
junit-report=./unittests.xml
# setup configuration for tools
[tool:pytest]
minversion = 6.0
addopts = --pspec --cov=service --disable-warnings
testpaths =
tests
integration

[flake8]
max-line-length = 127
Expand Down