-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from nyu-devops/sp25-updates
Updates for Sprint 2025 Semester
- Loading branch information
Showing
13 changed files
with
941 additions
and
1,364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,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: | | ||
|
@@ -53,8 +52,7 @@ jobs: | |
# Create a CODECOV_TOKEN in Settings->Secrets and variables->Actions | ||
# and then uncomment the CodeCov action during hands-on lab | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# - name: Upload coverage reports to Codecov | ||
# uses: codecov/[email protected] | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,42 @@ | ||
.PHONY: all help install venv test run | ||
|
||
help: ## Display this help | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-\\.]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
||
.PHONY: all | ||
all: help | ||
|
||
##@ Development | ||
|
||
.PHONY: clean | ||
clean: ## Clean up test files | ||
$(info Cleaning up test files...) | ||
-rm .coverage coverage.xml unittests.xml | ||
-rm -fr .pytest_cache dist build | ||
|
||
.PHONY: venv | ||
venv: ## Create a Python virtual environment | ||
$(info Creating Python 3 virtual environment...) | ||
poetry config virtualenvs.in-project true | ||
poetry shell | ||
PIPENV_VENV_IN_PROJECT=1 pipenv shell | ||
|
||
.PHONY: install | ||
install: ## Install dependencies | ||
$(info Installing dependencies...) | ||
poetry install | ||
PIPENV_VENV_IN_PROJECT=1 pipenv install | ||
|
||
.PHONY: lint | ||
lint: ## Run the linter | ||
$(info Running linting...) | ||
flake8 service tests --count --select=E9,F63,F7,F82 --show-source --statistics | ||
flake8 service tests --count --max-complexity=10 --max-line-length=127 --statistics | ||
pylint service tests --max-line-length=127 | ||
|
||
.PHONY: test | ||
test: ## Run the unit tests | ||
$(info Running tests...) | ||
pytest --pspec --cov=service --cov-fail-under=95 | ||
|
||
##@ Runtime | ||
|
||
.PHONY: run | ||
run: ## Run the service | ||
$(info Starting service...) | ||
honcho start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
retry2 = "==0.9.5" | ||
python-dotenv = "==1.0.1" | ||
gunicorn = "==23.0.0" | ||
redis = "==5.2.1" | ||
flask-redis = "==0.4.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" |
Oops, something went wrong.