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.1.tar.gz (16.6 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.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_skyline_python-0.1.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gh_skyline_python-0.1.1.tar.gz
Algorithm Hash digest
SHA256 12d1fa4f9d21ce1edaaff64e0728979c652ce965aabf0bb32c25a589b1f6a88b
MD5 e894c21cc32f73d37ddb716fd25e15a5
BLAKE2b-256 6f20add872c2ae5d2451d9ab9d5e48649d775b7f074e4ec3176f591529dccbff

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_skyline_python-0.1.1.tar.gz:

Publisher: release-artifacts.yml on JLSteenwyk/gh-skyline-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gh_skyline_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7bf3d28f3d88a11a539171383267cc151535c5791ed1bee6e081f519beee351
MD5 d0658fc06bfa8678a088be5e7134d515
BLAKE2b-256 ae9278408c5fe73ba6871c8f14cfbe10ff36060aed9b7e124dae4c95d82369ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_skyline_python-0.1.1-py3-none-any.whl:

Publisher: release-artifacts.yml on JLSteenwyk/gh-skyline-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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