toy_package

a simple toy package generated when learning software packaging

https://github.com/bosup/toy_package

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

a simple toy package generated when learning software packaging

Basic Info
  • Host: GitHub
  • Owner: bosup
  • License: apache-2.0
  • Language: HTML
  • Default Branch: main
  • Size: 21.5 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 9 months ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

codecov

Toy Package

A toy Python package for analyzing atmospheric river metrics, with modular structure, CLI access, unit testing, and Sphinx documentation.


📦 Project Structure

toy_package/ ├── toy/ # Main package │ ├── api/ # Class-based API modules │ ├── utils/ # Core analytical functions │ ├── cli.py # Command-line interface entry │ └── __init__.py ├── tests/ # pytest-based tests ├── data/ # Sample/test data files (.npy) ├── docs/ # Sphinx documentation ├── .github/workflows/ # GitHub Actions CI/CD ├── pyproject.toml # Build configuration ├── run_tests.sh # Shell script to run tests and coverage ├── .readthedocs.yaml # RTD configuration ├── MANIFEST.in # Include data/doc files in builds (optional) ├── LICENSE # Project license └── CITATION.cff # Citation metadata


🛠 Installation

```bash

Create and activate environment

conda env create -f environment.yml conda activate toy_env

Or install via pip (editable mode for dev)

pip install -e . ```


🚀 Run the CLI

bash toy --mode intensity --data 1.0 2.0 3.0 toy --mode trend --data 3.0 2.0 1.0 toy --mode max --data 1.0 2.0 3.0 toy --mode summary --data 1.0 2.0 3.0

If toy is not recognized, use:

bash python toy/cli.py --mode summary --data 1.0 2.0 3.0


✅ Run Tests

bash ./run_tests.sh

Generates: - report.html – test result report - htmlcov/ – coverage report


📚 Build Documentation

bash cd docs sphinx-build -b html . _build/html open _build/html/index.html


🚀 Deploy & CI/CD

  • Docs auto-deploy to GitHub Pages via .github/workflows/docs.yml
  • Tests & Coverage run via .github/workflows/test.yml
  • PyPI Publishing supported with git tag vX.Y.Z and PYPI_API_TOKEN secret

🧪 Coverage

After running tests:

  • View HTML: htmlcov/index.html
  • Badge updates via Codecov in README

📖 Citation

See CITATION.cff or cite as: Your Name (2025). toy: Atmospheric River Metrics Package (v0.1.0).

Owner

  • Name: Bo
  • Login: bosup
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this package, please cite it as below."
authors:
    bosup
title: "a toy package"
version: "0.1.0"
date-released: 2025-05-29

GitHub Events

Total
  • Push event: 1
  • Create event: 2
Last Year
  • Push event: 1
  • Create event: 2

Dependencies

.github/workflows/docs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/release.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/test.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • codecov/codecov-action v4 composite
environment.yml pypi
  • pytest *
  • pytest-cov *
  • pytest-html *
  • sphinx *
pyproject.toml pypi
  • numpy >=1.21,<2.0