Lightweight ERP project enhancement

Description

Last TW week you presented your prototype to Judy and Bob and they were super satisfied (for reason).

In the meantime it came into Bob’s mind that some basic data analisys would be beneficial for his shop. He is interested in data like:

  • Which buyer spent the most money?
  • Which buyers purchased most frequent?

So Bill has created a data analyser module with some function description and also defined a new data item (customer_id) in the sales table that tells which customer belongs to the given sale. Though he does not adjusted the sales tables so you have to do that (ie. insert the customers’ ids.)

Unfortunately Bill had no time to write tests so you need to read the specification carefully.

Specification

sales module

The data of this module is enhanced with the customer_id that refers to the ‘id’ in the crm module. This tells who (which customer) belongs to a given sale.

Also some new functions were defined.

The tables TODO

data_analyser

This module is called from the main menu.

This module has no own data file but use other modules (crm, sales) to get data from.

Please avoid to access the data files of other modules directly from this module but through the functions of other modules.

crm

New function descriptions were added to support the data analyser module.

Your task

The following is a prioritized list that you can choose from. Prioritized means that ideally you should start an item if all of the predecessors are ready.

  1. Merge branch ‘week2’ of the upstream repo into your current repo as it is described bellow.
  2. Finish all the modules and task from last week
  3. Implement the menu and the functions in the data analyser module and the functions in other modules you needed for the data analyser functions. (You can create new functions in other modules and also you do not need to implement all of the functions.)
  4. In data_analyser module implement a function that gives back all the customers who did not buy anything (i. e. no sale belong to). (Note that no function description has prepared for this task.)
  5. Refactor the modules so that the table should be list of dictionaries instead of list of lists.
  6. Implement whatever data analyser function you feel to be useful. (Again no prepared function descriptions.)

(5 and 6 are exchangeable in terms of priority.)

(You do not have to accomplish all of the items in the list.)

Plan your project

Plan your work before you start work. Talk through the tasks in your group and make a plan (who will do what, how much time do you need for a task / subtask, what are the dependencies between subtasks.)

Choose the first some items from the list above that fits into your week according to your estimation.

Continue to register your plan and progress in a same way that was described in the last TW week in the same spreadsheet.

Advices

  • Use clean code (DRY, descriptive naming, formatting).
  • Read the description of the functions carefully. Read again. :) Discussing it with your mates might help to avoid misunderstanding.
  • You do not have to accomplish all of the items on the list above. Please consider at planning that there will be hardly any mentors around during this TW week.

Rules

  • Clean code (did we mention it before? :))
  • You can use the data file (directly) from only its own module (with the aid of data_manager.py).
  • All common (module-independent) function should be implemented in common.py.
  • Each team member should implement at least 2 new functions.
  • You are not allowed to create new files in the whole project, but you can make new functions.
  • You do not need to implement all the functions in all modules. For completing the task of the data analyser module you need to implement all functions in the data analyser module.

Github Classroom project

You will use the same repository you have cloned.

You need to merge the ‘week2’ branch to your code to get the new modules and function descriptions. So please do the following one of the team need to do the following:

  1. Go to your git repo with the ERP project that is in synch with the github.
  2. Pull the week2 branch of the upstream repo into your repo:

    git pull https://github.com/CodecoolBP20172/pbwp-3rd-tw-lightweight-erp.git week2
    
  3. Resolve conflicts if needed.

  4. Commit.

  5. Push the merge into GitHub:

    git push origin master
    
  6. Now, teammates can pull.

This exercise deepens your Python knowledge, improves your skill to write clean code, boosts your ability to conform to requirements, to work with a version control system, and to work together as a team.