Skip to content

Commit d23f6eb

Browse files
committedMar 30, 2020
Added requirements.txt. Readying release 0.5
1 parent 9ba80fa commit d23f6eb

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed
 

‎docs/HISTORY.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
Changes
22
=======
33

4-
0.4 (unreleased)
4+
0.5 (2020-03-30)
55
----------------
66

7+
* Moved to python 3.6+ only.
8+
* Added requirements.txt for pip installation.
9+
10+
11+
0.4
12+
----
13+
714
* Reduced the dependencies by removing the unnecessary call of `zope.component`
815
in the adaptation of the factory.
916

‎requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-e .[test]

‎setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import sys
66

7-
version = '0.5.dev0'
7+
version = '0.5'
88

99

1010
def long_description(*desc):
@@ -14,8 +14,7 @@ def long_description(*desc):
1414
text.append(f.read())
1515
return '\n\n'.join(text)
1616

17-
tests_require = [
18-
]
17+
tests_require = ['pytest']
1918

2019
setup(name='dolmen.collection',
2120
version=version,

‎src/dolmen/collection/tests/test_collection.txt ‎tests/test_collection.txt

+14-14
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Components
77
First let's see the component, that is elements taking parts in collections::
88

99
>>> from dolmen.collection.components import Component
10-
>>> c1 = Component(u'The Sun', 'sun')
10+
>>> c1 = Component('The Sun', 'sun')
1111
>>> c1
1212
<Component The Sun>
1313
>>> c1.identifier
1414
'sun'
1515
>>> c1.title # doctest: +ALLOW_UNICODE
16-
u'The Sun'
16+
'The Sun'
1717

1818
It correctly implement IComponent::
1919

@@ -24,13 +24,13 @@ It correctly implement IComponent::
2424

2525
You can create a component without an id, using a title::
2626

27-
>>> c2 = Component(u'Moon')
27+
>>> c2 = Component('Moon')
2828
>>> c2
2929
<Component Moon>
3030
>>> c2.identifier
3131
'moon'
3232
>>> c2.title # doctest: +ALLOW_UNICODE
33-
u'Moon'
33+
'Moon'
3434

3535
Title only accept string argument
3636
a number (it won't be converted to string. Like this, this support
@@ -44,10 +44,10 @@ If by doing so, the title contain spaces, they will be replaced by
4444
``-``. If UTF-8 character are included, the identifiant will be
4545
encoded::
4646

47-
>>> c3 = Component(u'Some lost planet')
47+
>>> c3 = Component('Some lost planet')
4848
>>> c3.identifier
4949
'some-lost-planet'
50-
>>> c4 = Component(u'État du désir')
50+
>>> c4 = Component('État du désir')
5151
>>> c4.identifier
5252
'44379436291150180186884816837720809088'
5353

@@ -179,19 +179,19 @@ You can remove all elements from a collection::
179179
Ignoring already defined components
180180
...................................
181181

182-
>>> from dolmen.collection.components import IGNORE
182+
>>> from dolmen.collection.components import IGNORE
183183
>>> ignoring = Collection()
184184
>>> ignoring.behavior = IGNORE
185-
185+
186186
>>> ignoring.append(c1)
187187
>>> list(ignoring)
188188
[<Component The Sun>]
189189
>>> ignoring.append(c2)
190190
>>> list(ignoring)
191191
[<Component The Sun>, <Component Moon>]
192192

193-
>>> c1prime = Component(u'The Sun prime', 'sun')
194-
193+
>>> c1prime = Component('The Sun prime', 'sun')
194+
195195
You can add twice the same component, the second is ignored::
196196

197197
>>> ignoring.append(c1prime)
@@ -202,7 +202,7 @@ You can add twice the same component, the second is ignored::
202202
Overriding already defined components
203203
.....................................
204204

205-
>>> from dolmen.collection.components import OVERRIDE
205+
>>> from dolmen.collection.components import OVERRIDE
206206
>>> overriding = Collection()
207207
>>> overriding.behavior = OVERRIDE
208208

@@ -213,8 +213,8 @@ Overriding already defined components
213213
>>> list(overriding)
214214
[<Component The Sun>, <Component Moon>]
215215

216-
>>> c1prime = Component(u'The Sun prime', 'sun')
217-
216+
>>> c1prime = Component('The Sun prime', 'sun')
217+
218218
You can add twice the same component, the second overrides the first::
219219

220220
>>> overriding.append(c1prime)
@@ -389,7 +389,7 @@ Parameters on collections
389389
You can provides extra parameters on collections that will be set as
390390
attributes on the object::
391391

392-
>>> s6 = Collection(s2, name=u'me', city=u'rotterdam')
392+
>>> s6 = Collection(s2, name='me', city='rotterdam')
393393
>>> s6
394394
<Collection>
395395
>>> list(s6)

0 commit comments

Comments
 (0)
Please sign in to comment.