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.1

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.1
File Size Uploaded Provenance Actions
astronomy_types-3.0.1.tar.gz 3.7 kB Without provenance Details for astronomy_types-3.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / astronomy_types-3.0.1.tar.gz

Download URL astronomy_types-3.0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3a71b8210b4fc6e67015100240cb438a9b4b93a11081b9e0fc80b9231567bf65
BLAKE2b-256 checksum
How to use checksums
6534950be821161b6636810eee6106de03c7cd51bb863df0df1ef2987ebf0984
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.1-py3-none-any.whl

Download URL astronomy_types-3.0.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6633cd6c53c88085b31c51d257a6b1abec357eac0aec3f99c78d0cea232ce26a
BLAKE2b-256 checksum
How to use checksums
807b18c087d6dd02f0e2f1ece085ef23f68199ff55d7efc74753fecb7d9fae41
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.1

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