Skip to content

Commit

Permalink
Changes to the README, Makefile, and requirements/development.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnobile2012 committed Jan 20, 2024
1 parent ad84874 commit f8313c3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ Basic Usage
.. code-block:: python
import datetime
import pytz
from sunrisesunset import SunriseSunset
dt = datetime.datetime.now()
zone = pytz.timezone('America/New_York')
dt = datetime.datetime.now()
dt = dt.astimezone(zone)
rs = SunriseSunset(dt, lat=35.9513, lon=83.9142, zenith='official')
rise_time, set_time = rs.sun_rise_set
print(f" Sunrise: {rise_time}")
Expand Down
44 changes: 19 additions & 25 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
#
# Makefile
# Development by Carl J. Nobile
# Minimal makefile for Sphinx documentation
#

FQDN = $(shell hostname --fqdn)
DOC_DIR = $(shell pwd)
API_DIR = api
URL = http://${FQDN}${DOC_DIR}/${API_DIR}/index.html
TARBALL_NAME = SunriseSunset
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = SunriseSunsetAPI
SOURCEDIR = source
BUILDDIR = build

all : api-docs
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

#----------------------------------------------------------------------
api-docs:
@(cd ..; epydoc -v --docformat epytext \
--name "Sunrise Sunset Calculator" -o docs/api --show-private \
--show-imports --graph all --url "${URL}" *.py \
)
#----------------------------------------------------------------------
tar :
@(ln -s ${API_DIR} ${TARBALL_NAME}; \
tar -chzvf ${TARBALL_NAME}.tar.gz ${TARBALL_NAME})
#----------------------------------------------------------------------
.PHONY : clean clobber
.PHONY : sphinx-apidoc
sphinx-apidoc:
sphinx-apidoc -o source/ -H sunrisesunset -A 'Carl J. Nobile' -V 1.0 \
-R 1.0.0 ../sunrisesunset

clean :
@rm -f *~ \#* .\#*
.PHONY: help Makefile

clobber : clean
@rm -rf ${API_DIR} ${TARBALL_NAME} ${TARBALL_NAME}.tar.gz
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2 changes: 1 addition & 1 deletion requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ timezonefinder
wheel
twine
#mock
#nose
#pynose
ipython

0 comments on commit f8313c3

Please sign in to comment.