Skip to main content

A collection of astronomy functions for practical applications

Project description

This project is based on the algorithms found in Practical Astronomy with your Calculator or Spreadsheet by Peter Duffett-Smith and Jonathan Zwart.

This is a library of functions, with unit tests, written in Python 3.12, the standard library, unittest framework, and the math module.

All credit for the accuracy and usefulness of these algorithms goes to the original authors.

Test

To run all tests run this command:

python -m unittest

Local Development Setup

Start/Activate a Virtual Environment

Start:

python3 -m venv venv

Activate:

source venv/bin/activate

Install dependencies

pip install --upgrade -r requirements.txt

Installation

pip install af_practical_astronomy

Running

Currently, you will have to manually import these functions into your project if you wish.

Future plans

  • Finish implementing all of the algorithms from the book.
    • Note: skipped section 31, matrix method for coordinate conversions. Will implement later.
  • Add a test runner.

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

af_practical_astronomy-1.0.6.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

af_practical_astronomy-1.0.6-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file af_practical_astronomy-1.0.6.tar.gz.

File metadata

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

File hashes

Hashes for af_practical_astronomy-1.0.6.tar.gz
Algorithm Hash digest
SHA256 0206e2fe0be10fec1f9056651bc30a25510b49c21d4893898bf2bce3a3337ad7
MD5 85f5eadcad9177d54c48b9f0e18900fb
BLAKE2b-256 f8d33a81bf0262bd50eb4a80f0de5d49447aab5e9477a6f5278c3e922c1277dc

See more details on using hashes here.

File details

Details for the file af_practical_astronomy-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for af_practical_astronomy-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 913efa9a3ea153a0d0984375a8d59a98f99b4bec3213b2782bf0273dfa309270
MD5 9da52207d6d65bdc0b427479c4b50a15
BLAKE2b-256 2403ede8fcce6d2f4ad24605ae0351cea8fee7dd6ddaad9121615fe8853090ab

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