|
2 | 2 |
|
3 | 3 | | Version | Release Date | Audience | |
4 | 4 | | :------ | :----------- | :--------- | |
5 | | -| 0.2.5 | ??/??/2022 | Developers | |
| 5 | +| 0.2.5 | 10/31/2022 | Developers | |
6 | 6 |
|
7 | 7 | **Message from ScottSucksAtProgramming:** |
8 | 8 |
|
|
12 | 12 | > more pleasant to work with and easier to understand. Read on to see the |
13 | 13 | > larger changes. |
14 | 14 |
|
15 | | -## Structural Changes |
| 15 | +## Structural Improvements |
16 | 16 |
|
17 | 17 | ### Interfaces |
18 | 18 |
|
19 | | -### Builders Package |
| 19 | +Most packages within the Narcotics Tracker now include an interface specifying |
| 20 | +how new modules should be created. Interfaces are located in a separate |
| 21 | +sub-package. |
20 | 22 |
|
21 | | -This package contains modules which can be used to build all of the DataItems |
22 | | -which are stored within the SQLite3 database. Full documentation is available |
23 | | -within that package and its modules. The previous templates were removed and |
24 | | -replaced with a single BuilderInterface class and modules for each of the six |
25 | | -DataItems. |
| 23 | +### Design Patterns |
26 | 24 |
|
27 | | -The number of tests for this package has been greatly reduced due to the change |
28 | | -in responsibility of the DataItems class. Many tests for those behaviors have |
29 | | -been moved to the other parts of the test suite. |
| 25 | +The Builder Pattern had already been implemented to make construction of |
| 26 | +DataItems easier. With this update the Command Pattern was also implemented |
| 27 | +allowing for the decoupling many modules. All commands share the same interface |
| 28 | +allowing for easy creation of new commands. Look at the documentation in the |
| 29 | +Commands Package for more information. |
30 | 30 |
|
31 | | -### Items Package |
| 31 | +### Inheritance and DataClasses |
32 | 32 |
|
33 | | -This package contain the modules for all items which are stored within the |
34 | | -database. The DataItem class defines an interface for all Data Items. |
| 33 | +The Items Package saw an overhaul in is structure. Each of the six DataItems |
| 34 | +inherit from a DataItem superclass. DataItems are no longer responsible for |
| 35 | +saving and loading themselves from the database, their only concern is to store |
| 36 | +their data. Each DataItem is now written as a dataclass. These two change make |
| 37 | +the code much simpler to read. |
35 | 38 |
|
36 | | -The number of tests for this package has been reduced and are available within |
37 | | -the Items sub-package within the Unit Tests package. |
| 39 | +## New Functionality |
38 | 40 |
|
39 | | -### Services Package |
| 41 | +### The Service Provider |
40 | 42 |
|
41 | | -The services package was created to contain all the services and utilities |
42 | | -which are used to run the Narcotics Tracker. As of this release are three |
43 | | -service providers in this package: The Conversion Manager, Datetime Manager, |
44 | | -and SQLiteManager. Additionally the ServiceProvider class offers an object |
45 | | -which instantiates these services in a single command. |
| 43 | +The Utilities Package was removed and replaced with the services package. As of |
| 44 | +this release three services are included in this package. The SQLiteManager |
| 45 | +provides the persistence service which stores and retrieves information from |
| 46 | +the SQLite3 database. To manage dates and times the DateTimeManager provides |
| 47 | +the datetime service; This object is responsible for providing datetime |
| 48 | +information and converting between human readable dates and unix timestamps. |
| 49 | +The conversion service, provided by the ConversionManager, converts between |
| 50 | +different units of mass and volume. |
46 | 51 |
|
47 | | -#### Intended Use |
| 52 | +The Service Provider module instantiates each service as needed. It is a single |
| 53 | +point of access for all current and future services. The Service Provider also |
| 54 | +allows for each service manager to be replaced with new or different services |
| 55 | +as needed. |
48 | 56 |
|
49 | | -## Command Pattern |
| 57 | +## Next Up! |
50 | 58 |
|
51 | | -The **Command Design Pattern** was implemented to interact with the SQLite3 |
52 | | -database. |
53 | | - |
54 | | -### Receivers |
55 | | - |
56 | | -All modules related to communications with SQLite3 have been moved into the |
57 | | -**Persistence Package**. The Database module contains the **SQLiteManager** |
58 | | -which sends and receives information from the database. It's designed to be |
59 | | -used as a context manager, and handles closing of the database connection |
60 | | -automatically. The Date Manager module contains the **DateTimeFormatter** which |
61 | | -returns the current datetime from the database and converts between a unix |
62 | | -timestamp and a human-readable date formatted as (MM-DD-YYYY HH:MM:SS). |
63 | | - |
64 | | -## Invokers |
65 | | - |
66 | | -Not yet implemented. |
67 | | - |
68 | | -## Interface |
69 | | - |
70 | | -The interface for SQLite3 Commands is located in the |
71 | | -`sqlite_command_interface.py` module. |
72 | | - |
73 | | -## Commands |
74 | | - |
75 | | -Commands are located within the `commands.py` module. |
| 59 | +The next release will see the creation of the reporting functionality and a set |
| 60 | +of general reports which are frequently used for narcotics management. |
0 commit comments