Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1e89ee2
Add dataset of Manhattan restaurants near NYU
amiraadum Oct 28, 2025
0df58a2
Merge pull request #1 from swe-students-fall2025/amira-csv
jmo7728 Oct 28, 2025
14324ed
Add initial project structure
amiraadum Oct 28, 2025
2d4c279
Merge pull request #2 from swe-students-fall2025/amira-csv
hyunkyuu Oct 28, 2025
a8a149f
chore: update Pipfile and structure
hyunkyuu Oct 28, 2025
d22b082
Add pyproject.toml with build metadata for eatnyc package
amiraadum Oct 28, 2025
4cda39c
Merge pull request #3 from swe-students-fall2025/amira-csv
hyunkyuu Oct 28, 2025
55609c1
Merge pull request #4 from swe-students-fall2025/chore/setup
amiraadum Oct 28, 2025
687b996
chore: update Pipfile
hyunkyuu Oct 28, 2025
dbb6ae0
fix: update Pipfile
hyunkyuu Oct 28, 2025
f0321b2
Merge pull request #5 from swe-students-fall2025/chore/setup
amiraadum Oct 28, 2025
5df05ba
chore: update Pipfile.lock
hyunkyuu Oct 29, 2025
2bf2276
Merge branch 'pipfile-experiment' of https://github.com/swe-students-…
hyunkyuu Oct 29, 2025
8dc8d01
CI on PRs; publish on tags; verify install from TestPyPI
amiraadum Oct 30, 2025
e405fd2
chore: revise it according to the prof's file structure
hyunkyuu Oct 30, 2025
898999c
Add build workflow; stage __init__ change
amiraadum Oct 30, 2025
bfa6dd9
Merge pull request #6 from swe-students-fall2025/chore/setup
amiraadum Oct 30, 2025
b344b7f
Restructure: move package to src/eatnyc, add data/, fix __init__
amiraadum Oct 30, 2025
0b26873
Fix package structure, update pyproject.toml and build.yaml, verified…
amiraadum Oct 30, 2025
188435a
Add load_data test so CI collects tests
amiraadum Oct 30, 2025
bd59288
Merge pull request #9 from swe-students-fall2025/amira-dev
lilyluo7412 Oct 30, 2025
d65ddb2
Implement and test top_n function for sorting data
lilyluo7412 Oct 30, 2025
f7f59cd
Merge pull request #10 from swe-students-fall2025/lily-dev
amiraadum Oct 30, 2025
3cc6b34
Add demo.py, improve load_data and tests, update pyproject.toml and R…
amiraadum Oct 30, 2025
5c115bb
Add full pytest coverage for load_data function (4 passing tests)
amiraadum Oct 30, 2025
7e5b272
Merge pull request #12 from swe-students-fall2025/amira-dev
amiraadum Oct 30, 2025
293496c
Editted correct package in load_data
amiraadum Oct 30, 2025
af01ef0
Merge branch 'pipfile-experiment' into amira-dev
amiraadum Oct 30, 2025
bcacc18
Add editable install to Pipenv + update load_data and verify tests
amiraadum Oct 30, 2025
861f88b
Updated README file with description and badg
amiraadum Oct 31, 2025
7436c9f
Merge pull request #13 from swe-students-fall2025/amira-dev
lilyluo7412 Oct 31, 2025
5c4e79f
Update Pipfile: include build and pytest dependencies
amiraadum Oct 31, 2025
ef59529
Updated README: corrected badge and started installation steps
amiraadum Oct 31, 2025
385e7f3
Updated README with full instructions, needs update after upload
amiraadum Oct 31, 2025
bad2518
Merge pull request #14 from swe-students-fall2025/amira-dev
Ivan-Wang-tech Oct 31, 2025
959a7ef
update Pipfile dev dependencies; add format_card() function
Ivan-Wang-tech Nov 1, 2025
1bfc086
Added draft of filter restaurants
jmo7728 Nov 2, 2025
1ed7dc9
Final Draft of Filter_Restaurants, added tests and a demo of filter r…
jmo7728 Nov 2, 2025
839941d
Merge pull request #15 from swe-students-fall2025/ivan-dev
lilyluo7412 Nov 2, 2025
d4c7e9b
Merged updated main into branch
jmo7728 Nov 2, 2025
717c463
Merge pull request #16 from jmo7728/filter
amiraadum Nov 2, 2025
3d95bd9
add test function for format_card
Ivan-Wang-tech Nov 2, 2025
2f15bc0
Update README, build.yaml, and version to 0.1.1
amiraadum Nov 2, 2025
b942bbc
update demo.py
Ivan-Wang-tech Nov 2, 2025
be0e3d0
Merge pull request #17 from swe-students-fall2025/ivan-dev
amiraadum Nov 2, 2025
26aaf09
Merge pull request #18 from swe-students-fall2025/amira-dev
Ivan-Wang-tech Nov 2, 2025
0dd9383
update init.py
Ivan-Wang-tech Nov 2, 2025
ca95a1d
Merge pull request #19 from swe-students-fall2025/ivan-dev
Ivan-Wang-tech Nov 2, 2025
66334a5
feat: add sample_dish function
hyunkyuu Nov 3, 2025
87420bf
fix linting and formatting
hyunkyuu Nov 3, 2025
0f80e7f
feat: add sample_dish to demo.py
hyunkyuu Nov 3, 2025
1cbcb01
Merge pull request #20 from swe-students-fall2025/feat/suggest-dish
Ivan-Wang-tech Nov 3, 2025
8a28cbb
Update README to use 'neighborhood' in example
lilyluo7412 Nov 3, 2025
ddfb62d
Added comments for better documentation
jmo7728 Nov 3, 2025
baa4e16
Added small documentation
jmo7728 Nov 3, 2025
37c3699
Merge pull request #21 from jmo7728/fine-tuning
Ivan-Wang-tech Nov 3, 2025
5b06a71
add Makefile
Ivan-Wang-tech Nov 4, 2025
9621495
update readme.md
Ivan-Wang-tech Nov 4, 2025
75beb07
fix: clean Pipfile & regenerate lock
Ivan-Wang-tech Nov 4, 2025
58e9e6a
add test file
Ivan-Wang-tech Nov 4, 2025
e50e4a5
Merge pull request #22 from swe-students-fall2025/ivan-dev
Ivan-Wang-tech Nov 4, 2025
1185dff
Add PyPI production publish step and expand README docs
lilyluo7412 Nov 5, 2025
14f8dd9
Merge pull request #23 from swe-students-fall2025/temp-update-readme-…
hyunkyuu Nov 5, 2025
87fe938
Update pyproject.toml
lilyluo7412 Nov 5, 2025
c6ec4da
Update README.md
lilyluo7412 Nov 5, 2025
ba07187
docs: polish README; ci: refine build workflow; dev: update Pipfile/lock
amiraadum Nov 5, 2025
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
104 changes: 104 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Build and Test

on:
pull_request:
branches: [pipfile-experiment]
push:
tags: ["v*"]
workflow_dispatch:

jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4

- name: Install Python, Pipenv and Pipfile packages
uses: kojoru/prepare-pipenv@v1
with:
python-version: ${{ matrix.python-version }}

#installing requirements.txt
- name: Install project (editable) + test/build tools
run: |
if [ -f requirements.txt ]; then pipenv run pip install -r requirements.txt; fi
pipenv install -e .
pipenv install pytest build twine

- name: Test with pytest
run: |
pipenv install pytest
pipenv --venv
pipenv run python -m pytest

- name: Build package
run: |
rm -rf dist build src/*.egg-info
pipenv run python -m build .

- name: Twine check (README/metadata)
run: pipenv run twine check dist/*

- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.python-version }}
path: dist/*


deliver:
name: Publish
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist-3.11
path: dist

- name: Install Python, pipenv and Pipfile packages
uses: kojoru/prepare-pipenv@v1

- name: Build package
run: |
pipenv install build
pipenv run python -m build .

- name: Publish to PyPI test server
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

- name: Publish to PyPI (production)
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}


#ADDED to verify upload
verify-upload:
name: Verify install from registry
if: github.event_name != 'pull_request'
needs: [deliver]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Verify Install
run: |
python -m pip install --upgrade pip
pip install eatnyc
python - <<'PY'
import eatnyc
print("✅ Imported eatnyc OK. Version:", getattr(eatnyc, "__version__", "unknown"))
PY
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,10 @@ dmypy.json

# Cython debug symbols
cython_debug/
dist/
build/
*.egg-info/

dist/
build/
*.egg-info/
132 changes: 132 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# =======================
# Project Settings
# =======================
PACKAGE := eatnyc

# Read version from pyproject.toml (safe, single-line Python)
VERSION := $(shell python3 -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")

WHEEL := dist/$(PACKAGE)-$(VERSION)-py3-none-any.whl

# =======================
# Phony Targets
# =======================
.PHONY: help show-version clean build uninstall install-wheel reinstall \
test test-smoke verify install-testpypi \
dev-on dev-off \
test-unit \
release-test release \
tag push-tag

# =======================
# Help
# =======================
help:
@echo "Make targets:"
@echo " show-version - Print detected version from pyproject.toml"
@echo " clean - Remove build artifacts"
@echo " build - Build wheel/sdist"
@echo " uninstall - Uninstall $(PACKAGE) from current Pipenv env"
@echo " install-wheel - Install local wheel"
@echo " reinstall - Clean build + install local wheel"
@echo " test - Smoke test (import and show path)"
@echo " test-smoke - Alias of 'test'"
@echo " verify - Show import path and installed version"
@echo " test-unit - Run pytest (use in dev-on/editable mode)"
@echo " install-testpypi - Install $(PACKAGE)==$(VERSION) from TestPyPI"
@echo " dev-on - Editable install (-e .)"
@echo " dev-off - Switch to TestPyPI-installed package"
@echo " release-test - Upload dist/* to TestPyPI via twine"
@echo " release - Upload dist/* to PyPI via twine"
@echo " tag - Create git tag v$(VERSION)"
@echo " push-tag - Push tag v$(VERSION) to origin"

# =======================
# Info
# =======================
show-version:
@echo "Detected version: $(VERSION)"

# =======================
# Build & Install (local wheel testing)
# =======================
clean:
@echo "Cleaning build artifacts..."
rm -rf dist build src/*.egg-info

build: clean
@echo "Building distribution..."
pipenv run python -m build

install-wheel:
@echo "Installing wheel (no Pipfile change): $(WHEEL)"
pipenv run pip install "$(WHEEL)"

uninstall:
@echo "Uninstalling $(PACKAGE)..."
-pipenv run pip uninstall -y $(PACKAGE)

reinstall: uninstall build install-wheel
@echo "Reinstalled local wheel for $(PACKAGE) $(VERSION)."

# =======================
# Quick tests (smoke)
# =======================
test:
@echo "Quick import test..."
pipenv run python -c "import $(PACKAGE), sys; print('OK:', $(PACKAGE).__file__)"

test-smoke: test

verify:
@echo "Verify package path & version..."
pipenv run python -c "import importlib.metadata as m, $(PACKAGE); print('Path :', $(PACKAGE).__file__); print('Version:', m.version('$(PACKAGE)'))"

# =======================
# Unit tests (pytest) — run in dev-on/editable mode
# =======================
test-unit:
@echo "Running pytest..."
pipenv run pytest -q

# =======================
# TestPyPI Install Testing
# =======================
install-testpypi:
@echo "Installing $(PACKAGE)==$(VERSION) from TestPyPI..."
PIP_INDEX_URL=https://test.pypi.org/simple \
PIP_EXTRA_INDEX_URL=https://pypi.org/simple \
pipenv run pip install $(PACKAGE)==$(VERSION)

# =======================
# Developer Mode Toggle (editable)
# =======================
dev-on: uninstall
@echo "Switching to developer editable mode..."
pipenv install -e .
@echo "✅ Developer mode ON (editable)."

dev-off: uninstall install-testpypi
@echo "✅ Developer mode OFF (TestPyPI package installed)."

# =======================
# Release (local twine) — requires ~/.pypirc or env TWINE_USERNAME/TWINE_PASSWORD
# =======================
release-test: build
@echo "Uploading to TestPyPI via twine..."
pipenv run twine upload -r testpypi dist/*

release: build
@echo "Uploading to PyPI via twine..."
pipenv run twine upload dist/*

# =======================
# Git tags (to trigger CI release workflows)
# =======================
tag:
@git tag v$(VERSION)
@echo "Created tag v$(VERSION)."

push-tag:
@git push origin v$(VERSION)
@echo "Pushed tag v$(VERSION) to origin."
17 changes: 17 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pytest = "*"
build = "*"
twine = "*"
eatnyc = {file = ".", editable = true}

[dev-packages]
build = "*"
twine = "*"
pytest = "*"
exceptiongroup = "*"
eatnyc = {file = ".", editable = true}
Loading