[Python-modules-commits] [python-pysolar] 08/10: Integrated subset of sphinx docs from H. Zebner
Wolfgang Borgert
debacle at moszumanska.debian.org
Fri Oct 3 23:36:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to annotated tag 0.4.2
in repository python-pysolar.
commit ba868973a5f2435014b918e202d1292f4ee4875f
Author: Brandon Stafford <brandon at loess.(none)>
Date: Wed Mar 3 17:35:36 2010 -0500
Integrated subset of sphinx docs from H. Zebner
---
doc/conf.py | 117 +++-------------------------------------------------------
doc/index.rst | 73 ++++++++++++++++++++++++++++++++----
util.py | 44 +++++-----------------
3 files changed, 80 insertions(+), 154 deletions(-)
diff --git a/doc/conf.py b/doc/conf.py
index bd78078..48ea809 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,29 +1,15 @@
# -*- coding: utf-8 -*-
#
-# Pysolar documentation build configuration file, created by
-# sphinx-quickstart on Tue Jan 27 22:59:11 2009.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# The contents of this file are pickled, so don't put values in the namespace
-# that aren't pickleable (module imports are okay, they're removed automatically).
-#
-# All configuration values have a default value; values that are commented out
-# serve to show the default value.
+# Pysolar documentation build configuration file
import sys, os
-# If your extensions are in another directory, add it here. If the directory
-# is relative to the documentation root, use os.path.abspath to make it
-# absolute, like shown here.
-#sys.path.append(os.path.abspath('some/directory'))
-
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = ['sphinx.ext.autodoc', 'numpydoc']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
@@ -36,15 +22,15 @@ master_doc = 'index'
# General substitutions.
project = 'Pysolar'
-copyright = '2009, Brandon Stafford'
+copyright = '2008-2010, Brandon Stafford'
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
-version = '0.3.1RC1'
+version = '0.4.1'
# The full version, including alpha/beta/rc tags.
-release = '0.3.1RC1'
+release = '0.4.1'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
@@ -52,31 +38,9 @@ release = '0.3.1RC1'
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directories, that shouldn't be searched
-# for source files.
-#exclude_dirs = []
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
-
# Options for HTML output
# -----------------------
@@ -85,22 +49,6 @@ pygments_style = 'sphinx'
# given in html_static_path.
html_style = 'default.css'
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (within the static path) to place at the top of
-# the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
@@ -110,70 +58,15 @@ html_static_path = ['.static']
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_use_modindex = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, the reST sources are included in the HTML build as _sources/<name>.
-#html_copy_source = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
# Output file base name for HTML help builder.
htmlhelp_basename = 'Pysolardoc'
-
# Options for LaTeX output
# ------------------------
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
('index', 'Pysolar.tex', 'Pysolar Documentation',
'Brandon Stafford', 'manual'),
]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_use_modindex = True
diff --git a/doc/index.rst b/doc/index.rst
index 1b1252d..25624bf 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,11 +1,4 @@
-.. Pysolar documentation master file, created by sphinx-quickstart on Tue Jan 27 22:59:11 2009.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Welcome to Pysolar's documentation!
-===================================
-
-Contents:
+.. Pysolar documentation master file
.. toctree::
:maxdepth: 2
@@ -17,3 +10,67 @@ Indices and tables
* :ref:`modindex`
* :ref:`search`
+Descriptions of modules and function reference
+==============================================
+
+The core functions are in solar.py.
+
+constants.py
+------------
+.. automodule:: constants
+ :members:
+
+horizon.py
+----------
+.. automodule:: horizon
+ :members:
+
+julian.py
+---------
+.. automodule:: julian
+ :members:
+
+poly.py
+-------
+.. automodule:: poly
+ :members:
+
+query_usno.py
+-------------
+.. automodule:: query_usno
+ :members:
+
+radiation.py
+------------
+.. automodule:: radiation
+ :members:
+
+shade.py
+--------
+.. automodule:: shade
+ :members:
+
+shade_test.py
+-------------
+.. automodule:: shade_test
+ :members:
+
+simulate.py
+-----------
+.. automodule:: simulate
+ :members:
+
+solar.py
+--------
+.. automodule:: solar
+ :members:
+
+testsolar.py
+------------
+.. automodule:: testsolar
+ :members:
+
+util.py
+-------
+.. automodule:: util
+ :members:
diff --git a/util.py b/util.py
index 04e548a..8a39e96 100644
--- a/util.py
+++ b/util.py
@@ -30,9 +30,9 @@
:Additional author: Brandon Stafford
"""
-import conversions_time as ct
+#import conversions_time as ct
import datetime
-import decimaldegrees.decimaldegrees as dg
+#import decimaldegrees.decimaldegrees as dg
import math
import pytz
from pytz import all_timezones
@@ -48,35 +48,11 @@ elevation_default = 0.0 # Default elevation is 0.0
# Useful equations for analysis
-def date_with_decimal_hour(datetime, hour_decimal):
- """This converts dates with decimal hour to datetime_hour.
- An improved version :mod:`conversions_time`
-
- Parameters
- ----------
- datetime : datetime.datetime
- A datetime object is a single object containing all the information from a
- date object and a time object.
- hour_decimal : datetime.datetime
- An hour is a unit of time 60 minutes, or 3,600 seconds in length.
-
- Returns
- -------.
- datetime_hour : datetime.datetime
- datetime_hour
-
- """
- hour_dms = dg.decimal2dms(hour_decimal)
-
- datetime_hour = dt.datetime(datetime.year,
- date_utc.month, date_utc.day, hour_dms[0], hour_dms[1],int(hour_dms[2]))
-
- return datetime_hour
-
-
def GetSunriseSunset(latitude_deg, longitude_deg, utc_datetime, timezone):
"""This function calculates the astronomical sunrise and sunset times in local time.
+ WARNING: THIS FUNCTION IS BROKEN. It relies on an unknown library called conversions_time, and another library called decimaldegrees that does not appear to have an active maintainer. TODO: Fix this function so it works without creating unnecessary dependencies.
+
Parameters
----------
latitude_deg : float
@@ -142,10 +118,10 @@ def GetSunriseSunset(latitude_deg, longitude_deg, utc_datetime, timezone):
# Sunset_time in hours
sunset_time = (TON + sunn - time_adst)
- sunrise_time_dms = dg.decimal2dms(sunrise_time)
- sunset_time_dms = dg.decimal2dms(sunset_time)
- sunrise_time_dt = ct.hour_decimal2datetime(utc_datetime, sunrise_time)
- sunset_time_dt = ct.hour_decimal2datetime(utc_datetime, sunset_time)
+ sunrise_time_dms = 0 # BROKEN dg.decimal2dms(sunrise_time)
+ sunset_time_dms = 0 # BROKEN dg.decimal2dms(sunset_time)
+ sunrise_time_dt = 0 # BROKEN ct.hour_decimal2datetime(utc_datetime, sunrise_time)
+ sunset_time_dt = 0 # BROKEN ct.hour_decimal2datetime(utc_datetime, sunset_time)
return sunrise_time_dt, sunset_time_dt
@@ -331,7 +307,7 @@ def solarelevation_function_overcast(latitude_deg, longitude_deg, utc_datetime,
"""
altitude = solar.GetAltitude(latitude_deg, longitude_deg,utc_datetime, elevation, temperature_celsius,pressure_millibars)
- return = ((-0.0067133) + (0.78600 * (math.sin(altitude)))) + (0.22401 * (0.5 * (1 - math.cos(2 * altitude))))))
+ return ((-0.0067133) + (0.78600 * (math.sin(altitude)))) + (0.22401 * (0.5 * (1 - math.cos(2 * altitude))))
def diffuse_transmittance(TL = TL_default):
@@ -461,7 +437,7 @@ def direct_underclear(latitude_deg, longitude_deg, utc_datetime,
AM : float
Air mass. An Air Mass is a measure of how far light travels through the Earth's atmosphere. One air mass,
or AM1, is the thickness of the Earth's atmosphere. Air mass zero (AM0) describes solar irradiance in space,
- where it is unaffected by the atmosphere. The power density of AM1 light is about 1,000 :math:`W/m^2`
+ where it is unaffected by the atmosphere. The power density of AM1 light is about 1,000 W/m^2
TL : float
Linke turbidity factor
elevation : float
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pysolar.git
More information about the Python-modules-commits
mailing list