Skip to main content

Python MVP for generating GitHub Skyline STL models

Project description

gh-skyline-python logo

Docs · Plan · Report Bug · Request Feature

Tests Release Artifacts Docs Python Versions Contributors

gh-skyline-python

Python-only MVP of GitHub Skyline generation.

This project can fetch GitHub contribution history, render ASCII output, and generate an STL skyline.

Example Output (ASCII)

   ╽ ╻                            ╻
   ░ ░  ╻                 ╻       ░ ╻╻          ╻
   ░╻░╻ ░╻       ╻   ╻   ╻░     ╻ ░ ░░          ░
 ╻╻░░░░ ░░  ╻   ╻░  ╻░╻ ╻░░ ╻  ┃░╻░╽▓░      ╻ ╻ ░╻╻╻
 ░░░░░░╻░░  ░╻ ╻░░╻ ░░░╻░░░╻░╻ ░░░▒░░░     ╻░╻░ ▒░░░
░░░░░░░░░░░░░░░░░░░░░░▓░░░░░░░ ░░░░░░▒ ░  ░░░░░ ▒░░░

Run this to print an ASCII preview only:

PYTHONPATH=src python -m gh_skyline --year 2024 --user JLSteenwyk --art-only

ASCII Key

  • high activity at column top
  • medium activity at column top
  • low activity at column top
  • high activity in middle/base blocks
  • medium activity in middle/base blocks
  • low activity in middle/base blocks
  • . future dates (not yet reached)
  • <space> zero contributions

Current Status

Python-Only Workflow

This project does not require Go for development, testing, or fixture generation. All parity artifacts and tests are generated/validated using Python tooling in this repo.

  • MVP: ready for local skyline generation
  • Test status: 52 passed
  • Not complete yet: final parity tuning and release cutover polish

See migration tracking in:

  • docs/MIGRATION_PLAN.md
  • docs/PROGRESS.md

Requirements

  • Python 3.11+
  • Network access to GitHub GraphQL API
  • Auth via one of:
  1. gh CLI auth session (gh auth login)
  2. GITHUB_TOKEN or GH_TOKEN

Setup

cd gh-skyline-python
python3 -m venv venv
source venv/bin/activate
pip install -U pip
pip install -e .[dev]

Usage

Run as module:

PYTHONPATH=src python -m gh_skyline --year 2024 --user JLSteenwyk --output my-skyline

Or after editable install:

gh-skyline --year 2024 --user JLSteenwyk --output my-skyline

Multiple years

PYTHONPATH=src python -m gh_skyline --user JLSteenwyk --year 2019-2024 --output my-skyline

Full history (join year to now)

PYTHONPATH=src python -m gh_skyline --user JLSteenwyk --full --output my-skyline

ASCII preview only

PYTHONPATH=src python -m gh_skyline --year 2024 --user JLSteenwyk --art-only

Auth Notes

If gh is installed and on PATH, the tool uses it first.

If gh is not installed, set a token:

export GITHUB_TOKEN=YOUR_TOKEN

Optional GHES host override:

export GH_HOST=github.example.com

Testing

source venv/bin/activate
PYTHONPATH=src python -m pytest

Output

  • Default output filename pattern: {username}-{year|year-range}-github-skyline.stl
  • If --output omits .stl, the extension is added automatically.

3D Printing

The generated .stl file is ready for standard 3D-print workflows.

  1. Import the STL into a slicer (PrusaSlicer, Cura, Bambu Studio, etc.).
  2. Orient the model flat on the build plate.
  3. Slice to gcode and print.

Starter slicer settings:

  • Layer height: 0.20 mm
  • Walls/perimeters: 2-3
  • Top/bottom layers: 4-5
  • Infill: 10-15% (grid or gyroid)
  • Supports: Off (usually not needed)
  • Build plate adhesion: Brim if corners lift

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_skyline_python-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_skyline_python-0.1.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file gh_skyline_python-0.1.0.tar.gz.

File metadata

  • Download URL: gh_skyline_python-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for gh_skyline_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cad843428f0cf5cc7b38d507295f3144ba5fe069fc5bc7366839b04fc6e4fb26
MD5 915df6c4d52bd3781bdeb2935ad38895
BLAKE2b-256 fc7291e52188b9fd4e04ee405108d7b09333d28524aa25a6200b12dc83b9a1ec

See more details on using hashes here.

File details

Details for the file gh_skyline_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gh_skyline_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d417ce12c2023e2045f8c6dbda84a8e419a6a4501f42e7cd21779793a5d62a1
MD5 a3cef49b2ede3ff749e2e9ee1d36cbab
BLAKE2b-256 a5bf526db14548e74d87ce1b59a96c3a3cb1efe12bbc3b0c8c2ed3c9373080ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page