Skip to content

Commit

Permalink
Merge pull request #145 from Bernardo-MG/merge_main
Browse files Browse the repository at this point in the history
Merge main
  • Loading branch information
Bernardo-MG committed Jun 9, 2015
2 parents 67d6e87 + 03ff312 commit 24fdba6
Show file tree
Hide file tree
Showing 50 changed files with 1,006 additions and 685 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
Expand Down Expand Up @@ -47,8 +48,9 @@ coverage.xml
*.mo
*.pot

# Django stuff:
# Logs:
*.log
*.log.*

# Sphinx documentation
docs/_build/
Expand Down
8 changes: 8 additions & 0 deletions .scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# This script runs the normal tests

if [ -z "$DOCS" ] && [ -z "$COVERAGE" ]; then

tox -e $(echo py$TRAVIS_PYTHON_VERSION | tr -d . | sed -e 's/pypypy/pypy/')

fi
18 changes: 5 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,20 @@ python:
- "3.4"
- "pypy"
- "pypy3"
env:
- REQUIREMENTS=lowest
- REQUIREMENTS=release
matrix:
include:
- python: "2.7"
env: DOCS=true
- python: "3.4"
env: DOCS=true
- python: "2.7"
env: COVERAGE=true
exclude:
- python: "3.2"
env: REQUIREMENTS=lowest
- python: "3.3"
env: REQUIREMENTS=lowest
- python: "3.4"
env: REQUIREMENTS=lowest
- python: "pypy3"
env: REQUIREMENTS=lowest

before_install:
- chmod +x ./.scripts/run_tests.sh
install:
- pip install tox
script:
- if [ -z "$DOCS" ] && [ -z "$COVERAGE" ]; then tox -e $(echo py$TRAVIS_PYTHON_VERSION | tr -d . | sed -e 's/pypypy/pypy/')-$REQUIREMENTS; fi
- ./.scripts/run_tests.sh
- if [ ! -z "$DOCS" ]; then tox -e docs; fi
- if [ ! -z "$COVERAGE" ]; then tox -e coverage; fi
25 changes: 20 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Miscellany files
include LICENSE
include README.rst
# The tests folder is removed
prune tests
# Data files are added
include Makefile
include make.bat
include tox.ini
include requirements.txt
include .coveragerc

# Tests
recursive-exclude tests *.pyc
recursive-exclude tests *.pyo

# Data files
include data_cwr/*.py
include data_cwr/*.csv
include data_cwr/*.yml
# Configuration files are added

# Configuration files
include config_cwr/*.yml
include config_cwr/*.cml
include config_cwr/*.cml

# Documentation
recursive-include docs *
recursive-exclude docs *.pyc
recursive-exclude docs *.pyo
prune docs/_build
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif
help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " clean to remove the distribution folders"
@echo " dist to make the standard distribution"
@echo " build to build the distribution"
@echo " install to install the project"
@echo " requirements to install the project requirements"
@echo " register to register on pypi"
Expand All @@ -56,7 +56,7 @@ clean:
rm -r -f $(DOCBUILDDIR)

# Distribution.
dist:
build:
$(PYTHON) setup.py sdist

# Install in local libraries repository
Expand All @@ -77,7 +77,8 @@ register-test:

# Pypi deployment.
deploy:
$(PYTHON) setup.py sdist upload -r pypi
$(PYTHON) setup.py release
twine upload dist/*

# Pypitest deployment.
deploy-test:
Expand Down
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
CWR Data Model API
==================

.. image:: https://badge.fury.io/py/cwr-api.svg
:target: https://pypi.python.org/pypi/cwr-api
:alt: CWR-API Pypi package page

.. image:: https://readthedocs.org/projects/cwr-dataapi/badge/?version=latest
:target: https://readthedocs.org/projects/cwr-dataapi/?badge=latest
:alt: Documentation Status

This projects offers a domain model for the CISAC CWR standard v2.1 to be
used on Python applications, along a series of parsing which allow
transformations between the model and various data structures.
Expand Down Expand Up @@ -50,7 +58,7 @@ The project has been tested in the following versions of the interpreter:
All other dependencies are indicated on the requirements.txt file.
The included makefile can install them with the command:

``make requirements``
``$ make requirements``

Among them, the most important is the `Pyparsing`_ library, which is used
to create the CWR file parser.
Expand All @@ -63,15 +71,11 @@ installation of the library.

This can be done with the following command:

``make install``
``$ make install``

Additionally, the project is offered as a `Pypi package`_, and can be installed through pip:

``pip install cwr-api``

.. image:: https://badge.fury.io/py/cwr-api.svg
:target: https://pypi.python.org/pypi/cwr-api
:alt: CWR-API Pypi package page
``$ pip install cwr-api``

Collaborate
-----------
Expand Down
1 change: 1 addition & 0 deletions config_cwr/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@


1 change: 0 additions & 1 deletion config_cwr/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os

import yaml

from cwr.grammar.factory.config import rule_config_file

"""
Expand Down
9 changes: 0 additions & 9 deletions config_cwr/group_config_common.cml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,20 @@ group:
id: groups
rules:
[
sequence
[
group: group_info (at_least_1)
]
]

group:
id: group_info
rules:
[
sequence
[
record: group_header
group: transactions (optional)
option
[
record: group_trailer_base
record: group_trailer_short
]
]
]

group:
Expand All @@ -40,10 +34,7 @@ group:
id: transmission
rules:
[
sequence
[
record: transmission_header
group: groups
record: transmission_trailer
]
]
Loading

0 comments on commit 24fdba6

Please sign in to comment.