Skip to content

Commit

Permalink
Added formatting rules with black and isort updating modules imports (#…
Browse files Browse the repository at this point in the history
…156)

* Updated changelog

* added black and isort dependencies

* Formatted code

* fixed imports

* renamed submodule lowercase

* Changed imports to not include class file name and resolved dependency loop

* Updated docs autodoc imports

* Corrected documentation
  • Loading branch information
ilcardella committed Aug 1, 2020
1 parent 33832e9 commit 7085c70
Show file tree
Hide file tree
Showing 54 changed files with 490 additions and 407 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Added
- Added Makefile to perform development and deployment actions
- Added formatting with black and isort

## Removed
- Removed `setup.py` with full usage of `pyproject.toml`
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ format: isort black
lint: flake mypy

# check: format lint test
check: test
check: format test

ci: install check docs build

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TradingMate
[![Build Status](https://travis-ci.com/ilcardella/TradingMate.svg?branch=master)](https://travis-ci.com/ilcardella/TradingMate) [![Documentation Status](https://readthedocs.org/projects/tradingmate/badge/?version=latest)](https://tradingmate.readthedocs.io/en/latest/?badge=latest)
![TradingMate CI](https://github.com/ilcardella/TradingMate/workflows/TradingMate%20CI/badge.svg) ![Documentation Status](https://readthedocs.org/projects/tradingmate/badge/?version=latest)

TradingMate is a portfolio manager for stocks traders. It lets you record all
your trades with a simple and basic interface, showing the current status of
Expand Down
127 changes: 74 additions & 53 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -1,126 +1,147 @@
Modules
=======
#######

Each section of this document provides the source code documentation of each
component of TradingMate.


TradingMate
-----------
===========

.. automodule:: TradingMate
.. automodule:: tradingmate

.. autoclass:: TradingMate
:members:

Model
-----
=====

The ``Model`` module contains the business logic and the data management of
The ``model`` module contains the business logic and the data management of
TradingMate.

.. automodule:: tradingmate.model

Holding
^^^^^^^

.. automodule:: Model.Holding
-------

.. autoclass:: Holding
:members:

Portfolio
^^^^^^^^^

.. automodule:: Model.Portfolio
---------

.. autoclass:: Portfolio
:members:

DatabaseHandler
^^^^^^^^^^^^^^^

.. automodule:: Model.DatabaseHandler
---------------

.. autoclass:: DatabaseHandler
:members:

StockPriceGetter
^^^^^^^^^^^^^^^^

.. automodule:: Model.StockPriceGetter
----------------

.. autoclass:: StockPriceGetter
:members:

ConfigurationManager
--------------------

.. autoclass:: ConfigurationManager
:members:

Trade
-----

.. autoclass:: Trade
:members:

Broker
======

The ``broker`` module contains the interfaces to connect to the online market brokers

.. automodule:: tradingmate.model.broker

AlphaVantageInterface
---------------------

.. autoclass:: AlphaVantageInterface
:members:

YFinanceInterface
-----------------

.. autoclass:: YFinanceInterface
:members:

StocksInterface
---------------

.. autoclass:: StocksInterface
:members:

StocksInterfaceFactory
----------------------

.. autoclass:: StocksInterfaceFactory
:members:

UI
---
===

The ``UI`` module contains the components that compose the User Interface
The ``ui`` module contains the components that compose the User Interface
of TradingMate.

DataInterface
^^^^^^^^^^^^^
.. automodule:: tradingmate.ui

.. automodule:: UI.DataInterface
DataInterface
-------------

.. autoclass:: DataInterface
:members:

TradingMateClient
^^^^^^^^^^^^^^^^^

.. automodule:: UI.TradingMateClient
-----------------

.. autoclass:: TradingMateClient
:members:

GTK
^^^
---

The ``gtk`` module contains the gtk components and widgets of the
graphical interface. They are not documented due to a Sphinx issue when
importing the ``gi`` Python module

Utils
-----
=====

The ``Utils`` module contains all the utlity components.
The ``utils`` module contains all the utlity components.

.. automodule:: tradingmate.utils

ConfigurationManager
^^^^^^^^^^^^^^^^^^^^

.. automodule:: Utils.ConfigurationManager
Enums
-----

.. autoclass:: ConfigurationManager
.. autoclass:: Actions
:members:

TaskThread
^^^^^^^^^^

.. automodule:: Utils.TaskThread

.. autoclass:: TaskThread
.. autoclass:: Markets
:members:

Trade
^^^^^

.. automodule:: Utils.Trade

.. autoclass:: Trade
.. autoclass:: Messages
:members:

Utils
^^^^^

.. automodule:: Utils.Utils
TaskThread
----------

.. autoclass:: Actions
.. autoclass:: TaskThread
:members:

.. autoclass:: Messages
:members:
Utils
-----

.. autoclass:: Markets
.. autoclass:: Utils
:members:
4 changes: 2 additions & 2 deletions docs/source/system.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
System Overview
===============
###############

TradingMate is a portfolio manager with the goal to help traders to record
their trades and deals in the stock market providing useful statistics and
Expand All @@ -8,7 +8,7 @@ It offers a simple user interface that provide information about the current
asset value, the overall profit/loss indicator and the trade history.

TradingMate
-----------
===========

TradingMate is the main entiy used to initialised all the
components. It is the link between the user interface and the data.
Expand Down

0 comments on commit 7085c70

Please sign in to comment.