Skip to content

Commit

Permalink
Merge pull request #144 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 2, 2015
2 parents ba2011b + b4a81a2 commit 67d6e87
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 44 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ include data_cwr/*.py
include data_cwr/*.csv
include data_cwr/*.yml
# Configuration files are added
include config_cwr/*.yml
include config_cwr/*.yml
include config_cwr/*.cml
34 changes: 17 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ DISTDIR = dist

# Sets the .egg file path.
# The file will be located at the project's root.
EGGDIR = *.egg-info
EGGDIR = CWR_API.egg-info

# Sets the tox folder path.
# It will be the '.tox' folder.
TOXDIR = .tox

# Sets the docs output folder path.
# It will be in the 'docs' folder.
DOCBUILDDIR = docs\\build

# User-friendly check for sphinx-build
ifeq ($(shell which $(PYTHON) >/dev/null 2>&1; echo $$?), 1)
Expand All @@ -34,14 +38,13 @@ endif
help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " clean to remove the distribution folders"
@echo " dist_source to make the standard distribution"
@echo " dist_binary to make the binary distribution"
@echo " dist to make the standard distribution"
@echo " install to install the project"
@echo " requirements to install the project requirements"
@echo " pypi_reg to register on pypi"
@echo " pypitest_reg to register on testpypi"
@echo " pypi to upload to pypi"
@echo " pypitest to upload to testpypi"
@echo " register to register on pypi"
@echo " register-test to register on testpypi"
@echo " deploy to upload to pypi"
@echo " deploy-test to upload to testpypi"
@echo " test to run tests"

# Clean option
Expand All @@ -50,15 +53,12 @@ clean:
rm -r -f $(DISTDIR)
rm -r -f $(EGGDIR)
rm -r -f $(TOXDIR)
rm -r -f $(DOCBUILDDIR)

# Source distribution.
dist_source:
# Distribution.
dist:
$(PYTHON) setup.py sdist

# Binary distribution.
dist_binary:
$(PYTHON) setup.py bdist

# Install in local libraries repository
install:
$(PYTHON) setup.py install
Expand All @@ -68,19 +68,19 @@ requirements:
pip install --upgrade -r requirements.txt

# Pypi registration.
pypi_reg:
register:
$(PYTHON) setup.py register -r pypi

# Pypitest registration.
pypitest_reg:
register-test:
$(PYTHON) setup.py register -r testpypi

# Pypi deployment.
pypi:
deploy:
$(PYTHON) setup.py sdist upload -r pypi

# Pypitest deployment.
pypitest:
deploy-test:
$(PYTHON) setup.py sdist upload -r testpypi

# Tests suite.
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ Additionally, the project is offered as a `Pypi package`_, and can be installed

``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

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

Expand Down
2 changes: 1 addition & 1 deletion cwr/__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__ = '0.0.21'
__version__ = '0.0.23'
__license__ = 'MIT'
93 changes: 93 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,96 @@ with the data they contain.

This library has been developed based on CWR specification version 2.1 revision
3, from December 10th 2004.

-------------------
Getting the library
-------------------

.. raw:: html

<p style="height:22px">
<a href="https://pypi.python.org/pypi/cwr-api"
alt="CWR-API Pypi package page">
<img src="https://badge.fury.io/py/cwr-api.svg"/>
</a>

<a href="https://pypi.python.org/pypi/cwr-api"
alt="CWR-API Pypi monthly downloads">
<img src="https://img.shields.io/pypi/dm/cwr-api.svg"/>
</a>
</p>

The latest version of the library can always be found at Pypi. Additionally, the
code is on Github.

Github
------

.. raw:: html

<p style="height:22px">
<a href="https://github.com/weso/CWR-DataApi"
alt="Github forks">
<img src="https://img.shields.io/github/forks/weso/cwr-dataapi.svg"/>
</a>

<a href="https://github.com/weso/CWR-DataApi"
alt="Github stars">
<img src="https://img.shields.io/github/stars/weso/cwr-dataapi.svg"/>
</a>

<a href="https://github.com/weso/CWR-DataApi"
alt="Github license">
<img src="https://img.shields.io/github/license/weso/cwr-dataapi.svg"/>
</a>
</p>

The code is being stored at GitHub.


Continuous integration and tests
--------------------------------

A small infrastructure is being used to check all the code being published
into the code repository.

Travis (CI)
-----------
.. raw:: html

<p style="height:22px">
<a href="https://travis-ci.org/Bernardo-MG/CWR-DataApi"
alt="Travis CI">
<img src="https://api.travis-ci.org/Bernardo-MG/CWR-DataApi.svg"/>
</a>
</p>

Travis is used for continuous integration. It checks the test after each build.

Coveralls (Coverage)
--------------------

.. raw:: html

<p style="height:22px">
<a href="https://coveralls.io/r/weso/CWR-DataApi"
alt="Coveralls coverage reports">
<img src="https://coveralls.io/repos/weso/CWR-DataApi/badge.svg"/>
</a>
</p>

Coveralls generates coverage reports from the tests data received from Travis.

Landscape (Code health)
-----------------------

.. raw:: html

<p style="height:22px">
<a href="https://landscape.io/github/Bernardo-MG/CWR-DataApi/master"
alt="Landscape code health">
<img src="https://landscape.io/github/Bernardo-MG/CWR-DataApi/master/landscape.svg?style=flat"/>
</a>
</p>

Landscape checks commits to make
44 changes: 21 additions & 23 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if "%DISTDIR%" == "" (
REM Sets the .egg file path.
REM The file will be located at the project's root.
if "%EGGDIR%" == "" (
set EGGDIR=*.egg-info
set EGGDIR=CWR_API.egg-info
)

REM Sets the tox folder path.
Expand All @@ -33,6 +33,12 @@ if "%TOXDIR%" == "" (
set TOXDIR=.tox
)

REM Sets the docs output folder path.
REM It will be in the 'docs' folder.
if "%DOCBUILDDIR%" == "" (
set DOCBUILDDIR="docs/build"
)

REM If no parameters are received, the help is shown
if "%1" == "" goto help

Expand All @@ -42,14 +48,13 @@ if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. clean to remove the distribution folders
echo. dist_source to make the source distribution
echo. dist_binary to make the binary distribution
echo. dist to make the standard distribution
echo. install to install the project
echo. requirements to install the project requirements
echo. pypi_reg to register on pypi
echo. pypitest_reg to register on pypi-test
echo. pypi to upload to pypi
echo. pypitest to upload to pypi-test
echo. register to register on pypi
echo. register-test to register on pypi-test
echo. deploy to deploy to pypi
echo. deploy-test to upload to pypi-test
echo. test to run tests
goto end
)
Expand All @@ -66,6 +71,9 @@ if "%1" == "clean" (
if exist %TOXDIR% (
rd /S /Q %TOXDIR%
)
if exist %DOCBUILDDIR% (
rd /S /Q %DOCBUILDDIR%
)
goto end
)

Expand All @@ -89,8 +97,8 @@ exit /b 1
:interpreter_ok


REM Source distribution.
if "%1" == "dist_source" (
REM Distribution.
if "%1" == "dist" (
%PYTHON% setup.py sdist
if errorlevel 1 exit /b 1
echo.
Expand All @@ -99,16 +107,6 @@ if "%1" == "dist_source" (
goto end
)

REM Binary distribution.
if "%1" == "dist_binary" (
%PYTHON% setup.py bdist
if errorlevel 1 exit /b 1
echo.
echo.Generated binary distribution. It can be found in the
echo.%DISTDIR% folder.
goto end
)

REM Install in local libraries repository.
if "%1" == "install" (
%PYTHON% setup.py install
Expand All @@ -124,7 +122,7 @@ if "%1" == "requirements" (
)

REM Pypi registration.
if "%1" == "pypi_reg" (
if "%1" == "register" (
%PYTHON% setup.py register -r pypi
if errorlevel 1 exit /b 1
echo.
Expand All @@ -133,7 +131,7 @@ if "%1" == "pypi_reg" (
)

REM Pypitest registration.
if "%1" == "pypitest_reg" (
if "%1" == "register-test" (
%PYTHON% setup.py register -r pypitest
if errorlevel 1 exit /b 1
echo.
Expand All @@ -142,7 +140,7 @@ if "%1" == "pypitest_reg" (
)

REM Pypi deployment.
if "%1" == "pypi" (
if "%1" == "deploy" (
%PYTHON% setup.py sdist upload -r pypi
if errorlevel 1 exit /b 1
echo.
Expand All @@ -151,7 +149,7 @@ if "%1" == "pypi" (
)

REM Pypitest deployment.
if "%1" == "pypitest" (
if "%1" == "deploy-test" (
%PYTHON% setup.py sdist upload -r pypitest
if errorlevel 1 exit /b 1
echo.
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pyparsing==2.0.3
pyyaml==3.11
setuptools==16.0
pyyaml==3.11

0 comments on commit 67d6e87

Please sign in to comment.