Skip to content

Commit

Permalink
Merge pull request #106 from lucasrodes/release/0.4.0
Browse files Browse the repository at this point in the history
Release/0.4.0
  • Loading branch information
lucasrodes committed Jan 24, 2021
2 parents 1e4cd33 + 9947300 commit 60de40a
Show file tree
Hide file tree
Showing 31 changed files with 434 additions and 206 deletions.
3 changes: 2 additions & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.1
current_version = 0.4.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(.(?P<pre>[a-z]+)(?P<prenum>\d+))?
serialize =
{major}.{minor}.{patch}.{pre}{prenum}
Expand All @@ -21,3 +21,4 @@ values =
[bumpversion:file:whatstk/__init__.py]

[bumpversion:file:docs/conf.py]

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ docs2
version-info.cfg
py37
py38
py39
*.ipynb

.pypirc
Expand All @@ -280,4 +281,5 @@ reports


docs/_build/
package-lock.json
package-lock.json
version-changes
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dist: xenial
language: python
python:
- 3.6
- 3.7
- 3.8
- 3.9
git:
depth: false
before_install:
Expand All @@ -26,7 +26,7 @@ script:
after_success:
- codecov # submit coverage
- cd docs
- make clean && make html # generate documentation
- make clean && make html # generate documentation
- cd ..

jobs:
Expand All @@ -37,7 +37,7 @@ jobs:
install: pip install -e .
script:
- cd docs
- make clean && make html # generate documentation
- make clean && make html # generate documentation
- cd ..
after_success:
- head -n 34 docs/conf.py
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

<p align="center">
<a href="#">
<img alt="Package version" src="https://img.shields.io/badge/version-0.3.1-blue.svg?&color=25D366&logo=whatsapp&">
<img alt="Package version" src="https://img.shields.io/badge/version-0.4.0-blue.svg?&color=25D366&logo=whatsapp&">
</a>
</p>
<!-- style=for-the-badge -->

<p align="center">
<a href="https://travis-ci.org/lucasrodes/whatstk"><img alt="Build Status" src="https://travis-ci.com/lucasrodes/whatstk.svg?branch=develop"></a>
<a href="https://codecov.io/gh/lucasrodes/whatstk"><img alt="codecov" src="https://codecov.io/gh/lucasrodes/whatstk/branch/master/graph/badge.svg"></a>
<a href="https://www.python.org/downloads/release/python-3/"><img alt="Python 3" src="https://img.shields.io/badge/python-3.6|3.7|3.8-blue.svg?&logo=python&logoColor=yellow"></a>
<a href="https://www.python.org/downloads/release/python-3/"><img alt="Python 3" src="https://img.shields.io/badge/python-3.7|3.8|3.9-blue.svg?&logo=python&logoColor=yellow"></a>
<a href="https://lcsrg.me/whatstk"><img alt="Documentation" src="https://img.shields.io/badge/whatstk-docs-royalblue.svg"></a>
<a href="https://pepy.tech/badge/whatstk"><img alt="Number of downloads" src="https://pepy.tech/badge/whatstk"></a>
<a href="http://github.com/lucasrodes/whatstk"><img alt="HitCount" src="https://views.whatilearened.today/views/github/lucasrodes/whatstk.svg"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
author = 'lucasrodes'

# The full version, including alpha/beta/rc tags
version = 'v0.3.1'
version = 'v0.4.0'


# -- General configuration ---------------------------------------------------
Expand Down
13 changes: 6 additions & 7 deletions docs/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ shown in the following example.
>>> from whatstk.data import whatsapp_urls
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.LOREM)
>>> chat.df.head(5)
username message
date
2020-01-15 02:22:56 Mary Nostrud exercitation magna id.
2020-01-15 03:33:01 Mary Non elit irure irure pariatur exercitation. 🇩🇰
2020-01-15 04:18:42 +1 123 456 789 Exercitation esse lorem reprehenderit ut ex ve...
2020-01-15 06:05:14 Giuseppe Aliquip dolor reprehenderit voluptate dolore e...
2020-01-15 06:56:00 Mary Ullamco duis et commodo exercitation.
date username message
0 2020-01-15 02:22:56 Mary Nostrud exercitation magna id.
1 2020-01-15 03:33:01 Mary Non elit irure irure pariatur exercitation. 🇩🇰
2 2020-01-15 04:18:42 +1 123 456 789 Exercitation esse lorem reprehenderit ut ex ve...
3 2020-01-15 06:05:14 Giuseppe Aliquip dolor reprehenderit voluptate dolore e...
4 2020-01-15 06:56:00 Mary Ullamco duis et commodo exercitation.
----

Expand Down
38 changes: 2 additions & 36 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog
> This section needs to be reviewed. Please refer to the repository commit messages for more information.
## Unreleased (2020-06-26)
## Unreleased (2020-11-02)


Full set of changes: [`0.2.0...HEAD`](https://github.com/lucasrodes/whatstk/compare/0.2.0...HEAD)
Expand All @@ -12,38 +13,3 @@ Full set of changes: [`0.1.11...0.2.0`](https://github.com/lucasrodes/whatstk/co

## 0.1.11 (2019-06-19)


Full set of changes: [`0.1.10...0.1.11`](https://github.com/lucasrodes/whatstk/compare/0.1.10...0.1.11)

## 0.1.10 (2019-06-18)


Full set of changes: [`0.1.9...0.1.10`](https://github.com/lucasrodes/whatstk/compare/0.1.9...0.1.10)

## 0.1.9 (2019-06-17)


Full set of changes: [`0.1.8...0.1.9`](https://github.com/lucasrodes/whatstk/compare/0.1.8...0.1.9)

## 0.1.8 (2019-06-17)


Full set of changes: [`0.1.7...0.1.8`](https://github.com/lucasrodes/whatstk/compare/0.1.7...0.1.8)

## 0.1.7 (2019-06-16)


Full set of changes: [`0.1.6...0.1.7`](https://github.com/lucasrodes/whatstk/compare/0.1.6...0.1.7)

## 0.1.6 (2019-06-16)


Full set of changes: [`0.1.1...0.1.6`](https://github.com/lucasrodes/whatstk/compare/0.1.1...0.1.6)

## 0.1.1 (2019-06-15)


Full set of changes: [`0.1.0...0.1.1`](https://github.com/lucasrodes/whatstk/compare/0.1.0...0.1.1)

## 0.1.0 (2019-06-15)

13 changes: 6 additions & 7 deletions docs/source/code_examples/load_chat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ which is a pandas.DataFrame with columns `username` (name of user sending the me
.. code-block:: python
>>> chat.df.head(5)
username message
date
2020-01-15 02:22:56 Mary Nostrud exercitation magna id.
2020-01-15 03:33:01 Mary Non elit irure irure pariatur exercitation. 🇩🇰
2020-01-15 04:18:42 +1 123 456 789 Exercitation esse lorem reprehenderit ut ex ve...
2020-01-15 06:05:14 Giuseppe Aliquip dolor reprehenderit voluptate dolore e...
2020-01-15 06:56:00 Mary Ullamco duis et commodo exercitation.
date username message
0 2020-01-15 02:22:56 Mary Nostrud exercitation magna id.
1 2020-01-15 03:33:01 Mary Non elit irure irure pariatur exercitation. 🇩🇰
2 2020-01-15 04:18:42 +1 123 456 789 Exercitation esse lorem reprehenderit ut ex ve...
3 2020-01-15 06:05:14 Giuseppe Aliquip dolor reprehenderit voluptate dolore e...
4 2020-01-15 06:56:00 Mary Ullamco duis et commodo exercitation.
Getting the start and end date of the chat can give us a good overview of the chat content.

Expand Down
13 changes: 6 additions & 7 deletions docs/source/code_examples/load_chat_hformat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ we have that the ``hformat='%d.%m.%y, %H:%M - %name:'``.
>>> from whatstk.data import whatsapp_urls
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.POKEMON, hformat='%d.%m.%y, %H:%M - %name:')
>>> chat.df.head(5)
username message
date
2016-08-06 13:23:00 Ash Ketchum Hey guys!
2016-08-06 13:25:00 Brock Hey Ash, good to have a common group!
2016-08-06 13:30:00 Misty Hey guys! Long time haven't heard anything fro...
2016-08-06 13:45:00 Ash Ketchum Indeed. I think having a whatsapp group nowada...
2016-08-06 14:30:00 Misty Definetly
date username message
0 2016-08-06 13:23:00 Ash Ketchum Hey guys!
1 2016-08-06 13:25:00 Brock Hey Ash, good to have a common group!
2 2016-08-06 13:30:00 Misty Hey guys! Long time haven't heard anything fro...
3 2016-08-06 13:45:00 Ash Ketchum Indeed. I think having a whatsapp group nowada...
4 2016-08-06 14:30:00 Misty Definetly
.. seealso::
:ref:`The header format <The header format>`
Expand Down
31 changes: 27 additions & 4 deletions docs/source/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ We are really open to your thoughts and feedback!

Bug reporting
-------------
Please report any bug that you may found to the `issues <https://github.com/lucasrodes/whatstk/issues>`_ section.
Please report any bug that you may find to the `issues <https://github.com/lucasrodes/whatstk/issues>`_ section.

----

Expand All @@ -20,18 +20,34 @@ If you find a new feature could be useful for the community, please try to add i

Submitting a Pull Request
-------------------------
After forking and editing the code, make sure that your code passes all the tests:
- Start by forking the `develop <https://github.com/lucasrodes/whatstk/tree/develop>`_ branch.
- Add your code to the project!
- Test your code running script `run-tests.sh <https://github.com/lucasrodes/whatstk/blob/master/run-tests.sh>`_.
This script checks the code style (flake8) and the logic of your code (pytest). Note: Make sure to open and read it. The first time you will need to run steps 1.1, 1.2 and 1.3.

.. code-block:: bash
sh ./run-tests.sh
This includes flake8 and pytest.
This script generates three HTML files which are placed within a created folder `reports`.

- Once your code successfully passed the tests, you can submitt a pull request and wait for its aproval


.. todo::

Use `tox <https://tox.readthedocs.io/en/latest/>`_

Aproval of pull request
^^^^^^^^^^^^^^^^^^^^^^^

A pull request will be accepted if:

- Adds new functionalities of interest.
- Does not decrease the overall project code `coverage <https://codecov.io/gh/lucasrodes/whatstk>`_.

Note: You will need to add tests for your code. For this, you can check the current `tests <https://github.com/lucasrodes/whatstk/tree/master/tests>`_.

----

Adding new examples
Expand All @@ -43,4 +59,11 @@ questions or doubts, join the `gitter group <https://gitter.im/whatstk/>`_.

API discussions
---------------
Consider joining the `gitter group <https://gitter.im/whatstk/>`_.
Consider joining the `gitter group <https://gitter.im/whatstk/>`_.

----

Doubts?
-------

Feel free to `contact me <https://lcsrg.me/pages/contact>`_ :)
65 changes: 30 additions & 35 deletions docs/source/getting_started/library-available-chats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ Brief fictional chat with Pokemon characters, which was manually designed by `@
>>> from whatstk import WhatsAppChat
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.POKEMON)
>>> chat.df.head(5)
username message
date
2016-08-06 13:23:00 Ash Ketchum Hey guys!
2016-08-06 13:25:00 Brock Hey Ash, good to have a common group!
2016-08-06 13:30:00 Misty Hey guys! Long time haven't heard anything fro...
2016-08-06 13:45:00 Ash Ketchum Indeed. I think having a whatsapp group nowada...
2016-08-06 14:30:00 Misty Definetly
date username message
0 2016-08-06 13:23:00 Ash Ketchum Hey guys!
1 2016-08-06 13:25:00 Brock Hey Ash, good to have a common group!
2 2016-08-06 13:30:00 Misty Hey guys! Long time haven't heard anything fro...
3 2016-08-06 13:45:00 Ash Ketchum Indeed. I think having a whatsapp group nowada...
4 2016-08-06 14:30:00 Misty Definetly
.. seealso::
Expand All @@ -57,13 +56,12 @@ library.
>>> from whatstk import WhatsAppChat
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.LOREM)
>>> chat.df.head(5)
username message
date
2020-01-15 02:22:56 Mary Nostrud exercitation magna id.
2020-01-15 03:33:01 Mary Non elit irure irure pariatur exercitation. 🇩🇰
2020-01-15 04:18:42 +1 123 456 789 Exercitation esse lorem reprehenderit ut ex ve...
2020-01-15 06:05:14 Giuseppe Aliquip dolor reprehenderit voluptate dolore e...
2020-01-15 06:56:00 Mary Ullamco duis et commodo exercitation.
date username message
0 2020-01-15 02:22:56 Mary Nostrud exercitation magna id.
1 2020-01-15 03:33:01 Mary Non elit irure irure pariatur exercitation. 🇩🇰
2 2020-01-15 04:18:42 +1 123 456 789 Exercitation esse lorem reprehenderit ut ex ve...
3 2020-01-15 06:05:14 Giuseppe Aliquip dolor reprehenderit voluptate dolore e...
4 2020-01-15 06:56:00 Mary Ullamco duis et commodo exercitation.
.. seealso::
`Chat file <http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem.txt>`_
Expand All @@ -78,13 +76,12 @@ Chat with 300 interventions of fictional users, generated using `python-lorem <h
>>> from whatstk import WhatsAppChat
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.LOREM1)
>>> chat.df.head(5)
username message
date
2019-10-20 10:16:00 John Laborum sed excepteur id eu cillum sunt ut.
2019-10-20 11:15:00 Mary Ad aliquip reprehenderit proident est irure mo...
2019-10-20 12:16:00 +1 123 456 789 Nostrud adipiscing ex enim reprehenderit minim...
2019-10-20 12:57:00 +1 123 456 789 Deserunt proident laborum exercitation ex temp...
2019-10-20 17:28:00 John Do ex dolor consequat tempor et ex.
date username message
0 2019-10-20 10:16:00 John Laborum sed excepteur id eu cillum sunt ut.
1 2019-10-20 11:15:00 Mary Ad aliquip reprehenderit proident est irure mo...
2 2019-10-20 12:16:00 +1 123 456 789 Nostrud adipiscing ex enim reprehenderit minim...
3 2019-10-20 12:57:00 +1 123 456 789 Deserunt proident laborum exercitation ex temp...
4 2019-10-20 17:28:00 John Do ex dolor consequat tempor et ex.
.. seealso::
`Chat file <http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem-merge-part1.txt>`_
Expand All @@ -101,13 +98,12 @@ Can be used along with **LOREM1** to test :func:`chat merging functionalities <w
>>> from whatstk import WhatsAppChat
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.LOREM2)
>>> chat.df.head(5)
username message
date
2020-06-20 10:16:00 John Elit incididunt lorem sed nostrud.
2020-06-20 11:15:00 Maria Esse do irure dolor tempor ipsum fugiat. 🇩🇰
2020-06-20 12:16:00 +1 123 456 789 Cillum anim non eu deserunt consectetur dolor ...
2020-06-20 12:57:00 +1 123 456 789 Non ipsum proident veniam est. 🏊🏻
2020-06-20 17:28:00 John Dolore in cupidatat proident.
date username message
0 2020-06-20 10:16:00 John Elit incididunt lorem sed nostrud.
1 2020-06-20 11:15:00 Maria Esse do irure dolor tempor ipsum fugiat. 🇩🇰
2 2020-06-20 12:16:00 +1 123 456 789 Cillum anim non eu deserunt consectetur dolor ...
3 2020-06-20 12:57:00 +1 123 456 789 Non ipsum proident veniam est. 🏊🏻
4 2020-06-20 17:28:00 John Dolore in cupidatat proident.
.. seealso::
`Chat file <http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem-merge-part1.txt>`_
Expand All @@ -122,13 +118,12 @@ Chat with 2000 interventions of fictional users, generated using `python-lorem <
>>> from whatstk import WhatsAppChat
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.LOREM_2000)
>>> chat.df.head(5)
username message
date
2019-04-16 02:09:00 +1 123 456 789 Et labore proident laboris do labore ex.
2019-04-16 03:01:00 Mary Reprehenderit id aute consectetur aliquip nost...
2019-04-17 12:56:00 John Amet magna officia ullamco pariatur ipsum cupi...
2019-04-17 13:30:00 Mary Cillum aute et cupidatat ipsum, occaecat lorem...
2019-04-17 15:09:00 John Eiusmod irure laboris dolore anim, velit velit...
date username message
0 2019-04-16 02:09:00 +1 123 456 789 Et labore proident laboris do labore ex.
1 2019-04-16 03:01:00 Mary Reprehenderit id aute consectetur aliquip nost...
2 2019-04-17 12:56:00 John Amet magna officia ullamco pariatur ipsum cupi...
3 2019-04-17 13:30:00 Mary Cillum aute et cupidatat ipsum, occaecat lorem...
4 2019-04-17 15:09:00 John Eiusmod irure laboris dolore anim, velit velit...
.. seealso::
`Chat file <http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem-2000.txt>`_
7 changes: 7 additions & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
whatstk
=======

.. toctree::
:maxdepth: 4

whatstk
30 changes: 30 additions & 0 deletions docs/source/whatstk.analysis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
whatstk.analysis package
========================

Submodules
----------

whatstk.analysis.interventions module
-------------------------------------

.. automodule:: whatstk.analysis.interventions
:members:
:undoc-members:
:show-inheritance:

whatstk.analysis.responses module
---------------------------------

.. automodule:: whatstk.analysis.responses
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: whatstk.analysis
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 60de40a

Please sign in to comment.