Skip to main content

This project is intended to be used as a type hinting system for a related project, practical_astronomy, and has been developed in conjunction with that project. It may be useful for other projects as well.

It is a defined vocabulary of commonly used astronomical terms represented in code.

It felt plausible that it would be useful in other projects as well, so it has been spun off into an indepdenent file.

Install

pip install astronomy-types

How to use?

import astronomy_types

See astronomy_types.py for currently implemented types.

Set a return type for a function

def degrees_to_decimal_degrees(degrees: astronomy_types.Degrees) -> astronomy_types.DecimalDegrees

Updating and Repackaging the Project with setuptools

To update and repackage this Python project using setuptools on macOS, follow these steps:

1. Install or Activate the Virtual Environment

It's recommended to use a virtual environment for isolation. If you don't already have a virtual environment, create and activate one:

Create and start virtual environment:

python3 -m venv venv
source venv/bin/activate

2. Install Required Dependencies

Ensure that setuptools and wheel are installed in your environment:

pip install -r requirements.txt
pip install -e .

3. Update version number

setup(
    name="astronomy_types",
    version="0.2.0",  # Update this to the new version number
    ...
)

4. Build the dist

python setup.py sdist bdist_wheel

5. Upload with twine

twine upload dist/*

And enter in the API token when prompted

Metadata

Release files for astronomy-types 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astronomy-types 3.0.0
File Size Uploaded Provenance Actions
astronomy_types-3.0.0.tar.gz 3.7 kB Without provenance Details for astronomy_types-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for astronomy-types 3.0.0
File Interpreter ABI Platform Actions
astronomy_types-3.0.0-py3-none-any.whl Python 3 none any Details for astronomy_types-3.0.0-py3-none-any.whl

Total release size: 7.9 kB

Release files / astronomy_types-3.0.0.tar.gz

Download URL astronomy_types-3.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
783011fb637d0fb2ed6378737018dcdbcdc2713a3d4147ee739dcd06312c2171
BLAKE2b-256 checksum
How to use checksums
42f27ea57a7a7088c2362983143a11f750322ba33ef079060fbd69d06194c9b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / astronomy_types-3.0.0-py3-none-any.whl

Download URL astronomy_types-3.0.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e05cd4090a00a421edec73ad89e472957dc23502402274b152bf4775658282d
BLAKE2b-256 checksum
How to use checksums
8ad22d055376f6d1ff42ffcc4c6c1a6d58cc2da5abceb63b4b5769d7615f0502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for astronomy-types 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page