Skip to content

Comments

Features/pet activity#170

Merged
llinsss merged 13 commits intoDogStark:mainfrom
Mac-5:features/pet-activity
Feb 22, 2026
Merged

Features/pet activity#170
llinsss merged 13 commits intoDogStark:mainfrom
Mac-5:features/pet-activity

Conversation

@Mac-5
Copy link
Contributor

@Mac-5 Mac-5 commented Feb 22, 2026

Closes #160

Description

Brief description of changes made.

  • Add ActivityType enum (Walk, Run, Play, Training, Other)
  • Add ActivityRecord struct with duration, intensity, distance tracking
  • Implement add_activity_record() with validation
  • Implement get_activity_history()
  • Implement get_activity_stats() for time-based statistics
  • Add 7 comprehensive tests

Related Issue

Fixes #[issue number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Changes Made

  • Added new contract function(s)
  • Modified existing function(s)
  • Added/updated tests
  • Updated documentation
  • Added new data structures

Testing

  • All existing tests pass
  • Added tests for new functionality
  • Tested on local environment
  • Manual testing completed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Add screenshots to help explain your changes.

Additional Notes

Any additional information or context about the PR.

Mac-5 and others added 13 commits February 22, 2026 09:26
- Add BehaviorType enum (Aggression, Anxiety, Training, Socialization, Other)
- Add BehaviorRecord struct with severity validation (0-10)
- Add TrainingMilestone struct for tracking training progress
- Implement add_behavior_record() function
- Implement get_behavior_history() function
- Implement add_training_milestone() function
- Implement mark_milestone_achieved() function
- Implement get_training_milestones() function
- Implement get_behavior_improvements() function
- Add BehaviorKey enum for efficient storage indexing
- Add 12 comprehensive tests covering all functionality
- All 41 tests pass (no breaking changes)
- WASM compilation successful
- Documentation and usage examples included
- Add VetKey and StatsKey enums that were missing
- Fix DataKey references to use correct enum types (VetKey, MedicalKey)
- Add clinic_info field to Vet struct initialization
- Declare test_behavior module in lib.rs
- All behavior tests passing (12/12)
…ete emergency test

- Replace short test IPFS hashes with valid 46-char hashes
- Mark test_emergency_logging as ignored (requires Allergy struct)
- All 67 tests now pass (1 ignored)
- Add MultisigConfig and PetTransferProposal data structures
- Implement configure_multisig() for per-pet configuration
- Implement require_multisig_for_transfer() to initiate proposals
- Implement sign_transfer_proposal() for signature collection
- Implement multisig_transfer_pet() to execute transfers
- Add get_multisig_config() and disable_multisig() helpers
- Add get_transfer_proposal() for proposal details
- Include 17 comprehensive tests covering all scenarios
- Add complete documentation for all functions
- Support time-locked operations (7-day expiration)
- Ensure threshold validation and security checks
- Log all transfers in ownership history

Closes #[issue-number]
- Add ActivityType enum (Walk, Run, Play, Training, Other)
- Add ActivityRecord struct with duration, intensity, distance tracking
- Implement add_activity_record() with validation
- Implement get_activity_history()
- Implement get_activity_stats() for time-based statistics
- Add 7 comprehensive tests

All CI/CD checks pass (91 tests passing)
@llinsss llinsss merged commit 2791638 into DogStark:main Feb 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pet Activity & Exercise Tracking

2 participants