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

python 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.1.0.tar.gz (3.8 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.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astronomy_types-2.1.0.tar.gz
  • Upload date:
  • Size: 3.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 bf70606cd68f750b26c2a60385cb035fce499a24f788a2ccd8b4b91865f14564
MD5 d471b928965f716b3f9717abf5fa0cb9
BLAKE2b-256 d050ecfa01df2f9b8f69f5ba678272e0e6217c3d2fe05bf5e7ef51c91ce643ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for astronomy_types-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bc2f5873ec2dc38cf84248786f9f78cfac9bacf3327d52305cb27c5b1931f5a
MD5 7556832b80ec2ea22995d1e163d08201
BLAKE2b-256 922cbaa6562525954b620d45e916470a820a2ed64ad66fedb3219a2fa27e6430

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