Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.15.0 #128

Merged
merged 141 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
a171e1a
poc
steveberardi Jan 2, 2025
250be63
move
steveberardi Jan 2, 2025
87f15cc
clean up
steveberardi Jan 2, 2025
b270266
good stuff
steveberardi Jan 4, 2025
d1a5459
dso poc
steveberardi Jan 4, 2025
6985524
clean up
steveberardi Jan 4, 2025
2d28da2
clean up
steveberardi Jan 5, 2025
29f1801
logging
steveberardi Jan 5, 2025
294d804
profiler
steveberardi Jan 5, 2025
30004b4
profiler
steveberardi Jan 5, 2025
d5dd2f0
profiler
steveberardi Jan 5, 2025
97f049e
add hip 55203
steveberardi Jan 5, 2025
5e8be20
where labels for stars
steveberardi Jan 5, 2025
44d9c62
deprecate
steveberardi Jan 5, 2025
2a1e19a
clean up
steveberardi Jan 5, 2025
0f51f47
fix schema on read
steveberardi Jan 5, 2025
1e562a4
dso where labels
steveberardi Jan 5, 2025
39d19a7
where to constellations
steveberardi Jan 5, 2025
bc55428
fix for zenith
steveberardi Jan 5, 2025
80519aa
format
steveberardi Jan 5, 2025
42e1018
clean up
steveberardi Jan 5, 2025
87724e6
fix
steveberardi Jan 5, 2025
6bfa61d
star get find to ibis
steveberardi Jan 6, 2025
97c740b
dso find get all
steveberardi Jan 6, 2025
22d0eee
constellation find get all
steveberardi Jan 6, 2025
48b9bd1
tests
steveberardi Jan 6, 2025
cb221d3
ra degrees
steveberardi Jan 9, 2025
6972fcc
stuff
steveberardi Jan 9, 2025
b23d4fa
clip path polygon
steveberardi Jan 10, 2025
04c234c
dso file
steveberardi Jan 10, 2025
fdd7c8b
Merge remote-tracking branch 'origin/star-57-clip-path-polygon' into …
steveberardi Jan 10, 2025
bf77d29
better
steveberardi Jan 10, 2025
8da69e3
better column mapping
steveberardi Jan 10, 2025
25074f5
pack polygons
steveberardi Jan 10, 2025
ca3e95d
map columns
steveberardi Jan 10, 2025
9d52d64
fix optic clip path
steveberardi Jan 10, 2025
fa18ac9
constellation borders in db
steveberardi Jan 11, 2025
7166f19
not used
steveberardi Jan 11, 2025
6493b00
required
steveberardi Jan 11, 2025
8f78616
changelog
steveberardi Jan 11, 2025
d29193d
cli and lint
steveberardi Jan 11, 2025
7bca03b
update tests
steveberardi Jan 11, 2025
78e43a5
fix
steveberardi Jan 11, 2025
77a7987
format
steveberardi Jan 11, 2025
492d930
fixes
steveberardi Jan 11, 2025
4e342cb
clean up
steveberardi Jan 11, 2025
4172692
clean up
steveberardi Jan 11, 2025
6722e2d
data
steveberardi Jan 11, 2025
e075c55
clean up
steveberardi Jan 11, 2025
4163651
clean up
steveberardi Jan 12, 2025
c34fb5c
docs
steveberardi Jan 12, 2025
bdb9386
marker index
steveberardi Jan 12, 2025
b3e2976
labeling
steveberardi Jan 12, 2025
bbf892f
clean up
steveberardi Jan 12, 2025
12e7e67
buffer
steveberardi Jan 12, 2025
d503b0f
clipping
steveberardi Jan 12, 2025
20fd7f1
buffer
steveberardi Jan 12, 2025
29c5e94
clipping
steveberardi Jan 12, 2025
0874cf2
zenith padding
steveberardi Jan 12, 2025
a2ce466
offset
steveberardi Jan 12, 2025
d9423e9
separate serpens
steveberardi Jan 12, 2025
4bd9ae9
tutorial code
steveberardi Jan 12, 2025
5c77932
new style
steveberardi Jan 13, 2025
31d57f5
docs
steveberardi Jan 13, 2025
734a7af
docs
steveberardi Jan 13, 2025
c6c6a07
styles
steveberardi Jan 14, 2025
6af4edd
fix horizon for maps
steveberardi Jan 14, 2025
cfe1637
comment
steveberardi Jan 14, 2025
0b8a755
fix
steveberardi Jan 14, 2025
c4e72a0
comment
steveberardi Jan 14, 2025
1a715c5
docs
steveberardi Jan 14, 2025
a9dfb29
blue gold
steveberardi Jan 14, 2025
3069c4e
docs
steveberardi Jan 15, 2025
76e8936
clean up data
steveberardi Jan 15, 2025
a6acac6
fix
steveberardi Jan 15, 2025
5a05291
clean up
steveberardi Jan 15, 2025
3b081d2
data docs
steveberardi Jan 16, 2025
c274171
clean up
steveberardi Jan 16, 2025
5d41b87
return
steveberardi Jan 17, 2025
c6f16ac
constellation star hips
steveberardi Jan 17, 2025
ea20137
better constellation plotting for horizon
steveberardi Jan 17, 2025
211a45d
format
steveberardi Jan 17, 2025
84509a5
docs
steveberardi Jan 18, 2025
e6a2f4a
adjust height
steveberardi Jan 18, 2025
9a4600c
comma
steveberardi Jan 18, 2025
b95b685
add qa checks
steveberardi Jan 18, 2025
d2d8906
table style
steveberardi Jan 18, 2025
cb706f2
add size
steveberardi Jan 18, 2025
f22f3fc
docs
steveberardi Jan 18, 2025
5f18e5d
imports
steveberardi Jan 18, 2025
cff2c1c
docs
steveberardi Jan 18, 2025
baba964
star hip ids for constellations
steveberardi Jan 18, 2025
ea60d0b
format
steveberardi Jan 18, 2025
62b9923
fix check
steveberardi Jan 18, 2025
c555aed
docstring
steveberardi Jan 18, 2025
2a3bf81
clean up
steveberardi Jan 18, 2025
ff123ab
clean up
steveberardi Jan 18, 2025
85658a4
clean up
steveberardi Jan 18, 2025
d16cb51
clean up
steveberardi Jan 18, 2025
19786ec
clean up
steveberardi Jan 18, 2025
c828cf7
fix examples
steveberardi Jan 18, 2025
ffa6e04
fix
steveberardi Jan 19, 2025
bee09a0
horizon example
steveberardi Jan 19, 2025
4be136e
wording
steveberardi Jan 19, 2025
31df8f8
ra degrees
steveberardi Jan 19, 2025
d940734
clean up
steveberardi Jan 19, 2025
6faecdf
ci build db
steveberardi Jan 19, 2025
6e59ca5
update
steveberardi Jan 19, 2025
3ab950d
build stars
steveberardi Jan 19, 2025
a9193d3
format
steveberardi Jan 19, 2025
b5d7c2e
fixes
steveberardi Jan 19, 2025
0fbd6bf
add build
steveberardi Jan 19, 2025
4406e5f
ci
steveberardi Jan 19, 2025
8f34a4c
fix build
steveberardi Jan 19, 2025
caa6e98
fix order
steveberardi Jan 19, 2025
ffdecb4
fix
steveberardi Jan 19, 2025
d330003
format
steveberardi Jan 19, 2025
4c7d326
stuff
steveberardi Jan 19, 2025
8148f4d
remove from repo
steveberardi Jan 19, 2025
42935de
drop 3.9
steveberardi Jan 19, 2025
dcfc285
json
steveberardi Jan 19, 2025
4f033e9
mkdir
steveberardi Jan 19, 2025
cfc7d3a
changelog
steveberardi Jan 19, 2025
6f9e286
load fonts on setup
steveberardi Jan 20, 2025
07e87ab
clean up
steveberardi Jan 20, 2025
7a07bc8
clean up
steveberardi Jan 20, 2025
c322e54
format
steveberardi Jan 20, 2025
97c28bc
uv
steveberardi Jan 20, 2025
5762c45
docs
steveberardi Jan 20, 2025
9849f95
tutorial
steveberardi Jan 20, 2025
fc62e4a
format
steveberardi Jan 20, 2025
49038d6
docs
steveberardi Jan 20, 2025
02f4102
clean up
steveberardi Jan 20, 2025
27b5b37
fix
steveberardi Jan 21, 2025
ae5d3d9
remove old
steveberardi Jan 22, 2025
a37319f
fix
steveberardi Jan 22, 2025
5cd347b
docs
steveberardi Jan 22, 2025
c9bd6af
build db
steveberardi Jan 22, 2025
4fa56d0
docs
steveberardi Jan 22, 2025
09e264f
clean up
steveberardi Jan 25, 2025
8724991
og
steveberardi Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ jobs:

- name: Build Docker image
run: make build

- name: Build sky.db
run: make db CI=true

- name: Build Examples
run: make examples

- name: Build Tutorial
run: make tutorial

- name: Build OpenNGC Data Reference
run: make scripts SCRIPT=ongc_docdata
- name: Build Data Reference
run: make build-doc-data

- name: Build Docs
run: make docs-build
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Build Docker Image
run: make build

- name: Check Lint
run: make lint CI=true

- name: Check Format
run: make format CI=true ARGS=--check

- name: Build sky.db
run: make db CI=true

- name: Run Tests
run: make test CI=true

- name: Check Image Hashes
run: make check-hashes CI=true

- name: Build
run: make flit-build

- name: Publish
env:
FLIT_USERNAME: __token__
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
- uses: actions/checkout@v4
- name: Build Docker Image
run: make build
- name: Build sky.db
run: make db CI=true
- name: Check Lint
run: make lint CI=true
- name: Check Format
Expand All @@ -25,30 +27,28 @@ jobs:
run: make check-hashes CI=true
- name: Build PIP Package
run: make flit-build
test-python-3-9:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Run Tests - Python 3.9
run: make test-3.9 CI=true

test-python-3-10:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Run Tests - Python 3.10
run: make test-3.10 CI=true

test-python-3-11:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Run Tests - Python 3.11
run: make test-3.11 CI=true

test-python-3-12:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Run Tests - Python 3.12
run: make test-3.12 CI=true

# Python 3.13 not supported yet, needs investigation!
# test-python-3-13:
# runs-on: ubuntu-22.04
Expand Down
19 changes: 15 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,28 @@ hip8.dat
CometEls.txt
ongc.gpkg

# Big Sky - Full Catalog
duckdb-extensions

# Sky Object Database
# ignore this because it's large and created on release
sky.db

# Data Folder
data/build/*
!data/build/.keep

# Big Sky Catalog
# we ignore this because of its size (50+ MB)
bigsky.stars.csv.gz
stars.bigsky.parquet
bigsky.*.csv.gz
bigsky*.parquet

hash_checks/data/*.png
hash_checks/results.html

temp*
temp.py
temp/
raw/
# raw/
scripts/temp/

# Documentation Generated Files
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ WORKDIR /starplot
RUN apt-get clean && apt-get update -y && apt-get install -y libgeos-dev libgdal-dev

# ---------------------------------------------------------------------
FROM base as dev
FROM base AS dev

WORKDIR /starplot

COPY . .

RUN pip install -r requirements.txt
RUN pip install -r requirements-dev.txt
RUN pip install uv
RUN uv pip install --system -r requirements.txt
RUN uv pip install --system -r requirements-dev.txt

ENV PYTHONPATH=/starplot/src/

RUN git config --global --add safe.directory /starplot

# Build database
RUN python data/scripts/db.py

CMD ["bash", "-c", "python -m pytest . && python hash_checks/hashio.py check"]
38 changes: 29 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DE421_URL=https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/a_old_v
ifeq ($(CI), true)
DR_ARGS=
else
DR_ARGS=-it
DR_ARGS=-it --env-file ./.env
endif

ifeq ($(PROFILE), true)
Expand All @@ -13,11 +13,11 @@ else
SCRATCH_ARGS=
endif

DOCKER_RUN=docker run --rm --env-file ./.env $(DR_ARGS) -v $(shell pwd):/starplot starplot-dev bash -c
DOCKER_RUN=docker run --rm $(DR_ARGS) -v $(shell pwd):/starplot starplot-dev bash -c
DOCKER_BUILDER=starplot-builder

DOCKER_BUILD_PYTHON=docker build -t starplot-$(PYTHON_VERSION) $(DOCKER_BUILD_ARGS) --build-arg="PYTHON_VERSION=$(PYTHON_VERSION)" --target dev .
DOCKER_RUN_PYTHON_TEST=docker run --rm $(DR_ARGS) -v $(shell pwd):/starplot starplot-$(PYTHON_VERSION)
DOCKER_RUN_PYTHON_TEST=docker run --rm $(DR_ARGS) starplot-$(PYTHON_VERSION)

export PYTHONPATH=./src/

Expand All @@ -36,7 +36,7 @@ lint:
$(DOCKER_RUN) "ruff check src/ tests/ hash_checks/ $(ARGS)"

format:
$(DOCKER_RUN) "python -m black src/ tests/ scripts/ examples/ hash_checks/ tutorial/ $(ARGS)"
$(DOCKER_RUN) "python -m black src/ tests/ scripts/ examples/ hash_checks/ tutorial/ data/ $(ARGS)"

test:
$(DOCKER_RUN) "python -m pytest --cov=src/ --cov-report=term --cov-report=html ."
Expand Down Expand Up @@ -70,11 +70,28 @@ profile:
$(DOCKER_RUN) "python -m cProfile -o temp/results.prof scripts/scratchpad.py && \
snakeviz -s -p 8080 -H 0.0.0.0 temp/results.prof"

prep-dsos:
$(DOCKER_RUN) "python -m starplot.data.prep.dsos"
# builds ALL data files and then database:
db:
@$(DOCKER_RUN) "python data/scripts/db.py"

prep-constellations:
$(DOCKER_RUN) "python -m starplot.data.prep.constellations"
build-data-clean:
mkdir -p data/build
rm -rf data/build/*

build-stars-mag11:
@$(DOCKER_RUN) "python data/scripts/bigsky_mag11.py"

build-dsos:
@$(DOCKER_RUN) "python data/scripts/dsos.py"

build-star-designations:
@$(DOCKER_RUN) "python data/scripts/star_designations.py"

build-constellations:
@$(DOCKER_RUN) "python data/scripts/constellations.py"

build-doc-data:
@$(DOCKER_RUN) "python data/scripts/docdata.py"

version:
@$(DOCKER_RUN) "python -c 'import starplot as sp; print(sp.__version__)'"
Expand Down Expand Up @@ -129,6 +146,9 @@ flit-publish: DR_ARGS=-e FLIT_USERNAME -e FLIT_PASSWORD
flit-publish:
$(DOCKER_RUN) "python -m flit publish"

flit-install:
FLIT_ROOT_INSTALL=1 flit install

# ------------------------------------------------------------------
# Utils
ephemeris:
Expand All @@ -151,4 +171,4 @@ clean:
rm -rf htmlcov
rm -f tests/data/*.png

.PHONY: build test shell flit-build flit-publish clean ephemeris hip8 scratchpad examples scripts tutorial
.PHONY: build test shell flit-build flit-publish clean ephemeris hip8 scratchpad examples scripts tutorial prep-dsos prep-constellations
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# <img src="https://raw.githubusercontent.com/steveberardi/starplot/main/docs/images/favicon.svg" width="48" style="vertical-align:middle"> Starplot
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/steveberardi/starplot/test.yml?style=for-the-badge&color=a2c185)
![Python](https://img.shields.io/pypi/pyversions/starplot?style=for-the-badge&color=85A2C1)
![PyPI](https://img.shields.io/pypi/v/starplot?style=for-the-badge&color=85C0C1)
![License](https://img.shields.io/github/license/steveberardi/starplot?style=for-the-badge&color=A485C1)
![Python](https://img.shields.io/pypi/pyversions/starplot?style=for-the-badge&color=6388b0)
![PyPI](https://img.shields.io/pypi/v/starplot?style=for-the-badge&color=57a8a8)
![License](https://img.shields.io/github/license/steveberardi/starplot?style=for-the-badge&color=8b63b0)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/steveberardi/starplot/test.yml?style=for-the-badge&color=88b063)

**Starplot** is a Python library for creating star charts and maps of the sky.

Expand All @@ -13,6 +13,7 @@
- 🪐 **Planets and Deep Sky Objects (DSOs)** - more than 14,000 objects built-in
- 🎨 **Custom Styles** - for all objects
- 📥 **Export** - png, svg, jpeg
- 🚀 **Data Backend** - powered by DuckDB + Ibis for fast object lookup
- 🧭 **Label Collision Avoidance**

## Examples
Expand Down Expand Up @@ -48,7 +49,7 @@ p = sp.MapPlot(
autoscale=True,
)
p.constellations()
p.stars(mag=4.6)
p.stars(where=[_.magnitude < 4.6])
p.constellation_labels()
p.export("starchart.png")
```
Expand All @@ -74,7 +75,6 @@ https://discord.gg/WewJJjshFu
Contributing to Starplot is welcome and very much appreciated! Please see [here](CONTRIBUTING.md) for details.

## Coming Soon
- 🗄️ Data optimizations
- 🧮 Coordinate system helpers
- 🌑 Planet moons
- ✴️ Custom markers
Expand Down
Loading