This repository has been archived by the owner on Aug 11, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now uses GitPython to init the repo after templateing and then add astropy_helpers as a submodule.
- Loading branch information
Showing
9 changed files
with
304 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Compiled files | ||
*.py[cod] | ||
*.a | ||
*.o | ||
*.so | ||
__pycache__ | ||
|
||
# Ignore .c files by default to avoid including generated code. If you want to | ||
# add a non-generated .c extension, use `git add -f filename.c`. | ||
*.c | ||
|
||
# Other generated files | ||
*/version.py | ||
*/cython_version.py | ||
htmlcov | ||
.coverage | ||
MANIFEST | ||
.ipynb_checkpoints | ||
|
||
# Sphinx | ||
docs/api | ||
docs/_build | ||
|
||
# Eclipse editor project files | ||
.project | ||
.pydevproject | ||
.settings | ||
|
||
# Pycharm editor project files | ||
.idea | ||
|
||
# Packages/installer info | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
distribute-*.tar.gz | ||
|
||
# Other | ||
.cache | ||
.tox | ||
.*.sw[op] | ||
*~ | ||
.project | ||
.pydevproject | ||
.settings | ||
|
||
# Mac OSX | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = AstropyPackageTemplate | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Astropy Package Template documentation build configuration file, created by | ||
# sphinx-quickstart on Wed Jan 11 11:09:48 2017. | ||
# | ||
# This file is execfile()d with the current directory set to its | ||
# containing dir. | ||
# | ||
# Note that not all possible configuration values are present in this | ||
# autogenerated file. | ||
# | ||
# All configuration values have a default; values that are commented out | ||
# serve to show the default. | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
|
||
import os | ||
|
||
# -- General configuration ------------------------------------------------ | ||
|
||
# If your documentation needs a minimal Sphinx version, state it here. | ||
# | ||
needs_sphinx = '1.2' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = ['sphinx.ext.intersphinx'] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# The suffix(es) of source filenames. | ||
# You can specify multiple suffix as a list of string: | ||
source_suffix = '.rst' | ||
|
||
# The master toctree document. | ||
master_doc = 'index' | ||
|
||
# General information about the project. | ||
project = 'Astropy Package Template' | ||
copyright = '2017, The Astropy Developers' | ||
author = 'The Astropy Developers' | ||
|
||
# The version info for the project you're documenting, acts as replacement for | ||
# |version| and |release|, also used in various other places throughout the | ||
# built documents. | ||
# | ||
# The short X.Y version. | ||
version = '1.2' | ||
# The full version, including alpha/beta/rc tags. | ||
release = '1.2' | ||
|
||
# The language for content autogenerated by Sphinx. Refer to documentation | ||
# for a list of supported languages. | ||
# | ||
# This is also used if you do content translation via gettext catalogs. | ||
# Usually you set "language" from the command line for these cases. | ||
language = None | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This patterns also effect to html_static_path and html_extra_path | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = 'sphinx' | ||
|
||
# If true, `todo` and `todoList` produce output, else they produce nothing. | ||
todo_include_todos = False | ||
|
||
rst_epilog = """ | ||
.. _Astropy: http://astropy.org | ||
""" | ||
# -- Options for HTML output ---------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
|
||
import astropy_sphinx_theme | ||
html_theme_path = astropy_sphinx_theme.get_html_theme_path() | ||
html_theme = 'bootstrap-astropy' | ||
|
||
html_favicon = os.path.join(html_theme_path[0], html_theme, 'static', | ||
'astropy_logo.ico') | ||
|
||
# Theme options are theme-specific and customize the look and feel of a theme | ||
# further. For a list of options available for each theme, see the | ||
# documentation. | ||
# | ||
# html_theme_options = {} | ||
|
||
# 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". | ||
html_static_path = ['_static'] | ||
|
||
html_sidebars = { | ||
'**': ['localtoc.html'], | ||
'search': [], | ||
'genindex': [], | ||
'py-modindex': [], | ||
} | ||
|
||
# -- Options for HTMLHelp output ------------------------------------------ | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = 'AstropyPackageTemplatedoc' | ||
|
||
|
||
# Example configuration for intersphinx: refer to the Python standard library. | ||
intersphinx_mapping = {'https://docs.python.org/': None, | ||
'http://docs.astropy.org/en/stable/': None} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Welcome to Astropy Package Template's documentation! | ||
==================================================== | ||
|
||
The Astropy package template is designed to help quickly create new Python packages within the Astropy ecosystem. | ||
|
||
Getting Started | ||
--------------- | ||
|
||
The Astropy Package template uses the `Cookiecutter | ||
<http://cookiecutter.readthedocs.io/>`_ project to make it easier to get | ||
started. To use the package template you need cookiecutter installed, depending | ||
on how you have Python installed it can be obtained through either pip or | ||
conda:: | ||
|
||
pip install cookiecutter | ||
|
||
or:: | ||
|
||
conda install -c conda-forge cookiecutter | ||
|
||
|
||
Cookiecutter works by taking a template (in this case the Astropy Package | ||
Template) and asking you a series of questions to create a set of files and | ||
folders where your answers to the questions are pre-filled into the correct | ||
places. The package template uses this to allow you to specify things like your | ||
projects name as well as choose what parts and features of the template you want | ||
to use. | ||
|
||
To start a package with the package template run:: | ||
|
||
cookiecutter gh:astropy/package-template | ||
|
||
This will ask you a series of questions, and result in a directory inside your | ||
current working directory that has the name of your project. | ||
|
||
.. rubric:: Metadata Keywords: | ||
|
||
* First matching: | ||
1. ``obsrvtry`` | ||
2. ``telescop`` | ||
3. Default: ``""`` | ||
* ``waveunit`` Default: `~astropy.units.one` | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
options | ||
updating | ||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Options during Setup | ||
==================== | ||
|
||
To use the package template run ``cookiecutter gh:astropy/package-template``, | ||
once you have run this command you will be asked a series of questions. Below is | ||
a description of each of the prompts. | ||
|
||
1. ``package_name``: This is a human readable name for your package, like 'Astropy' or 'SunPy'. | ||
2. ``module_name``: This is the name of your python package i.e. 'astropy' or 'sunpy'. | ||
3. ``short_description``: This is a one sentence description of your package. | ||
4. ``long_description``: This is a multi-line description of your package. | ||
5. ``author_name``: The name or names of the authors. | ||
6. ``author_email``: A contact email for the authors. | ||
7. ``license``: The license of your project. | ||
8. ``project_url``: Project website. | ||
9. ``include_example_code``: This includes a set of example python and cython files showing you how to use the package template. If you choose 'n' then none of this will be included and you will have to populate the directory structure before you can import the package. | ||
10. ``include_cextern_folder``: The cextern folder should be used if you are including non-python C code. | ||
11. ``edit_on_github_extension``: Set to "True" to enable the edit on GitHub sphinx extension. | ||
12. ``github_project``: This is the GitHub identifier for the edit on GitHub extension and the changelog link extension. | ||
13. ``project_version``: The current version number of your project. | ||
14. ``use_travis_ci``: If 'y' the template will include an example ``.travis.yml`` file for the Travis CI service. | ||
15. ``use_appveyor_ci``: If 'y' the template will include an example ``appveyor.yml`` file for the Appveyor CI service. | ||
16. ``use_read_the_docs``: If 'y' the ``read_the_docs.yml`` and ``.rtd-environment.yml`` files will be included for using conda on Read the Docs. | ||
17. ``sphinx_theme``: The value of the ``html_theme`` variable in the sphinx configuration file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Updating Your Package | ||
===================== | ||
|
||
Once you have setup your project there will come a time when some things in the | ||
package template change, new versions of ``astropy_helpers`` or updates to the | ||
infrastructure you want to utilise. Updating your package with these changes is | ||
a balance between maintaining parity with the original template and customising | ||
your project to your needs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.