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

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.1.tar.gz (3.6 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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astronomy_types-2.1.1.tar.gz
  • Upload date:
  • Size: 3.6 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.1.tar.gz
Algorithm Hash digest
SHA256 131cdbd18f2585fb7ac90d2af5cfb9a7cd18433dcd993d3a7c3881c661b42549
MD5 63ad1d8c31142e8e7978e13c2956e644
BLAKE2b-256 66b2454bfa273f147337a996cce1f28c27a83509d5d7a5914f945e3b9fd1bec4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for astronomy_types-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9ef213894f92a950c554d780af926a401303dac006ae7720784c677054e37a6
MD5 78834bc2f9b4ba5e925c52943456a14e
BLAKE2b-256 1a2502e0401935e6ffe764be98e847346eb2efaae0efb7ef4b79a2b2d621aec2

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