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
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-1.0.2.tar.gz (2.5 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-1.0.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astronomy_types-1.0.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for astronomy_types-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e0dca9bd6b0916e30fc3f8d6cc713238329503d5cd7df5cbd224e3dfddb2f7fc
MD5 7bdad64f3a8bf27540b3fa9e35426a29
BLAKE2b-256 ff3eef7f2c9a7a850127e3f7778e84d9d76cf8eb1c6bee935794c3b18049e6b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for astronomy_types-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d31a4e999184141596d76c879397625252f43f6f4f0802d1d71e8f6e99baba20
MD5 d6e3fa94b6ecf61e1c7b30af25484e90
BLAKE2b-256 80854a429d26e0ce9f455efbee97925eba51166ce356dcd953184c35250cd0d3

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