-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
彭雨杨
committed
Dec 12, 2023
1 parent
05a9b63
commit af2efaf
Showing
8 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "bank_management" | ||
version = "0.0.1" | ||
authors = [ | ||
{ name="Alan", email="zhangmuqing2011@163.com" }, | ||
{ name="Yuyang", email="yuyangpeng15@gmail.com" } | ||
] | ||
description = "An project for DATA 533, UBCO" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/pengyuyang-315/step3_banking_management" | ||
Issues = "https://github.com/pengyuyang-315/step3_banking_management/issues" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
Metadata-Version: 2.1 | ||
Name: bank-management | ||
Version: 0.0.1 | ||
Summary: An project for DATA 533, UBCO | ||
Author-email: Alan <zhangmuqing2011@163.com>, Yuyang <yuyangpeng15@gmail.com> | ||
Project-URL: Homepage, https://github.com/pengyuyang-315/step3_banking_management | ||
Project-URL: Issues, https://github.com/pengyuyang-315/step3_banking_management/issues | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Requires-Python: >=3.8 | ||
Description-Content-Type: text/markdown | ||
|
||
# Banking-Management ![example workflow](https://github.com/pengyuyang-315/step3_banking_management/actions/workflows/python-app.yml/badge.svg) | ||
Project for 533 | ||
|
||
## Developers: | ||
Alan Zhang && Yuyang Peng | ||
|
||
## Overview | ||
The AZYY Bank Management System is a Python package designed to simulate a simple banking system with user and admin functionalities. It includes features such as user registration, client and admin management, investment handling, and more. | ||
|
||
# AZYY Bank Management System - Function Details | ||
|
||
## Overview | ||
|
||
The AZYY Bank Management System is built with several functions to manage user and admin interactions, as well as investment handling. Here, we provide details about key functions in the system. | ||
|
||
## How to test? | ||
Go to test.ipynb which is isolated from the requierd package "bank_management". | ||
Then run this file. | ||
|
||
```python | ||
from bank_management import start | ||
``` | ||
This block is used to import functional py file from the required package | ||
|
||
```python | ||
start.main() | ||
``` | ||
Then this block is used to start our program. | ||
|
||
## Continuous integration testing | ||
We are using GitHub Action to help us test our package functions. The CI configuration file is stored in .github/workflow/, the screenshot of 75% coverage is attatched. | ||
|
||
## Things to notice about test files required in step 1 | ||
Before run the test file in subpackage investment, go to the 7th line manage_investment.py and delete a dot | ||
into this "from investment import investment,mortgage,zero_coupon_bond,government_bond" | ||
But when running test.ipynb or start.py, add the dot back. | ||
|
||
## Functions in start(for initialization) | ||
|
||
### `clients_initialization()` | ||
|
||
- **Description:** Initializes client objects with sample data. | ||
|
||
- **Returns:** A dictionary containing client objects. | ||
|
||
### `admins_initialization()` | ||
|
||
- **Description:** Initializes admin objects with sample data. | ||
|
||
- **Returns:** A dictionary containing admin objects. | ||
|
||
### `investment_initialization()` | ||
|
||
- **Description:** Initializes an empty dictionary for investment objects. | ||
|
||
- **Returns:** An empty dictionary for investment objects. | ||
|
||
### `mortgage_initialization()`, `zcb_initialization()`, `gov_initialization()` | ||
|
||
- **Description:** Initializes dictionaries with sample data for different types of investments (mortgage, zero coupon bond, government bond). | ||
|
||
- **Returns:** Dictionaries containing investment objects. | ||
|
||
### `main()` | ||
|
||
- **Description:** The main function that runs the AZYY Bank Management System. It prompts the user to choose a role (new user, existing client, admin, quit) and handles the corresponding actions. | ||
|
||
### `test()` | ||
|
||
- **Description:** A test function (currently commented out) that demonstrates the usage of the `admin_login()` function. | ||
|
||
|
||
## Usage | ||
|
||
To use the functions in this system, follow these steps: | ||
|
||
1. **Initialize Clients, Admins, and Investments:** | ||
- Call `clients_initialization()` to initialize client data. | ||
- Call `admins_initialization()` to initialize admin data. | ||
- Call `investment_initialization()` to initialize an empty investment dictionary. | ||
- Call `mortgage_initialization()`, `zcb_initialization()`, and `gov_initialization()` to initialize investment dictionaries. | ||
|
||
2. **Run the Main Function:** | ||
- Call `main()` to start the AZYY Bank Management System. | ||
- Choose your role (new user, existing client, admin, quit) and follow the on-screen instructions. | ||
|
||
3. **Manage Personal Investments:** | ||
- If the user chooses the "Existing client" role, they can manage personal investments using the `personal_invest(c_new)` function. | ||
|
||
4. **View All Investments:** | ||
- Call `show_all_investment(mortgage_dict, zcb_dict, gov_dict)` to display details of all available investments. | ||
|
||
5. **Testing:** | ||
- Call `test()` to run a test function (currently commented out). | ||
|
||
## Sample Data | ||
|
||
Sample data for clients, admins, and investments is pre-initialized in the code. | ||
|
||
## License | ||
|
||
This project is licensed under the [MIT License](LICENSE). | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
README.md | ||
pyproject.toml | ||
setup.cfg | ||
src/bank_management/__init__.py | ||
src/bank_management/start.py | ||
src/bank_management.egg-info/PKG-INFO | ||
src/bank_management.egg-info/SOURCES.txt | ||
src/bank_management.egg-info/dependency_links.txt | ||
src/bank_management.egg-info/top_level.txt | ||
src/bank_management/investment/__init__.py | ||
src/bank_management/investment/investment.py | ||
src/bank_management/investment/investment_test.py | ||
src/bank_management/investment/manage_investment.py | ||
src/bank_management/user/__init__.py | ||
src/bank_management/user/admin.py | ||
src/bank_management/user/client.py | ||
src/bank_management/user/user_test.py | ||
tests/testsuite.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bank_management |