Skip to content

vinolivae/gen_report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Report Generator

TODO: Generate a report from a csv file

Problem

Given a csv file containing name, hours, day, month and year of 10 freelancers, return all hours, hours per month and hours per year.

Tips

Consider 30 days in every month.

Do not consider leap year.

See the the lib files to learn how to run with iex.


Example Table

Names Hours Day Month Year
name 1 10 5 1 2016
name 2 18 30 2 2017
name 3 17 10 3 2018
name 4 18 7 4 2019
name 5 6 25 12 2020

First run and test

mix deps.get
mix compile
mix test 

Try it

  • See the lib files and read the @doc.
  • Open iex with command iex -S mix.
  • Run the line iex> <code_to_run> in your iex.

The Expected Output Looks like this

%{
  all_hours: %{
        name: all_hours,
        name: all_hours,
        ...
    },
  hours_per_month: %{
        name: %{
            month: hours_per_month,
            month: hours_per_month,
            ...
        },
        name: %{
            month: hours_per_month,
            month: hours_per_month,
            ...
        }
    },
  hours_per_year: %{
        name: %{
            year: hours_per_year,
            year: hours_per_year,
            ...
        },
        name: %{
            year: hours_per_year,
            year: hours_per_year,
            ...
        }
    }
}

About

Generate a report from a csv file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages