Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
702db48
Current year is set automatically in the docs
Bernardo-MG Jan 2, 2018
188e904
Updated dependencies
Bernardo-MG Jan 4, 2018
7558d10
Added git attributes file
Bernardo-MG Jan 6, 2018
fd49e42
The test profile can be define when running the setup file
Bernardo-MG Jan 6, 2018
a18299d
Added a variable for the source package
Bernardo-MG Jan 6, 2018
c9c5085
Added info about running tests
Bernardo-MG Jan 6, 2018
9e87fbe
Merge remote-tracking branch 'remotes/origin/master' into develop
Bernardo-MG Jan 6, 2018
7144693
Corrected install requirements
Bernardo-MG Jan 6, 2018
e02999d
Added more dependencies to the requirements list
Bernardo-MG Jan 6, 2018
8c38a73
Updated installation information
Bernardo-MG Jan 6, 2018
afd1020
Corrected test dependencies
Bernardo-MG Jan 6, 2018
a3a3e4e
Added command to install requirements
Bernardo-MG Jan 6, 2018
febe79c
Added arguments to the commands
Bernardo-MG Jan 6, 2018
5eddb40
Removed make files
Bernardo-MG Jan 6, 2018
0691a27
Removed requirements command
Bernardo-MG Jan 6, 2018
489d26a
Raised scripts version
Bernardo-MG Jan 6, 2018
8a2fcda
Added missing CI command
Bernardo-MG Jan 6, 2018
7128736
Removed includes from the manifest
Bernardo-MG Jan 7, 2018
3daf868
Changed given command for installing requirements
Bernardo-MG Jan 7, 2018
cbc04c7
The test command is now taken as a dependency
Bernardo-MG Jan 7, 2018
356484a
Updated test command
Bernardo-MG Jan 7, 2018
71359dd
Updated test command dependency
Bernardo-MG Jan 7, 2018
05993e6
The version is now loaded through a function
Bernardo-MG Jan 7, 2018
6f5ea67
Using library for reading the version
Bernardo-MG Jan 7, 2018
6d2297a
Removed unused dependencies
Bernardo-MG Jan 7, 2018
4ae7cbd
Updated dependencies
Bernardo-MG Jan 9, 2018
6533756
Restored code
Bernardo-MG Jan 9, 2018
bfd2af4
Updated dependencies
Bernardo-MG Jan 9, 2018
cf89bcd
Updated dependencies
Bernardo-MG Jan 9, 2018
f5ffd4f
Raised version
Bernardo-MG Jan 9, 2018
6a23627
Added dependencies
Bernardo-MG Jan 9, 2018
dfd9d5c
Forcing installation of setup dependencies
Bernardo-MG Jan 9, 2018
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Auto detect text files and perform LF normalization
* text=auto

# Known text files
*.css text diff=css
*.js text
*.json text
*.htm text diff=html
*.html text diff=html
*.properties text
*.sh text
*.md text
*.txt text
*.xml text
*.yml text

# Known source files
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python

# Known binary files
*.db binary
*.p binary
*.pkl binary
*.pyc binary
*.pyd binary
*.pyo binary
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@ addons:

before_install:
# Gets scripts
- git clone -b v1.1.3 --single-branch https://github.com/Bernardo-MG/ci-shell-scripts.git ~/.scripts
- git clone -b v1.2.0 --single-branch https://github.com/Bernardo-MG/ci-shell-scripts.git ~/.scripts
# Sets scripts as executable
- chmod -R +x ~/.scripts/*
# Prepares CI environment
- source ~/.scripts/travis/load-travis-environment.sh
- source ~/.scripts/travis/load-travis-environment-python.sh
install:
# tox is required for the tests
- pip install tox
# sphinx is required for the docs
- pip install sphinx
# Dependencies
- pip install --upgrade -r requirements.txt
script:
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Miscellany files
include LICENSE
include README.rst
include Makefile
include make.bat
include tox.ini
include requirements.txt
include .coveragerc
Expand Down
89 changes: 0 additions & 89 deletions Makefile

This file was deleted.

24 changes: 18 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ The project has been tested in the following versions of the interpreter:
- Python 3.6

All other dependencies are indicated on the requirements.txt file.
The included makefile can install them with the command:

``$ make requirements``
These can be installed with:

``$ pip install --upgrade -r requirements.txt``

Installing
~~~~~~~~~~
Expand All @@ -67,11 +68,9 @@ to install it. For this use the following command;

``$ pip install dice-notation``

If manual installation is required, the project includes a setup.py file, along
a makefile allowing direct installation of the library, which can be done with
the following command:
If needed, manual installation is possible:

``$ make install``
``$ python setup.py install``

Usage
-----
Expand All @@ -94,6 +93,19 @@ needed, which will generate a new random value each time it is called::
print(dice.roll())
print(dice.roll())

Testing
-------

The tests included with the project can be run with:

``$ python setup.py test``

This will delegate the execution to tox.

It is possible to run just one of the test profiles, in this case the py36 profile:

``$ python setup.py test -p "py36"``

Collaborate
-----------

Expand Down
2 changes: 1 addition & 1 deletion dice_notation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
:license: MIT, see LICENSE for more details.
"""

__version__ = '1.0.3'
__version__ = '1.0.5'
__license__ = 'MIT'
2 changes: 1 addition & 1 deletion dice_notation/parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from dice_notation.parser.dice import DiceParser

__all__ = ['DiceParser']
__all__ = ['DiceParser']
2 changes: 1 addition & 1 deletion dice_notation/parser/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ def __init__(self, **kw):
tabmodule=self.tabmodule)

def parse(self, value):
return yacc.parse(value)
return yacc.parse(value)
2 changes: 1 addition & 1 deletion dice_notation/parser/dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ def p_error(self, p):
if p:
self._logger.error("Syntax error at '%s'", p.value)
else:
self._logger.error("Syntax error at EOF")
self._logger.error("Syntax error at EOF")
2 changes: 1 addition & 1 deletion dice_notation/parser/notation.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,4 @@ def operate(self):
return result

def roll(self):
return self.operate()
return self.operate()
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# General information about the project.
project = 'Dice Notation Tools for Python'
project_safe = project.replace(' ', '_')
copyright = u'2016-2018, Bernardo Martínez Garrido'
copyright = u'2016-%s, Bernardo Martínez Garrido' % datetime.datetime.now().year
authors = [u'Bernardo Martínez Garrido']

# The version info for the project.
Expand Down Expand Up @@ -102,7 +102,7 @@
'author_url': 'https://github.com/Bernardo-MG',
'twitter_id': '@BernardoMartG',
'publish_date': datetime.datetime.now().date(),
'years': '2016-2018',
'years': '2016-%s' % datetime.datetime.now().year,
'scm_name': 'Github',
'scm_url': 'https://github.com/Bernardo-MG/dice-notation-python',
'ci_name': 'Travis',
Expand Down
18 changes: 18 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ needed, which will generate a new random value each time it is called::
print(dice.roll())
print(dice.roll())

-------
Testing
-------

The tests included with the project can be run with:

.. code::

$ python setup.py test

This will delegate the execution to tox.

It is possible to run just one of the test profiles, in this case the py36 profile:

.. code::

$ python setup.py test -p "py36"

Loading