Skip to main content

Type hints for Python astronomy projects

Project description

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 setuptools wheel twine

or

pip install -r requirements.txt

3. Update version number

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

4. Build the dist

python3 setup.py sdist bdist_wheel

5. Upload with twine

twine upload dist/*

And enter in the API token when prompted

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

astronomy_types-2.0.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astronomy_types-2.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file astronomy_types-2.0.0.tar.gz.

File metadata

  • Download URL: astronomy_types-2.0.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for astronomy_types-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ac4f3ab5a6e1d02e067a8f31459013c11bb75b62d09f4cf804897b935d110a2d
MD5 f85f4e3938a9a42704d8dfce84bfef86
BLAKE2b-256 e615cf91af09357a9b65a32afe90708f2bfc3321045d689a1854ba4f7ab29f9a

See more details on using hashes here.

File details

Details for the file astronomy_types-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for astronomy_types-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8fec5e6a185b4f432ccd1cfe7f2802b76b9df7c2d6bb72a4cae44c345a96cb7
MD5 62bbd692e7bbd7271b3c92c44317f4a7
BLAKE2b-256 18fff261738498af7fbf5852d0f934f9018c3225356c7fdde2438f42508ff0c1

See more details on using hashes here.

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