Skip to content

Commit beba809

Browse files
committed
Rename part 1
1 parent b8a6b47 commit beba809

File tree

13 files changed

+43
-43
lines changed

13 files changed

+43
-43
lines changed

HISTORY.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Changelog
147147

148148
* New feature: default sort ordering. Just pass `default_sort_order` to `Table`.
149149

150-
* `Link` class is now just inherited from tri.form `Link`. Introduced a deprecation warning for the constructor argument `url`.
150+
* `Link` class is now just inherited from tri_form `Link`. Introduced a deprecation warning for the constructor argument `url`.
151151

152152
* Simplified `prepare` handling for `Table`. You should no longer need to care about this for most operations. You will still need to call `prepare` to trigger the parsing of URL parameters for sorting etc.
153153

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ include LICENSE
55
include README.rst
66
include requirements.txt
77
include test_requirements.txt
8-
recursive-include lib/tri/table/templates *
8+
recursive-include lib/tri_table/templates *
99
include table.scss
10-
include table.css
10+
include table.css

doc_output.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from tri.declarative import *
2-
from tri.table import *
3-
from tri.query import *
4-
from tri.query import MISSING as q_MISSING
1+
from tri_declarative import *
2+
from tri_table import *
3+
from tri_query import *
4+
from tri_query import MISSING as q_MISSING
55

66
documentation = {
77
'Table': documentation_tree(Table),

docs/architecture_overview.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Declarative/programmatic hybrid API
1111
-----------------------------------
1212

1313
The ``@declarative``, ``@with_meta`` and ``@creation_ordered``
14-
decorators from tri.declarative enables us to very easily write an API
14+
decorators from tri_declarative enables us to very easily write an API
1515
that can look both like a normal simple python API:
1616

1717
.. code:: python
@@ -59,7 +59,7 @@ Namespace dispatching
5959

6060
I've already hinted at this above in the example where we do
6161
``column__foo__show=False``. This is an example of the powerful
62-
namespace dispatch mechanism from tri.declarative. It's inspired by the
62+
namespace dispatch mechanism from tri_declarative. It's inspired by the
6363
query syntax of Django where you use ``__`` to jump namespace. (If
6464
you're not familiar with Django, here's the gist of it: you can do
6565
``Table.objects.filter(foreign_key__column='foo')``
@@ -69,7 +69,7 @@ still keeping the code simple. Here's a contrived example:
6969

7070
.. code:: python
7171
72-
from tri.declarative import dispatch, EMPTY
72+
from tri_declarative import dispatch, EMPTY
7373
7474
7575
@dispatch(

docs/conf.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
# version is used.
2929
sys.path.insert(0, project_root)
3030

31-
import tri.table
32-
import tri.query
33-
import tri.form
31+
import tri_table
32+
import tri_query
33+
import tri_form
3434

35-
from tri.declarative import generate_rst_docs
35+
from tri_declarative import generate_rst_docs
3636

37-
generate_rst_docs('.', [tri.table.Table, tri.table.Column, tri.query.Query, tri.query.Variable, tri.form.Form, tri.form.Field, tri.form.Link], (tri.form.MISSING, tri.query.MISSING))
37+
generate_rst_docs('.', [tri_table.Table, tri_table.Column, tri_query.Query, tri_query.Variable, tri_form.Form, tri_form.Field, tri_form.Link], (tri_form.MISSING, tri_query.MISSING))
3838

3939
# -- General configuration -----------------------------------------------------
4040

@@ -62,17 +62,17 @@
6262
master_doc = 'index'
6363

6464
# General information about the project.
65-
project = u'tri.table'
65+
project = u'tri_table'
6666
copyright = u'2015, Anders Hovmöller'
6767

6868
# The version info for the project you're documenting, acts as replacement for
6969
# |version| and |release|, also used in various other places throughout the
7070
# built documents.
7171
#
7272
# The short X.Y version.
73-
version = tri.table.__version__
73+
version = tri_table.__version__
7474
# The full version, including alpha/beta/rc tags.
75-
release = tri.table.__version__
75+
release = tri_table.__version__
7676

7777
# The language for content autogenerated by Sphinx. Refer to documentation
7878
# for a list of supported languages.
@@ -190,7 +190,7 @@
190190
#html_file_suffix = None
191191

192192
# Output file base name for HTML help builder.
193-
htmlhelp_basename = 'tri.tablesdoc'
193+
htmlhelp_basename = 'tri_tablesdoc'
194194

195195

196196
# -- Options for LaTeX output --------------------------------------------------
@@ -209,7 +209,7 @@
209209
# Grouping the document tree into LaTeX files. List of tuples
210210
# (source start file, target name, title, author, documentclass [howto/manual]).
211211
latex_documents = [
212-
('index', 'tri.table.tex', u'tri.table Documentation',
212+
('index', 'tri_table.tex', u'tri_table Documentation',
213213
u'Anders Hovmöller', 'manual'),
214214
]
215215

@@ -239,7 +239,7 @@
239239
# One entry per manual page. List of tuples
240240
# (source start file, name, description, authors, manual section).
241241
man_pages = [
242-
('index', 'tri.table', u'tri.table Documentation',
242+
('index', 'tri_table', u'tri_table Documentation',
243243
[u'Anders Hovmöller'], 1)
244244
]
245245

@@ -253,8 +253,8 @@
253253
# (source start file, target name, title, author,
254254
# dir menu entry, description, category)
255255
texinfo_documents = [
256-
('index', 'tri.table', u'tri.table Documentation',
257-
u'Anders Hovmöller', 'tri.table', 'One line description of project.',
256+
('index', 'tri_table', u'tri_table Documentation',
257+
u'Anders Hovmöller', 'tri_table', 'One line description of project.',
258258
'Miscellaneous'),
259259
]
260260

docs/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Usage
33

44
You need to add `tri.table` to installed apps or copy the templates to your own template directory.
55

6-
Other than that it should just be to `from tri.table import Table, Column` and off you go.
6+
Other than that it should just be to `from tri_table import Table, Column` and off you go.
77

88
Styling
99
-------
1010

11-
There is a `table.scss` file included with the project that provides a default styling for the table if you want a fast and easy starting point for styling.
11+
There is a `table.scss` file included with the project that provides a default styling for the table if you want a fast and easy starting point for styling.

examples/examples/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from .models import Bar, Foo
22
from os.path import dirname, abspath, join
33
from django.http import HttpResponse
4-
from tri.table import Table, render_table_to_response
5-
from tri.table import Column
4+
from tri_table import Table, render_table_to_response
5+
from tri_table import Column
66

77

88
def index(request):

lib/tri/table/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
format_html,
3131
)
3232
from django.utils.safestring import mark_safe
33-
from tri.declarative import (
33+
from tri_declarative import (
3434
class_shortcut,
3535
creation_ordered,
3636
declarative,
@@ -49,7 +49,7 @@
4949
sort_after,
5050
with_meta,
5151
)
52-
from tri.form import (
52+
from tri_form import (
5353
create_members_from_model,
5454
DISPATCH_PATH_SEPARATOR,
5555
evaluate_and_group_links,
@@ -60,25 +60,25 @@
6060
member_from_model,
6161
render_template,
6262
)
63-
from tri.form.render import (
63+
from tri_form.render import (
6464
render_attrs,
6565
render_class,
6666
)
67-
from tri.named_struct import (
67+
from tri_named_struct import (
6868
NamedStruct,
6969
NamedStructField,
7070
)
71-
from tri.query import (
71+
from tri_query import (
7272
Q_OP_BY_OP,
7373
Query,
7474
QueryException,
7575
)
76-
from tri.struct import (
76+
from tri_struct import (
7777
merged,
7878
Struct,
7979
)
8080

81-
from tri.table.db_compat import setup_db_compat
81+
from tri_table.db_compat import setup_db_compat
8282

8383
__version__ = '7.0.2' # pragma: no mutate
8484

lib/tri/table/db_compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from tri.declarative import Shortcut
1+
from tri_declarative import Shortcut
22

33

44
def setup_db_compat():
55
setup_db_compat_django()
66

77

88
def setup_db_compat_django():
9-
from tri.table import register_column_factory
9+
from tri_table import register_column_factory
1010
try:
1111
# noinspection PyUnresolvedReferences
1212
from django.db.models import IntegerField, FloatField, TextField, BooleanField, AutoField, CharField, DateField, DateTimeField, DecimalField, EmailField, TimeField, ForeignKey, ManyToOneRel, ManyToManyField, ManyToManyRel

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def read_reqs(name):
1515

1616

1717
def read_version():
18-
with open(os.path.join('lib', 'tri/table', '__init__.py'), encoding='utf8') as f:
18+
with open(os.path.join('lib', 'tri_table', '__init__.py'), encoding='utf8') as f:
1919
m = re.search(r'''__version__\s*=\s*['"]([^'"]*)['"]''', f.read())
2020
if m:
2121
return m.group(1)

0 commit comments

Comments
 (0)