Skip to content

Commit

Permalink
Rename files so the extension matches the content.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jun 15, 2018
1 parent 7253bd6 commit 93f34df
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 28 deletions.
8 changes: 4 additions & 4 deletions DEVELOP.txt → DEVELOP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To develop this package from source:
- ``cd`` to the checkout

- Ideally with a clean, non-system python, run
``python bootstrap/bootstrap.py``
``python bootstrap.py``

- run ``./bin/buildout``

Expand All @@ -16,16 +16,16 @@ To run tests, run *both* of the following:
- ``./bin/testall``: this tests zc.relation and zc.relationship, to make sure
that zc.relation changes do not break zc.relationship tests.

Changes should be documented in CHANGES.txt *in the package*.
Changes should be documented in CHANGES.rst *in the package*.

Before making a release that registers the software to PyPI, run the following:

- ``./bin/py setup.py``

This then creates a file with the following silly name:
``TEST_THIS_REST_BEFORE_REGISTERING.txt``
``TEST_THIS_REST_BEFORE_REGISTERING.rst``

As the name suggests, test the file in a ReST tool to make sure docutils
parses it correctly.

Once this works, go ahead and ``./bin/py setup.py sdist register upload``.
Once this works, go ahead and ``./bin/py setup.py sdist register upload``.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include *.py
include *.txt
include *.rst
include buildout.cfg
recursive-include src *.py
recursive-include src *.txt
recursive-include src *.rst
File renamed without changes.
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def text(*args, **kwargs):
# http://docs.python.org/dist/meta-data.html
tmp = []
for a in args:
if a.endswith('.txt'):
if a.endswith('.rst'):
f = open(os.path.join(*a.split('/')))
tmp.append(f.read())
f.close()
Expand All @@ -66,7 +66,7 @@ def text(*args, **kwargs):
res = ''.join(tmp)
out = kwargs.get('out')
if out is True:
out = 'TEST_THIS_REST_BEFORE_REGISTERING.txt'
out = 'TEST_THIS_REST_BEFORE_REGISTERING.rst'
if out:
f = open(out, 'w')
f.write(res)
Expand All @@ -89,12 +89,12 @@ def text(*args, **kwargs):
zip_safe=False,
author='Gary Poster',
author_email='[email protected]',
description=text("README.txt"),
long_description=text('src/zc/relation/README.txt',
'src/zc/relation/tokens.txt',
'src/zc/relation/searchindex.txt',
'src/zc/relation/optimization.txt',
'src/zc/relation/CHANGES.txt'),
description=text("README.rst"),
long_description=text('src/zc/relation/README.rst',
'src/zc/relation/tokens.rst',
'src/zc/relation/searchindex.rst',
'src/zc/relation/optimization.rst',
'src/zc/relation/CHANGES.rst'),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/zc/relation/README.txt → src/zc/relation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ affect ``findRelationChains``.

The zc.relation package currently includes two kinds of search indexes, one for
indexing transitive membership searches in a hierarchy and one for intransitive
searches explored in tokens.txt in this package, which can optimize frequent
searches explored in tokens.rst in this package, which can optimize frequent
searches on complex queries or can effectively change the meaning of an
intransitive search. Other search index implementations and approaches may be
added in the future.
Expand All @@ -887,7 +887,7 @@ searches seen above that specify a 'supervisor'.
... 'supervisor', zc.relation.RELATION))

The ``zc.relation.RELATION`` describes how to walk back up the chain. Search
indexes are explained in reasonable detail in searchindex.txt.
indexes are explained in reasonable detail in searchindex.rst.

Now that we have added the index, we can search again. The result this
time is already computed, so, at least when you ask for tokens, it
Expand Down Expand Up @@ -1926,13 +1926,13 @@ Next Steps
If you want to read more, next steps depend on how you like to learn. Here
are some of the other documents in the zc.relation package.

:optimization.txt:
:optimization.rst:
Best practices for optimizing your use of the relation catalog.

:searchindex.txt:
:searchindex.rst:
Queries factories and search indexes: from basics to nitty gritty details.

:tokens.txt:
:tokens.rst:
This document explores the details of tokens. All God's chillun
love tokens, at least if God's chillun are writing non-toy apps
using zc.relation. It includes discussion of the token helpers that
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/zc/relation/searchindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class Intransitive(persistent.Persistent):
Could be used for transitive searches, but writes would be much more
expensive than the TransposingTransitive approach.
see tokens.txt for an example.
see tokens.rst for an example.
"""
# XXX Rename to Direct?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Working with Search Indexes: zc.relation Catalog Extended Example
Introduction
============

This document assumes you have read the README.txt document, and want to learn
This document assumes you have read the README.rst document, and want to learn
a bit more by example. In it, we will explore a set of relations that
demonstrates most of the aspects of working with search indexes and listeners.
It will not explain the topics that the other documents already addressed. It
Expand Down
8 changes: 4 additions & 4 deletions src/zc/relation/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ def tearDown(test):
def test_suite():
res = unittest.TestSuite((
doctest.DocFileSuite(
'README.txt',
'README.rst',
setUp=setUp,
tearDown=tearDown,
),
doctest.DocFileSuite(
'tokens.txt',
'tokens.rst',
setUp=setUp,
tearDown=tearDown,
),
doctest.DocFileSuite(
'searchindex.txt',
'searchindex.rst',
setUp=setUp,
tearDown=tearDown,
),
doctest.DocFileSuite(
'optimization.txt',
'optimization.rst',
setUp=setUp,
tearDown=tearDown,
),
Expand Down
4 changes: 2 additions & 2 deletions src/zc/relation/timeit/transitive_search_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@
(I want to write look at the intransitive search too: is it really only
useful when you have a query factory that mutates the initial search, as
in tokens.txt?)
in tokens.rst?)
""" # noqa

import timeit
import pprint

# see zc/relation/searchindex.txt
# see zc/relation/searchindex.rst

brute_setup = '''
import BTrees
Expand Down
4 changes: 2 additions & 2 deletions src/zc/relation/tokens.txt → src/zc/relation/tokens.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tokens and Joins: zc.relation Catalog Extended Example
Introduction and Set Up
=======================

This document assumes you have read the introductory README.txt and want
This document assumes you have read the introductory README.rst and want
to learn a bit more by example. In it, we will explore a more
complicated set of relations that demonstrates most of the aspects of
working with tokens. In particular, we will look at joins, which will
Expand Down Expand Up @@ -176,7 +176,7 @@ Now we can create a relation catalog to hold these items.

Now we set up our indexes. We'll start with just the organizations, and
set up the catalog with them. This part will be similar to the example
in README.txt, but will introduce more discussions of optimizations and
in README.rst, but will introduce more discussions of optimizations and
tokens. Then we'll add in the part about roles, and explore queries and
token-based "joins".

Expand Down

0 comments on commit 93f34df

Please sign in to comment.