diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/_static/.keep_dir | 0 | ||||
-rw-r--r-- | docs/changelog.rst | 139 | ||||
-rw-r--r-- | docs/conf.py | 19 | ||||
-rw-r--r-- | docs/index.rst | 1 | ||||
-rw-r--r-- | docs/subfactory.rst | 25 |
5 files changed, 3 insertions, 181 deletions
diff --git a/docs/_static/.keep_dir b/docs/_static/.keep_dir deleted file mode 100644 index e69de29..0000000 --- a/docs/_static/.keep_dir +++ /dev/null diff --git a/docs/changelog.rst b/docs/changelog.rst deleted file mode 100644 index c64a89a..0000000 --- a/docs/changelog.rst +++ /dev/null @@ -1,139 +0,0 @@ -ChangeLog -========= - -2.0.0 (future) --------------- - -.. note:: This section lists features planned for v2 of factory_boy. Changes announced here may not have been committed to the repository. - -*New:* - - - Add support for Python3 - - Clean up documentation - - Document extension points - - Add support for ``get_or_create`` in :class:`~factory.DjangoModelFactory` - -*Deprecation:* - - - Remove associated class discovery - - Stop defaulting to Django's ``Foo.objects.create()`` when "creating" instances - - Remove STRATEGY_* - - Remove :meth:`~factory.Factory.set_building_function` / :meth:`~factory.Factory.set_creation_function` - - -1.2.0 (current) ---------------- - -*New:* - - - Add :class:`~factory.CircularSubFactory` to solve circular dependencies between factories - - Better creation/building customization hooks at :meth:`factory.Factory._build` and :meth:`factory.Factory.create`. - - Add support for passing non-kwarg parameters to a :class:`~factory.Factory` wrapped class. - -1.1.5 (09/07/2012) ------------------- - -*Bugfix:* - - - Fix :class:`~factory.PostGenerationDeclaration` and derived classes. - -1.1.4 (19/06/2012) ------------------- - -*New:* - - - Add :meth:`~factory.use_strategy` decorator to override a - :class:`~factory.Factory`'s default strategy - - Improve test running (tox, python2.6/2.7) - - Introduce :class:`~factory.PostGeneration` and - :class:`~factory.RelatedFactory` - -1.1.3 (9/03/2012) ------------------ - -*Bugfix:* - - - Fix packaging rules - -1.1.2 (25/02/2012) ------------------- - -*New:* - - - Add :class:`~factory.Iterator` and :class:`~factory.InfiniteIterator` for :class:`~factory.Factory` attribute declarations. - - Provide :func:`~factory.Factory.generate` and :func:`~factory.Factory.simple_generate`, that allow specifying the instantiation strategy directly. - Also provides :func:`~factory.Factory.generate_batch` and :func:`~factory.Factory.simple_generate_batch`. - -1.1.1 (24/02/2012) ------------------- - -*New:* - - - Add :func:`~factory.Factory.build_batch`, :func:`~factory.Factory.create_batch` and :func:`~factory.Factory.stub_batch`, to instantiate factories in batch - -1.1.0 (24/02/2012) ------------------- - -*New:* - - - Improve the :class:`~factory.SelfAttribute` syntax to fetch sub-attributes using the ``foo.bar`` syntax; - - Add :class:`~factory.ContainerAttribute` to fetch attributes from the container of a :class:`~factory.SubFactory`. - - Provide the :func:`~factory.make_factory` helper: ``MyClassFactory = make_factory(MyClass, x=3, y=4)`` - - Add :func:`~factory.build`, :func:`~factory.create`, :func:`~factory.stub` helpers - -*Bugfix:* - - - Allow classmethod/staticmethod on factories - -*Deprecation:* - - - Auto-discovery of :attr:`~factory.Factory.FACTORY_FOR` based on class name is now deprecated - -1.0.4 (21/12/2011) ------------------- - -*New:* - - - Improve the algorithm for populating a :class:`~factory.Factory` attributes dict - - Add ``python setup.py test`` command to run the test suite - - Allow custom build functions - - Introduce :data:`~factory.MOGO_BUILD` build function - - Add support for inheriting from multiple :class:`~factory.Factory` - - Base :class:`~factory.Factory` classes can now be declared :attr:`abstract <factory.Factory.ABSTRACT_FACTORY`. - - Provide :class:`~factory.DjangoModelFactory`, whose :class:`~factory.Sequence` counter starts at the next free database id - - Introduce :class:`~factory.SelfAttribute`, a shortcut for ``factory.LazyAttribute(lambda o: o.foo.bar.baz``. - -*Bugfix:* - - - Handle nested :class:`~factory.SubFactory` - - Share sequence counter between parent and subclasses - - Fix :class:`~factory.SubFactory` / :class:`~factory.Sequence` interferences - -1.0.2 (16/05/2011) ------------------- - -*New:* - - - Introduce :class:`~factory.SubFactory` - -1.0.1 (13/05/2011) ------------------- - -*New:* - - - Allow :class:`~factory.Factory` inheritance - - Improve handling of custom build/create functions - -*Bugfix:* - - - Fix concurrency between :class:`~factory.LazyAttribute` and :class:`~factory.Sequence` - -1.0.0 (22/08/2010) ------------------- - -*New:* - - - First version of factory_boy - - -.. vim:et:ts=4:sw=4:tw=119:ft=rst: diff --git a/docs/conf.py b/docs/conf.py index fd9ded6..db523c3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,23 +48,10 @@ copyright = u'2011, Raphaƫl Barrois, Mark Sandstrom' # |version| and |release|, also used in various other places throughout the # built documents. # -root = os.path.abspath(os.path.dirname(__file__)) -def get_version(*module_dir_components): - import re - version_re = re.compile(r"^__version__ = ['\"](.*)['\"]$") - module_root = os.path.join(root, os.pardir, *module_dir_components) - module_init = os.path.join(module_root, '__init__.py') - with open(module_init, 'r') as f: - for line in f: - match = version_re.match(line[:-1]) - if match: - return match.groups()[0] - return '0.1.0' - -# The full version, including alpha/beta/rc tags. -release = get_version('factory') # The short X.Y version. -version = '.'.join(release.split('.')[:2]) +version = '1.1' +# The full version, including alpha/beta/rc tags. +release = '1.1.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/index.rst b/docs/index.rst index f91b830..f0b5dcc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -61,7 +61,6 @@ Contents: subfactory post_generation internals - changelog Indices and tables ================== diff --git a/docs/subfactory.rst b/docs/subfactory.rst index f8642f3..1815312 100644 --- a/docs/subfactory.rst +++ b/docs/subfactory.rst @@ -54,28 +54,3 @@ Fields of the SubFactory can also be overridden when instantiating the external <User: Henry Jones> >>> c.owner.email henry.jones@example.org - - -Circular dependencies ---------------------- - -In order to solve circular dependency issues, Factory Boy provides the :class:`~factory.CircularSubFactory` class. - -This class expects a module name and a factory name to import from that module; the given module will be imported -(as an absolute import) when the factory is first accessed:: - - # foo/factories.py - import factory - - from bar import factories - - class FooFactory(factory.Factory): - bar = factory.SubFactory(factories.BarFactory) - - - # bar/factories.py - import factory - - class BarFactory(factory.Factory): - # Avoid circular import - foo = factory.CircularSubFactory('foo.factories', 'FooFactory', bar=None) |