diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b47cbc3..1ac29ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,9 @@ jobs: needs: - make-release + env: + TARGET: real # "test" for tests, "real" for production + steps: - name: Checkout code @@ -71,6 +74,22 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build and publish rust crate dry-run + if: env.TARGET == 'test' + run: | + echo "${{ secrets.CRATESIO_KEY }}" | cargo login + cargo publish --allow-dirty --dry-run + env: + CRATESIO_KEY: ${{ secrets.CRATESIO_KEY }} + + - name: Build and publish rust crate + if: env.TARGET == 'real' + run: | + echo "${{ secrets.CRATESIO_KEY }}" | cargo login + cargo publish --allow-dirty + env: + CRATESIO_KEY: ${{ secrets.CRATESIO_KEY }} + build-python-wheels: name: Build Python Wheels strategy: diff --git a/.gitignore b/.gitignore index eafeb60..fa94bcf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,9 @@ target/* dist/* .venv .pytest_cache +.mypy_cache .vscode +.env __pycache__ diff --git a/Cargo.toml b/Cargo.toml index 34b73ee..6392908 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,19 @@ [package] name = "ruststartracker" version = "0.2.4" +description = "Lightweight Star Tracker" +authors = ["Nicolas Tobler "] +readme = "README.md" edition = "2021" +license = "MIT" +repository = "https://github.com/ntobler/ruststartracker" +keywords = ["rust", "startracker", "star", "tracker", "astro", "photography"] +include = [ + "src/**", + "ruststartracker/*.csv", + "./Cargo.toml", + "./README.md", +] [lib] name = "ruststartracker" diff --git a/src/lib.rs b/src/lib.rs index 004ffa7..8abffeb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ use numpy::{self, PyArrayMethods, PyUntypedArrayMethods, ToPyArray}; use pyo3::prelude::*; use pyo3::types::PyAny; -#[cfg(feature = "gaia")] +#[cfg(any(feature = "gaia", feature = "hipparcos"))] use pyo3::types::PyType; use pyo3::{ exceptions::PyRuntimeError, pyclass, pymethods, pymodule, types::PyModule, Bound, PyRef,