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.0.1.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.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astronomy_types-2.0.1.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.0.1.tar.gz
Algorithm Hash digest
SHA256 4a3c31d7b63f045725d4fbf08caf2b2b7670b6c3bd73d4c6d361a42f95333c0c
MD5 eafa495d3bc5c6b0296b95612264b06a
BLAKE2b-256 a783b0942948047d0aae7ef34bd24bc9dda6785922779d43b89ce5b60c22a03b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for astronomy_types-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1a35055bd2918d71b6af135186f4799949744e07365bb96fa46339c4aaf5b6f1
MD5 83ad800f8664bc6c1c582b47547334e5
BLAKE2b-256 6d0af0cb28ebf0395673aee4c8be4fa668f325475e6c97426fc4eb95d0ad5165

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