{"id":44340610,"url":"https://github.com/dkdndes/pybiorythm","last_synced_at":"2026-02-11T12:57:54.852Z","repository":{"id":308705566,"uuid":"1033750171","full_name":"dkdndes/pybiorythm","owner":"dkdndes","description":"PyBiorythm - Educational GitHub Actions Showcase","archived":false,"fork":false,"pushed_at":"2025-10-13T07:13:13.000Z","size":6173,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-01-12T23:29:30.863Z","etag":null,"topics":["blue-green-deployment","deployement-s","docker","educational","python","sbom","secutrity","semantic-release","testing"],"latest_commit_sha":null,"homepage":"https://dkdndes.github.io/pybiorythm/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkdndes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-07T09:36:59.000Z","updated_at":"2025-08-24T09:28:46.000Z","dependencies_parsed_at":"2025-08-07T12:44:42.349Z","dependency_job_id":null,"html_url":"https://github.com/dkdndes/pybiorythm","commit_stats":null,"previous_names":["dkdndes/pybiorythm"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/dkdndes/pybiorythm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkdndes%2Fpybiorythm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkdndes%2Fpybiorythm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkdndes%2Fpybiorythm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkdndes%2Fpybiorythm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkdndes","download_url":"https://codeload.github.com/dkdndes/pybiorythm/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkdndes%2Fpybiorythm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29333146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T12:42:24.625Z","status":"ssl_error","status_checked_at":"2026-02-11T12:41:23.344Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blue-green-deployment","deployement-s","docker","educational","python","sbom","secutrity","semantic-release","testing"],"created_at":"2026-02-11T12:57:54.152Z","updated_at":"2026-02-11T12:57:54.844Z","avatar_url":"https://github.com/dkdndes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyBiorythm - Educational GitHub Actions Showcase\n\n[![Python Version](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://python.org)\n[![Tests](https://img.shields.io/badge/tests-72%20passed-green.svg)](https://github.com/dkdndes/pybiorythm)\n[![Coverage](https://img.shields.io/badge/coverage-90.33%25-brightgreen.svg)](https://github.com/dkdndes/pybiorythm)\n[![CI/CD](https://github.com/dkdndes/pybiorythm/actions/workflows/ci.yml/badge.svg)](https://github.com/dkdndes/pybiorythm/actions/workflows/ci.yml)\n[![Docker](https://img.shields.io/badge/docker-multi--stage-blue.svg)](Dockerfile)\n[![Security](https://github.com/dkdndes/pybiorythm/actions/workflows/codeql.yml/badge.svg)](https://github.com/dkdndes/pybiorythm/actions/workflows/codeql.yml)\n[![SBOM](https://github.com/dkdndes/pybiorythm/actions/workflows/sbom.yml/badge.svg)](https://github.com/dkdndes/pybiorythm/actions/workflows/sbom.yml)\n[![Documentation](https://github.com/dkdndes/pybiorythm/actions/workflows/docs.yml/badge.svg)](https://github.com/dkdndes/pybiorythm/actions/workflows/docs.yml)\n[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Code Style](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)\n\n\u003e **Educational Note**: This project serves as a **comprehensive example of modern DevOps practices** and GitHub Actions workflows. While it implements biorhythm calculations (pseudoscience), its primary purpose is to demonstrate professional CI/CD pipelines, security practices, and deployment strategies.\n\n## 🎓 What You'll Learn\n\nThis repository showcases **10 production-ready GitHub Actions workflows** that demonstrate:\n\n- **Automated Testing \u0026 Quality Gates** - Multi-version Python testing, coverage enforcement, linting\n- **Security-First Development** - CodeQL analysis, dependency scanning, SBOM generation\n- **Multi-Environment Deployments** - Dev/staging/prod with blue-green deployment strategies  \n- **Docker Multi-Architecture Builds** - ARM64/AMD64 container builds with security scanning\n- **Semantic Release Automation** - Conventional commits driving automated versioning\n- **Documentation Automation** - MkDocs deployment to GitHub Pages\n- **Local Development Tools** - `act` for local GitHub Actions testing\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\n# Install the package\npip install biorythm\n\n# Or install from source  \ngit clone https://github.com/dkdndes/pybiorythm.git\ncd pybiorythm\npip install -e .\n```\n\n### Basic Usage\n\n```python\nfrom datetime import datetime\nfrom biorythm import BiorhythmCalculator\n\n# Create calculator\ncalc = BiorhythmCalculator(width=60, days=30)\n\n# Generate chart for someone born May 15, 1990\nbirthdate = datetime(1990, 5, 15)\ncalc.generate_chart(birthdate)\n\n# Generate JSON data for analysis\njson_data = calc.generate_timeseries_json(birthdate)\n```\n\n### Command Line\n\n```bash\n# Interactive mode\npython main.py\n\n# Direct calculation  \npython main.py -y 1990 -m 5 -d 15 --orientation vertical\npython main.py -y 1990 -m 5 -d 15 --orientation json-horizontal\n\n# Different chart orientations\npython main.py -y 1990 -m 5 -d 15 --orientation horizontal --days 30\n\n# Generate JSON output for data analysis\npython main.py -y 1990 -m 5 -d 15 --orientation json-vertical\n```\n\n## Chart Types\n\n### Vertical Chart (Traditional)\nTime flows top-to-bottom, cycles displayed across width:\n```\nMon May 15    p     :     e i    \nTue May 16       p  :  e      i  \nWed May 17          : p    e   i \n```\n\n### Horizontal Chart (Timeline)\nTime flows left-to-right, cycles displayed as wave patterns:\n```\nBIORHYTHM WAVE (all cycles)\n                    e               \n            p               i       \n                        e           \n```\n\n### JSON Output\nStructured data suitable for analysis, visualization, and testing.\n\n## Features\n\n- **Multiple Output Formats**: ASCII charts (vertical/horizontal) and JSON data\n- **Critical Day Detection**: Identifies days when cycles cross zero\n- **Cycle Information**: Shows when cycles repeat (644 days for physical+emotional, 21,252 days for all three)\n- **Scientific Context**: Includes historical background and scientific disclaimers\n- **Robust Error Handling**: Input validation and comprehensive error messages\n- **Configurable Parameters**: Adjustable chart width, time periods, and orientations\n\n## API Reference\n\n### BiorhythmCalculator\n\nMain class for generating biorhythm calculations and charts.\n\n```python\nBiorhythmCalculator(width=55, days=29, orientation=\"vertical\")\n```\n\n**Parameters:**\n- `width` (int): Chart width in characters (minimum 12)\n- `days` (int): Number of days to plot\n- `orientation` (str): \"vertical\" or \"horizontal\"\n\n**Methods:**\n\n#### `generate_chart(birthdate, plot_date=None)`\nGenerate and print ASCII chart to stdout.\n\n#### `generate_timeseries_json(birthdate, plot_date=None, chart_orientation=\"vertical\")`\nGenerate JSON payload with timeseries data and metadata.\n\n#### `calculate_biorhythm_values(birthdate, target_date)`\nCalculate raw cycle values for a specific date.\n\nReturns tuple: `(physical, emotional, intellectual)` values between -1.0 and +1.0.\n\n## Command Line Arguments\n\n```\npython main.py [OPTIONS]\n\nOptions:\n  -y, --year YEAR              Birth year (1-9999)\n  -m, --month MONTH            Birth month (1-12)  \n  -d, --day DAY                Birth day (1-31)\n  --orientation {vertical,horizontal,json-vertical,json-horizontal}\n                               Chart orientation (default: vertical)\n  --days DAYS                  Number of days to plot (default: 29)\n  -h, --help                   Show help message\n```\n\n## 🔧 GitHub Actions Workflows (Educational Focus)\n\n### Core CI/CD Pipeline (`ci.yml`)\n**What it demonstrates:**\n- **Matrix Testing** across Python 3.9-3.12\n- **Quality Gates** with Ruff linting and 90%+ test coverage  \n- **Security Scanning** with Bandit and Safety\n- **Docker Testing** with multi-stage builds\n- **Performance Benchmarking** with regression detection\n\n```yaml\n# Key features showcased:\nstrategy:\n  matrix:\n    python-version: ['3.9', '3.10', '3.11', '3.12']\n```\n\n### Semantic Release Automation (`semantic-release.yml`)\n**What it demonstrates:**\n- **Conventional Commits** driving version bumps\n- **Automated Changelog** generation\n- **Git Tag Management** and GitHub releases\n- **Cross-workflow Triggers** for downstream builds\n\n### Multi-Environment Docker (`dev-docker.yml`, `docker-publish.yml`)\n**What it demonstrates:**\n- **Environment-specific Builds** (dev/staging/prod)\n- **Semantic Versioning** for container tags\n- **Multi-architecture Builds** (AMD64/ARM64)\n- **Blue-green Deployment** manifest generation\n\n### Security \u0026 Compliance (`codeql.yml`, `sbom.yml`)\n**What it demonstrates:**\n- **Static Code Analysis** with CodeQL\n- **Software Bill of Materials** (BSI TR-03183-2-2 compliant)\n- **Vulnerability Scanning** with Trivy\n- **Security Attestation** and supply chain security\n\n### Manual Deployment (`manual-deploy.yml`)\n**What it demonstrates:**\n- **Workflow Dispatch** with input parameters\n- **Rolling vs Blue-Green** deployment strategies\n- **Environment Gates** and approvals\n- **Rollback Procedures** and traffic switching\n\n### Documentation Automation (`docs.yml`)\n**What it demonstrates:**\n- **MkDocs** automated deployment to GitHub Pages\n- **Link Validation** and content checking\n- **Multi-environment** documentation builds\n- **PR Preview** generation\n\n## 🧪 Local Testing with `act`\n\nThis project includes comprehensive local testing tools:\n\n```bash\n# Quick development tests (30 seconds)\n./local-test.sh quick\n\n# Test specific workflow\n./local-test.sh job test ci.yml\n\n# List all available workflows\n./local-test.sh list\n\n# Validate workflow syntax\n./local-test.sh validate\n```\n\n**Educational Value**: Learn how to test GitHub Actions locally before pushing to save time and CI credits.\n\n## 📊 Quality Metrics \u0026 Monitoring\n\nThe project maintains enterprise-grade quality standards:\n\n- ✅ **90.33% Test Coverage** (enforced at 85%+ minimum)\n- ✅ **72 Passing Tests** across all components\n- ✅ **Zero Security Vulnerabilities** (automated scanning)\n- ✅ **BSI-Compliant SBOM** for supply chain transparency\n- ✅ **Multi-architecture Docker** support (ARM64/AMD64)\n- ✅ **Conventional Commits** with semantic versioning\n\n## 🏗️ Architecture \u0026 Design Patterns\n\n### DevOps Patterns Demonstrated\n\n1. **GitFlow with Semantic Release**\n   ```\n   feature/* → develop → main → v1.2.3 (automated)\n   ```\n\n2. **Multi-Stage Docker Builds**\n   ```dockerfile\n   # Builder stage for dependencies\n   FROM python:3.12-slim as builder\n   # Production stage for runtime\n   FROM python:3.12-slim as production\n   ```\n\n3. **Blue-Green Deployments**\n   ```bash\n   # Deploy to inactive slot\n   kubectl apply -f deployment-blue.yaml\n   # Switch traffic after validation  \n   kubectl patch service app -p '{\"spec\":{\"selector\":{\"slot\":\"blue\"}}}'\n   ```\n\n4. **Security-First Development**\n   - SBOM generation for all dependencies\n   - Multi-layer vulnerability scanning\n   - Signed container attestations\n   - Automated security patch detection\n\n## 📚 Documentation\n\nFor comprehensive documentation and advanced usage:\n\n- **[📖 Complete Documentation](docs/README.md)** - Architecture, setup, and advanced features\n- **[🚀 Quick Start Guide](docs/user-guide/quick-start.md)** - Get started in 5 minutes\n- **[⚙️ Developer Guide](docs/developer-guide/setup.md)** - Contributing and local development\n- **[🚢 Deployment Guide](docs/deployment/)** - Docker, Kubernetes, and CI/CD\n- **[🔧 GitHub Actions Guide](docs/workflows/)** - Understanding the CI/CD workflows\n\n## 🔬 Scientific Disclaimer\n\n**Important**: This software implements biorhythm theory, which is considered **pseudoscience**. Extensive scientific research has found **NO VALIDITY** to biorhythm theory beyond coincidence.\n\n**This implementation is provided FOR EDUCATIONAL PURPOSES ONLY** to demonstrate:\n- Modern Python packaging and distribution\n- Comprehensive CI/CD pipeline implementation\n- Security scanning and compliance practices\n- Multi-environment deployment strategies\n- Documentation automation\n\nThe biorhythm calculations serve as a simple, understandable domain for showcasing these DevOps practices.\n\n## 🤝 Contributing\n\nThis project welcomes contributions that improve the **DevOps and CI/CD demonstrations**:\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feature/amazing-workflow`)\n3. **Follow** conventional commits (`feat: add new deployment strategy`)\n4. **Test** locally with `act` before pushing\n5. **Submit** a pull request\n\nSee [Contributing Guide](docs/developer-guide/contributing.md) for detailed guidelines.\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## 🏷️ Keywords\n\n`github-actions` `ci-cd` `devops` `docker` `python` `testing` `security` `automation` `deployment` `blue-green` `semantic-release` `sbom` `educational`\n\n---\n\n**Remember**: The real value here is in the **DevOps patterns and GitHub Actions workflows**, not the biorhythm calculations! 🎯","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkdndes%2Fpybiorythm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkdndes%2Fpybiorythm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkdndes%2Fpybiorythm/lists"}