Skip to content

Commit

Permalink
Update docs and change version pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaoming committed Dec 25, 2021
1 parent 5d5bfa4 commit 62d4f8d
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 16 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ coverage:
docs:
rm -f docs/modeltranslation_wagtail.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ modeltranslation_wagtail
PYTHONPATH="$PYTHONPATH:." DJANGO_SETTINGS_MODULE="test.settings" sphinx-apidoc -o docs/ modeltranslation_wagtail
$(MAKE) -C docs clean
$(MAKE) -C docs html
open docs/_build/html/index.html

release: clean
python setup.py sdist
Expand Down
27 changes: 17 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
Expand Down Expand Up @@ -33,6 +32,12 @@
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']


# Make sphinx-apidocs work by configuring a django project
os.environ["DJANGO_SETTINGS_MODULE"] = "test.project.settings"
import django
django.setup()

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand All @@ -46,10 +51,12 @@
master_doc = 'index'

# General information about the project.
project = u'django-modeltranslation-wagtail'
copyright = u'2017, Benjamin Bach'
project = 'django-modeltranslation-wagtail'

from datetime import datetime
copyright = "{}, Benjamin Balder Bach".format(datetime.now().year)

# The version info for the project you're documenting, acts as replacement for
# The version info for the project yo're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
Expand Down Expand Up @@ -192,8 +199,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'modeltranslation_wagtail.tex', u'django-modeltranslation-wagtail Documentation',
u'Benjamin Bach', 'manual'),
('index', 'modeltranslation_wagtail.tex', 'django-modeltranslation-wagtail Documentation',
'Benjamin Balder Bach', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -222,8 +229,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'modeltranslation_wagtail', u'django-modeltranslation-wagtail Documentation',
[u'Benjamin Bach'], 1)
('index', 'modeltranslation_wagtail', 'django-modeltranslation-wagtail Documentation',
['Benjamin Balder Bach'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -236,8 +243,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'modeltranslation_wagtail', u'django-modeltranslation-wagtail Documentation',
u'Benjamin Bach', 'modeltranslation_wagtail', 'One line description of project.',
('index', 'modeltranslation_wagtail', 'django-modeltranslation-wagtail Documentation',
'Benjamin Balder Bach', 'modeltranslation_wagtail', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
.. include:: ../README.rst

Contents:
=========
Contents
========

.. toctree::
:maxdepth: 2

installation
usage
modules
contributing
history

Expand Down
21 changes: 21 additions & 0 deletions docs/modeltranslation_wagtail.migrations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
modeltranslation\_wagtail.migrations package
============================================

Submodules
----------

modeltranslation\_wagtail.migrations.0001\_initial module
---------------------------------------------------------

.. automodule:: modeltranslation_wagtail.migrations.0001_initial
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: modeltranslation_wagtail.migrations
:members:
:undoc-members:
:show-inheritance:
37 changes: 37 additions & 0 deletions docs/modeltranslation_wagtail.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
modeltranslation\_wagtail package
=================================

Subpackages
-----------

.. toctree::
:maxdepth: 4

modeltranslation_wagtail.migrations

Submodules
----------

modeltranslation\_wagtail.apps module
-------------------------------------

.. automodule:: modeltranslation_wagtail.apps
:members:
:undoc-members:
:show-inheritance:

modeltranslation\_wagtail.translator module
-------------------------------------------

.. automodule:: modeltranslation_wagtail.translator
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: modeltranslation_wagtail
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modeltranslation_wagtail
========================

.. toctree::
:maxdepth: 4

modeltranslation_wagtail
1 change: 1 addition & 0 deletions modeltranslation_wagtail/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__="0.4.1b1"
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env python

import os
import sys

import modeltranslation_wagtail

try:
from setuptools import setup
except ImportError:
Expand All @@ -17,7 +18,7 @@

setup(
name='django-modeltranslation-wagtail',
version='0.4',
version=modeltranslation_wagtail.__version__,
description='The glue between django-modeltranslation and wagtail',
long_description=readme,
author='Benjamin Bach',
Expand Down

0 comments on commit 62d4f8d

Please sign in to comment.