Skip to content

Updates for Sprint 2025 Semester #18

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

Merged
merged 4 commits into from
Feb 19, 2025
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
9 changes: 4 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Image for a NYU Lab development environment
FROM rofrano/nyu-devops-base
FROM rofrano/nyu-devops-base:sp25

# Set up the Python development environment
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN sudo python -m pip install --upgrade pip poetry && \
sudo poetry config virtualenvs.create false && \
sudo poetry install
COPY Pipfile Pipfile.lock ./
RUN sudo python -m pip install --upgrade pip pipenv && \
sudo pipenv install --system --dev
22 changes: 13 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
"vscode": {
"settings": {
"cSpell.words": [
"wsgi",
"sqlalchemy",
"psycopg",
"pytest"
"pytest",
"onupdate",
"testdb"
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
Expand All @@ -34,28 +37,29 @@
},
"extensions": [
"ms-python.python",
"ms-python.pylint",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.flake8",
"ms-python.black-formatter",
"njpwerner.autodocstring",
"wholroyd.jinja",
"ms-vscode.makefile-tools",
"yzhang.markdown-all-in-one",
"hnw.vscode-auto-open-markdown-preview",
"davidanson.vscode-markdownlint",
"bierner.github-markdown-preview",
"hnw.vscode-auto-open-markdown-preview",
"bierner.markdown-preview-github-styles",
"tamasfe.even-better-toml",
"donjayamanne.githistory",
"GitHub.vscode-pull-request-github",
"github.vscode-github-actions",
"hbenl.vscode-test-explorer",
"LittleFoxTeam.vscode-python-test-adapter",
"njpwerner.autodocstring",
"wholroyd.jinja",
"redhat.vscode-yaml",
"unjinjang.rest-api-client",
"ms-azuretools.vscode-docker",
"rangav.vscode-thunder-client",
"bbenoist.vagrant",
"streetsidesoftware.code-spell-checker"
"github.vscode-github-actions",
"streetsidesoftware.code-spell-checker",
"bbenoist.vagrant"
]
}
}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
- name: Install Python package dependencies
run: |
python -m pip install poetry
poetry config virtualenvs.create false
poetry install
python -m pip install -U pip pipenv
pipenv install --system --dev

- name: Linting
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.DS_Store
Thumbs.db

# Pytest
.pytest_cache/

# Nose
.noseids

Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ clean: ## Removes all dangling docker images
.PHONY: venv
venv: ## Create a Python virtual environment
$(info Creating Python 3 virtual environment...)
poetry config virtualenvs.in-project true
poetry shell
pipenv shell

.PHONY: install
install: ## Install dependencies
$(info Installing dependencies...)
sudo poetry config virtualenvs.create false
sudo poetry install
pipenv install

.PHONY: lint
lint: ## Run the linter
Expand Down
27 changes: 27 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "==3.1.0"
flask-sqlalchemy = "==3.1.1"
psycopg = {extras = ["binary"], version = "==3.2.4"}
retry2 = "==0.9.5"
python-dotenv = "==1.0.1"
gunicorn = "==23.0.0"

[dev-packages]
honcho = "~=2.0.0"
pylint = "~=3.3.4"
flake8 = "~=7.1.1"
black = "~=25.1.0"
pytest = "~=8.3.4"
pytest-pspec = "~=0.0.4"
pytest-cov = "~=6.0.0"
factory-boy = "~=3.3.3"
coverage = "~=7.6.12"
httpie = "~=3.2.4"

[requires]
python_version = "3.11"
1,033 changes: 1,033 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The test cases have 95% test coverage and can be run with `pytest`

## License

Copyright (c) 2016, 2024 [John Rofrano](https://www.linkedin.com/in/JohnRofrano/). All rights reserved.
Copyright (c) 2016, 2025 [John Rofrano](https://www.linkedin.com/in/JohnRofrano/). All rights reserved.

Licensed under the Apache License. See [LICENSE](LICENSE)

Expand Down
1,381 changes: 0 additions & 1,381 deletions poetry.lock

This file was deleted.

70 changes: 0 additions & 70 deletions pyproject.toml

This file was deleted.

51 changes: 50 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,55 @@
# Code Quality
########################################
# Tool configurations
########################################
# cspell: disable

# Setup Pytest configuration
[tool:pytest]
minversion = 6.0
addopts = --pspec --cov=service --cov-fail-under=95
testpaths =
tests
integration

# Setup PyLint configuration
[pylint.FORMAT]
max-line-length = 127

[pylint.'MESSAGES CONTROL']
disable = no-member,protected-access,global-statement

# setup Flake8 configuration
[flake8]
max-line-length = 127
per-file-ignores =
*/__init__.py: F401 E402
count = true

# Setup Black configurtion
[black]
line-length = 127

# Setup Coverage configuration
[coverage:run]
source = service
omit =
venv/*
.venv/*

[coverage:report]
show_missing = true
exclude_lines =
pragma: no cover
pragma: no branch
pass
subprocess.CalledProcessError
sys.exit
if __name__ == .__main__.:
ignore_errors = true

[coverage:xml]
output=./coverage.xml

[coverage:html]
title = 'Test Coverage Report'

2 changes: 2 additions & 0 deletions tests/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.
######################################################################
# cspell:ignore userid
# pylint: disable=duplicate-code

"""
Test cases for Account Model
"""
Expand Down
1 change: 1 addition & 0 deletions tests/test_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
######################################################################
# pylint: disable=duplicate-code

"""
Test cases for Address Model
Expand Down