Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b9551ff
added to README
bcl9779 Nov 1, 2025
7a6e17d
Merge pull request #1 from swe-students-fall2025/connor-branch
Connorlee487 Nov 1, 2025
b5ab241
setup
bcl9779 Nov 1, 2025
1df9516
Merge pull request #2 from swe-students-fall2025/connor-setup
Connorlee487 Nov 1, 2025
7a99197
Added basic toml file
axie22 Oct 31, 2025
a1369ec
project toml file setup
axie22 Nov 1, 2025
4cecd7f
Added create pet function
axie22 Nov 2, 2025
1cdfdd5
Added instructions on how to run & test
axie22 Nov 2, 2025
607bf42
Pipfile created
axie22 Nov 2, 2025
b46ee94
created demo file
axie22 Nov 2, 2025
39da5f6
Added unit tests for create pet
axie22 Nov 2, 2025
7073a9c
Created init file with create pet
axie22 Nov 2, 2025
47530a2
Merge pull request #3 from swe-students-fall2025/create-mascot
player1notfound Nov 2, 2025
5a2288a
add
player1notfound Nov 2, 2025
5008319
add
player1notfound Nov 2, 2025
bec03bf
Merge pull request #4 from swe-students-fall2025/code
player1notfound Nov 2, 2025
46df437
Update demo.py
player1notfound Nov 2, 2025
762b544
add
player1notfound Nov 2, 2025
7b04184
Update demo.py
player1notfound Nov 2, 2025
475764f
Revert
player1notfound Nov 2, 2025
d989110
Revert "Code"
player1notfound Nov 2, 2025
4c52481
Merge pull request #5 from swe-students-fall2025/revert-4-code
player1notfound Nov 2, 2025
0037036
Add CI workflow
axie22 Nov 3, 2025
ceb286d
Implemented feed() and helper functions for pyPet
mzhou3299 Nov 3, 2025
02b7e23
finished func and added tests
bcl9779 Nov 3, 2025
d8d67c3
Merge pull request #6 from swe-students-fall2025/github-actions
axie22 Nov 3, 2025
9a74bcf
Merge pull request #7 from swe-students-fall2025/test-pypet-connor
axie22 Nov 3, 2025
53a7f64
Save
player1notfound Nov 3, 2025
4b5d59a
Refined feed tests for realistic behavior and mood logic
mzhou3299 Nov 3, 2025
7e08179
Merge pull request #8 from swe-students-fall2025/matthew-feed-feature
axie22 Nov 3, 2025
1b534b9
Save
player1notfound Nov 3, 2025
94e718b
Save
player1notfound Nov 3, 2025
f6a180f
Save
player1notfound Nov 3, 2025
00c3c79
Merge pull request #10 from swe-students-fall2025/code
Connorlee487 Nov 3, 2025
3c12d71
Added info for uploading to testpypi
axie22 Nov 3, 2025
0fb115b
Setup status badge in event logger
axie22 Nov 4, 2025
e120a74
Added coverage badge
axie22 Nov 4, 2025
55c634f
Merge pull request #11 from swe-students-fall2025/ReadMe
player1notfound Nov 4, 2025
d229892
Badge fix
axie22 Nov 4, 2025
61f973e
Merge pull request #12 from swe-students-fall2025/demo
axie22 Nov 4, 2025
a766bad
Updated badge to point to CI file
axie22 Nov 4, 2025
f61374e
Merge pull request #13 from swe-students-fall2025/demo
axie22 Nov 4, 2025
4d9f8c0
created more comprehensive demo
axie22 Nov 4, 2025
e6cd608
Added all new funcs to init file:
axie22 Nov 4, 2025
f81cdaf
Fixed play func to update pet inplace
axie22 Nov 4, 2025
f823d5e
clean up file
axie22 Nov 4, 2025
244c794
updated tests to match func changes in play
axie22 Nov 4, 2025
7fe15ee
Merge pull request #14 from swe-students-fall2025/demo
axie22 Nov 4, 2025
0ea6d17
Bumped version and added demo to testpypi
axie22 Nov 5, 2025
35401a7
Made demo accessible to pypi
axie22 Nov 5, 2025
33199f7
Added instructions on usage in README
axie22 Nov 5, 2025
131f1e7
Merge pull request #15 from swe-students-fall2025/demo
axie22 Nov 5, 2025
63303e5
change readme
bcl9779 Nov 5, 2025
8deec29
Merge pull request #16 from swe-students-fall2025/connor-branch
axie22 Nov 5, 2025
030249a
small update to README
mzhou3299 Nov 5, 2025
4c7c2ec
Merge pull request #18 from swe-students-fall2025/matthew-fix-readme
Connorlee487 Nov 5, 2025
6c6029d
review code and change readme
aklLiu5062 Nov 5, 2025
419173a
Revert "review code and change readme"
aklLiu5062 Nov 5, 2025
6ad7753
Reviewed code again & added readme title
aklLiu5062 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
3 changes: 3 additions & 0 deletions .github/workflows/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ pytz = "*"
python-dateutil = "*"

[dev-packages]
pytest = "*"
build = "*"
twine = "*"

[requires]
python_version = "3"
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
pull_request:
branches: [ pipfile-experiment ]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install build + test tooling
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
# build tools
python -m pip install build

- name: Run tests
run: |
pytest -q

- name: Build package (sdist & wheel)
run: |
python -m build

- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: pypet-dist-${{ matrix.python-version }}
path: dist/*
125 changes: 102 additions & 23 deletions .github/workflows/event-logger.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,133 @@
name: log github events

on:
push:
branches: [main, master, pipfile-experiment]
branches: [ main, master, pipfile-experiment ]
pull_request:
types: [opened, closed]
branches: [main, master, pipfile-experiment]
types: [ opened, closed ]
branches: [ main, master, pipfile-experiment ]
workflow_dispatch: {} # allow manual runs so the badge can show status any time

permissions:
contents: read

concurrency:
group: event-logger-${{ github.ref }}
cancel-in-progress: true

jobs:
log:
runs-on: ubuntu-latest
env:
PIPENV_PIPFILE: .github/workflows/Pipfile # so this script doesn't use the Pipfile in the root directory
# keep using the workflow-local Pipfile so we don't pollute the project env
PIPENV_PIPFILE: .github/workflows/Pipfile
COMMIT_LOG_API: ${{ secrets.COMMIT_LOG_API }}
GITHUB_LOGIN: ${{ github.actor }} # github login also available in github.triggering_actor, github.event.sender.login
GITHUB_LOGIN: ${{ github.actor }}
COMMITS: ${{ toJSON(github.event.commits) }}
REPOSITORY_URL: ${{ github.repositoryUrl }}
REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository }}
EVENT_TYPE: ${{ github.event_name }}
EVENT_ACTION: ${{ github.event.action }}
PR_MERGED: ${{ github.event.pull_request.merged }}
PR_CREATED_AT: ${{ github.event.pull_request.created_at}}
PR_CLOSED_AT: ${{ github.event.pull_request.closed_at}}
PR_CREATED_AT: ${{ github.event.pull_request.created_at }}
PR_CLOSED_AT: ${{ github.event.pull_request.closed_at }}

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # this is important so git fetches all history.. the actions/checkout by default fetches all history as one commit which throws off stats
- uses: actions/setup-python@v3
fetch-depth: 0 # needed for accurate stats

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "^3.9"
- name: Install dependencies
python-version: "3.10"
cache: pip

- name: Install dependencies (pipenv in workflow scope)
run: |
set -euo pipefail
python -m pip install --upgrade pip
pip install --user pipenv
pipenv --python $(which python)
python -m pip install pipenv
pipenv --python "$(which python)"
pipenv install

# --- helpful diagnostics ---
- name: Dump GitHub context
run: |
set -euo pipefail
echo "Event: ${{ github.event_name }}"
echo "Action: ${{ github.event.action }}"
echo "Ref: ${{ github.ref }}"
echo "SHA: ${{ github.sha }}"
echo "Actor: ${{ github.actor }}"
echo "Repo: ${{ github.repository }}"
echo '${{ toJson(github.event) }}' > event.json
cat event.json | head -c 2000 || true

# --- event-specific logging ---
- name: Log pull request opened
if: github.event_name == 'pull_request' && github.event.action == 'opened'
run: |
pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_opened -d $(echo $PR_CREATED_AT) -un $(echo $GITHUB_LOGIN) -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v
set -euo pipefail
pipenv run gitcommitlogger \
-r "${REPOSITORY_URL}" \
-t pull_request_opened \
-d "${PR_CREATED_AT}" \
-un "${GITHUB_LOGIN}" \
-o commit_stats.csv \
-u "${COMMIT_LOG_API}" \
-v

- name: Log pull request closed and merged
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: |
echo $COMMITS > commits.json
cat commits.json # debugging
pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_merged -d $(echo $PR_CLOSED_AT) -un $(echo $GITHUB_LOGIN) -i commits.json -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v
set -euo pipefail
echo '${{ toJson(github.event.pull_request) }}' > pr.json
echo "${COMMITS}" > commits.json
pipenv run gitcommitlogger \
-r "${REPOSITORY_URL}" \
-t pull_request_merged \
-d "${PR_CLOSED_AT}" \
-un "${GITHUB_LOGIN}" \
-i commits.json \
-o commit_stats.csv \
-u "${COMMIT_LOG_API}" \
-v

- name: Log pull request closed without merge
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == false
run: |
pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_closed -d $(echo $PR_CLOSED_AT) -un $(echo $GITHUB_LOGIN) -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v
set -euo pipefail
pipenv run gitcommitlogger \
-r "${REPOSITORY_URL}" \
-t pull_request_closed \
-d "${PR_CLOSED_AT}" \
-un "${GITHUB_LOGIN}" \
-o commit_stats.csv \
-u "${COMMIT_LOG_API}" \
-v

- name: Log push
if: github.event_name == 'push'
run: |
echo $COMMITS > commits.json
cat commits.json # debugging
pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t $(echo $EVENT_TYPE) -i commits.json -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v
set -euo pipefail
echo "${COMMITS}" > commits.json
pipenv run gitcommitlogger \
-r "${REPOSITORY_URL}" \
-t "${EVENT_TYPE}" \
-i commits.json \
-o commit_stats.csv \
-u "${COMMIT_LOG_API}" \
-v

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: event-logger-${{ github.run_number }}
path: |
event.json
pr.json
commits.json
commit_stats.csv
if-no-files-found: ignore
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]
pytest-cov = "*"
codecov = "*"
coveralls = "*"

[requires]
python_version = "3.13"
Loading