Skip to content
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
53 changes: 53 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copilot Instructions for cpap-monitor

## Project Overview
This is a CPAP (Continuous Positive Airway Pressure) monitor application designed to help users track and analyze their CPAP therapy data.

## Technology Stack
- **Language**: Python
- **Project Type**: Healthcare monitoring application

## Code Style Guidelines
- Follow PEP 8 style guide for Python code
- Use meaningful variable and function names
- Write clear, concise comments for complex logic
- Keep functions focused and single-purpose
- Use type hints where appropriate

## Development Workflow
- Write tests for new features and bug fixes
- Ensure all tests pass before committing
- Keep commits focused and atomic
- Write clear, descriptive commit messages

## Testing
- Use pytest for unit testing
- Maintain good test coverage
- Test edge cases and error conditions
- Mock external dependencies appropriately

## Security Considerations
- Handle sensitive medical data with care
- Follow HIPAA guidelines where applicable
- Validate all user inputs
- Use secure authentication and authorization
- Never commit sensitive data or credentials

## Documentation
- Update README.md when adding new features
- Document all public APIs and functions
- Keep inline comments up to date
- Update CONTRIBUTING.md if development workflow changes

## Dependencies
- Keep dependencies up to date
- Document any new dependencies added
- Use virtual environments for development
- Pin dependencies in requirements.txt

## Best Practices
- Follow the principle of least privilege
- Use meaningful error messages
- Log important events and errors
- Handle exceptions gracefully
- Write self-documenting code where possible
128 changes: 128 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributing to cpap-monitor

Thank you for your interest in contributing to cpap-monitor! This document provides guidelines and instructions for contributing to this project.

## Code of Conduct

This project adheres to a Code of Conduct that all contributors are expected to follow. Please read [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before contributing.

## How to Contribute

### Reporting Bugs

If you find a bug, please create an issue using the bug report template. Include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Your environment (OS, Python version, etc.)
- Any relevant logs or screenshots

### Suggesting Enhancements

We welcome feature requests! Please create an issue using the feature request template and include:
- A clear and descriptive title
- Detailed description of the proposed feature
- Use cases and benefits
- Any potential implementation ideas

### Pull Requests

1. **Fork the repository** and create your branch from `main`
2. **Make your changes** following the code style guidelines
3. **Add tests** for any new functionality
4. **Ensure all tests pass** by running the test suite
5. **Update documentation** if needed
6. **Submit a pull request** with a clear description of your changes

#### Pull Request Guidelines

- Use a clear and descriptive title
- Reference any related issues (e.g., "Fixes #123")
- Describe what changes you made and why
- Include screenshots for UI changes
- Ensure your code passes all tests and linting
- Keep pull requests focused on a single feature or fix

## Development Setup

1. Clone the repository:
```bash
git clone https://github.com/eimi-codes/cpap-monitor.git
cd cpap-monitor
```

2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```

3. Install dependencies:
```bash
pip install -r requirements.txt
pip install -r requirements-dev.txt # If available
```

4. Run tests:
```bash
pytest
```

## Code Style

- Follow [PEP 8](https://pep8.org/) style guide for Python code
- Use meaningful variable and function names
- Write docstrings for functions and classes
- Keep functions small and focused
- Use type hints where appropriate

### Code Formatting

We recommend using:
- **black** for code formatting
- **isort** for import sorting
- **flake8** or **ruff** for linting
- **mypy** for type checking

## Testing

- Write tests for all new features and bug fixes
- Maintain or improve test coverage
- Use pytest for writing tests
- Mock external dependencies appropriately
- Test edge cases and error conditions

## Documentation

- Update README.md with any new features or changes
- Add docstrings to all public functions and classes
- Update inline comments when changing code
- Keep documentation clear and concise

## Commit Messages

Write clear, descriptive commit messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters
- Reference issues and pull requests when relevant

Example:
```
Add CPAP data import feature

- Implement CSV import functionality
- Add validation for data format
- Include tests for import logic

Fixes #42
```

## Questions?

If you have questions or need help, feel free to:
- Open an issue for discussion
- Reach out to the maintainers

Thank you for contributing! 🎉
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 eimi-codes

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading