Skip to content

Commit 0d81c01

Browse files
committed
🤝 sync with pyexcel-commons and setupmobans. use pyexcel-ezodf
1 parent 2fae5a3 commit 0d81c01

File tree

9 files changed

+68
-45
lines changed

9 files changed

+68
-45
lines changed

.moban.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ configuration:
22
configuration_dir: "commons/config"
33
template_dir:
44
- "commons/templates"
5+
- "setupmobans/templates"
56
- ".moban.d"
67
configuration: pyexcel_ods3.yaml
78
targets:
@@ -10,11 +11,10 @@ targets:
1011
- "docs/source/conf.py": "docs/source/conf.py.jj2"
1112
- .travis.yml: travis.yml
1213
- requirements.txt: requirements.txt
13-
- LICENSE: LICENSE.jj2
1414
- MANIFEST.in: MANIFEST.in.jj2
1515
- "tests/requirements.txt": "tests/requirements.txt"
16-
- test.sh: test.sh.jj2
17-
- test.bat: test.sh.jj2
16+
- test.sh: test.script.jj2
17+
- test.bat: test.script.jj2
1818
- "tests/test_filter.py": "tests/test_filter.py.jj2"
1919
- "tests/test_formatters.py": "tests/test_formatters.py"
2020
- "tests/test_stringio.py": "tests/test_stringio.py.jj2"

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ python:
1010
- 2.7
1111
- 2.6
1212
before_install:
13-
- cd $HOME
14-
- "if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then deactivate && wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.7.1-linux_x86_64-portable.tar.bz2 -O - | tar -jxf - && echo 'Setting up aliases...' && ln -s pypy-5.7.1-linux_x86_64-portable pypy2-latest && export PATH=$HOME/pypy2-latest/bin/:$PATH && virtualenv --no-site-packages --python ~/pypy2-latest/bin/pypy pypy2-env && echo 'Creating custom env...' && source pypy2-env/bin/activate && python -V; fi"
15-
- cd -
1613
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install ordereddict; fi
1714
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install weakrefset; fi
1815
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi

README.rst

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ pyexcel-ods3 - Let you focus on data, instead of ods format
88
.. image:: https://api.travis-ci.org/pyexcel/pyexcel-ods3.svg?branch=master
99
:target: http://travis-ci.org/pyexcel/pyexcel-ods3
1010

11-
.. image:: https://codecov.io/github/pyexcel/pyexcel-ods3/coverage.png
12-
:target: https://codecov.io/github/pyexcel/pyexcel-ods3
11+
.. image:: https://codecov.io/gh/pyexcel/pyexcel-ods3/branch/master/graph/badge.svg
12+
:target: https://codecov.io/gh/pyexcel/pyexcel-ods3
13+
14+
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
15+
:target: https://gitter.im/pyexcel/Lobby
1316

1417

1518
**pyexcel-ods3** is a tiny wrapper library to read, manipulate and write data in ods
@@ -318,19 +321,40 @@ Then install relevant development requirements:
318321
#. pip install -r requirements.txt
319322
#. pip install -r tests/requirements.txt
320323

324+
Once you have finished your changes, please provide test case(s), relevant documentation
325+
and update CHANGELOG.rst.
326+
327+
.. note::
328+
329+
As to rnd_requirements.txt, usually, it is created when a dependent
330+
library is not released. Once the dependecy is installed
331+
(will be released), the future
332+
version of the dependency in the requirements.txt will be valid.
333+
334+
335+
How to test your contribution
336+
------------------------------
337+
338+
Although `nose` and `doctest` are both used in code testing, it is adviable that unit tests are put in tests. `doctest` is incorporated only to make sure the code examples in documentation remain valid across different development releases.
339+
340+
On Linux/Unix systems, please launch your tests like this::
341+
342+
$ make
343+
344+
On Windows systems, please issue this command::
321345

322-
In order to update test environment, and documentation, additional steps are
323-
required:
346+
> test.bat
347+
348+
How to update test environment and update documentation
349+
---------------------------------------------------------
350+
351+
Additional steps are required:
324352

325353
#. pip install moban
354+
#. git clone https://github.com/pyexcel/setupmobans.git # generic setup
326355
#. git clone https://github.com/pyexcel/pyexcel-commons.git commons
327356
#. make your changes in `.moban.d` directory, then issue command `moban`
328357

329-
What is rnd_requirements.txt
330-
-------------------------------
331-
332-
Usually, it is created when a dependent library is not released. Once the dependecy is installed(will be released), the future version of the dependency in the requirements.txt will be valid.
333-
334358
What is pyexcel-commons
335359
---------------------------------
336360

@@ -341,18 +365,16 @@ What is .moban.d
341365

342366
`.moban.d` stores the specific meta data for the library.
343367

344-
How to test your contribution
345-
------------------------------
346-
347-
Although `nose` and `doctest` are both used in code testing, it is adviable that unit tests are put in tests. `doctest` is incorporated only to make sure the code examples in documentation remain valid across different development releases.
368+
Acceptance criteria
369+
-------------------
348370

349-
On Linux/Unix systems, please launch your tests like this::
350-
351-
$ make
352-
353-
On Windows systems, please issue this command::
354-
355-
> test.bat
371+
#. Has Test cases written
372+
#. Has all code lines tested
373+
#. Passes all Travis CI builds
374+
#. Has fair amount of documentation if your change is complex
375+
#. Please update CHANGELOG.rst
376+
#. Please add yourself to CONTRIBUTORS.rst
377+
#. Agree on NEW BSD License for your contribution
356378

357379
Installation Note
358380
================================================================================

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
]
1212

1313
intersphinx_mapping = {
14-
'pyexcel': ('http://pyexcel.readthedocs.org/en/latest/', None),
14+
'pyexcel': ('http://pyexcel.readthedocs.io/en/latest/', None),
1515
}
1616
spelling_word_list_filename = 'spelling_wordlist.txt'
1717
templates_path = ['_templates']
@@ -21,7 +21,7 @@
2121
project = u'pyexcel-ods3'
2222
copyright = u'2015-2017 Onni Software Ltd.'
2323
version = '0.4.0'
24-
release = '0.4.0'
24+
release = '0.4.1'
2525
exclude_patterns = []
2626
pygments_style = 'sphinx'
2727
html_theme = 'default'

pyexcel_ods3.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
overrides: "pyexcel.yaml"
22
name: "pyexcel-ods3"
33
nick_name: ods3
4-
version: 0.4.0
4+
version: 0.4.1
5+
current_version: 0.4.1
56
release: 0.4.0
67
file_type: ods
78
dependencies:
89
- pyexcel-io>=0.4.0
910
- lxml
10-
- ezodf>=0.3.2
11+
- pyexcel-ezodf>=0.3.3
1112
- weakrefset;python_version<"2.7"
1213
description: |
1314
A wrapper library to read, manipulate and write data in ods format

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pyexcel-io>=0.4.0
22
lxml
3-
ezodf>=0.3.2
3+
pyexcel-ezodf>=0.3.3
44
weakrefset;python_version<"2.7"

rnd_requirements.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
https://github.com/chfw/lml/archive/master.zip
2-
https://github.com/pyexcel/pyexcel-io/archive/master.zip
3-
https://github.com/pyexcel/pyexcel/archive/master.zip
4-
https://github.com/pyexcel/pyexcel-xls/archive/master.zip
1+
https://github.com/pyexcel/pyexcel-ezodf/archive/master.zip

setup.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@
1010

1111
NAME = 'pyexcel-ods3'
1212
AUTHOR = 'C.W.'
13-
VERSION = '0.4.0'
14-
EMAIL = 'wangc_2011 (at) hotmail.com'
13+
VERSION = '0.4.1'
14+
EMAIL = 'wangc_2011@hotmail.com'
1515
LICENSE = 'New BSD'
1616
DESCRIPTION = (
1717
'A wrapper library to read, manipulate and write data in ods format' +
1818
''
1919
)
20+
URL = 'https://github.com/pyexcel/pyexcel-ods3'
21+
DOWNLOAD_URL = '%s/archive/0.4.0.tar.gz' % URL
22+
FILES = ['README.rst', 'CHANGELOG.rst']
2023
KEYWORDS = [
21-
'excel',
22-
'python',
23-
'pyexcel',
2424
'ods'
25+
'python'
2526
]
2627

2728
CLASSIFIERS = [
2829
'Topic :: Office/Business',
2930
'Topic :: Utilities',
3031
'Topic :: Software Development :: Libraries',
3132
'Programming Language :: Python',
32-
'License :: OSI Approved :: BSD License',
3333
'Intended Audience :: Developers',
3434
'Programming Language :: Python :: 2.6',
3535
'Programming Language :: Python :: 2.7',
@@ -42,7 +42,7 @@
4242
INSTALL_REQUIRES = [
4343
'pyexcel-io>=0.4.0',
4444
'lxml',
45-
'ezodf>=0.3.2',
45+
'pyexcel-ezodf>=0.3.3',
4646
]
4747

4848
if PY26:
@@ -87,7 +87,11 @@ def filter_out_test_code(file_handle):
8787
found_test_code = False
8888
yield line
8989
else:
90-
yield line
90+
for keyword in ['|version|', '|today|']:
91+
if keyword in line:
92+
break
93+
else:
94+
yield line
9195

9296

9397
if __name__ == '__main__':
@@ -97,7 +101,9 @@ def filter_out_test_code(file_handle):
97101
version=VERSION,
98102
author_email=EMAIL,
99103
description=DESCRIPTION,
100-
long_description=read_files('README.rst', 'CHANGELOG.rst'),
104+
url=URL,
105+
download_url=DOWNLOAD_URL,
106+
long_description=read_files(*FILES),
101107
license=LICENSE,
102108
keywords=KEYWORDS,
103109
extras_require=EXTRAS_REQUIRE,

tests/test_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def test_write_book(self):
1919
reader = Reader()
2020
reader.open(self.testfile)
2121
content = reader.read_all()
22-
reader.close()
2322
for key in content.keys():
2423
content[key] = list(content[key])
2524
assert content == self.content
25+
reader.close()
2626

2727
def tearDown(self):
2828
if os.path.exists(self.testfile):

0 commit comments

Comments
 (0)