Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create one folder per year for automated reports #131

Open
4 of 5 tasks
bernard357 opened this issue May 17, 2024 · 0 comments
Open
4 of 5 tasks

create one folder per year for automated reports #131

bernard357 opened this issue May 17, 2024 · 0 comments

Comments

@bernard357
Copy link
Contributor

bernard357 commented May 17, 2024

What is this?

With this change, every report generated by SPA is put in a separate folder for the on-going year.

Why is it important?

Previously, the structure for reports was structured only by report categories. This will induce potentially a large number of files after some years, which is not sustainable.

How to implement it?

For each category of report, create a folder per year.

Previously, only the weekly inventories of AWS accounts had the year in the path:

SpaReports
├── Activities
│   ├── CostCenterA
│   │   ├── 2023-03-CostCenterA-activities.csv
│   │   ├── 2023-04-CostCenterA-activities.csv
│   │   ├── 2023-05-CostCenterA-activities.csv
│   │   ├── ...
│   ├── CostCenterB
│   │   ├── 2023-03-CostCenterB-activities.csv
│   │   ├── 2023-04-CostCenterB-activities.csv
│   │   ├── 2023-05-CostCenterB-activities.csv
│   │   ├── ...
│   ├── ...
├── Costs
│   ├── CostCenterA
│   │   ├── 2023-02-CostCenterA-services.csv
│   │   ├── 2023-02-CostCenterA-services.xlsx
│   │   ├── 2023-03-CostCenterA-services.csv
│   │   ├── 2023-03-CostCenterA-services.xlsx
│   │   ├── ...
│   ├── CostCenterB
│   │   ├── 2023-02-CostCenterB-services.csv
│   │   ├── 2023-02-CostCenterB-services.xlsx
│   │   ├── 2023-03-CostCenterB-services.csv
│   │   ├── 2023-03-CostCenterB-services.xlsx
│   │   ├── ...
│   └── Summary
│       ├── 2022-07-Summary-charges.csv
│       ├── 2022-07-Summary-charges.xlsx
│       ├── 2022-07-Summary-services.csv
│       ├── 2022-07-Summary-services.xlsx
│       ├── ...
└── Inventories
    ├── 2023
    │   ├── 03
    │   │   ├── 2023-03-13-inventory.csv
    │   │   ├── 2023-03-18-inventory.csv
    │   │   └── 2023-03-25-inventory.csv
    │   ├── 04
    │   │   ├── 2023-04-01-inventory.csv
    │   │   ├── 2023-04-02-inventory.csv
    │   │   ├── 2023-04-08-inventory.csv
    │   │   ├── 2023-04-15-inventory.csv
    │   │   ├── 2023-04-22-inventory.csv
    │   │   └── 2023-04-29-inventory.csv
    │   ├── ...

Aftery:

SpaReports
├── Activities
│   ├── CostCenterA
│   │   ├── 2023
│   │   │   ├── 2023-03-CostCenterA-activities.csv
│   │   │   ├── 2023-04-CostCenterA-activities.csv
│   │   │   ├── 2023-05-CostCenterA-activities.csv
│   │   │   ├── ...
│   ├── CostCenterB
│   │   ├── 2023
│   │   │   ├── 2023-03-CostCenterB-activities.csv
│   │   │   ├── 2023-04-CostCenterB-activities.csv
│   │   │   ├── 2023-05-CostCenterB-activities.csv
│   │   │   ├── ...
│   │   ├── ...
├── Costs
│   ├── CostCenterA
│   │   ├── 2023
│   │   │   ├── 2023-02-CostCenterA-services.csv
│   │   │   ├── 2023-02-CostCenterA-services.xlsx
│   │   │   ├── 2023-03-CostCenterA-services.csv
│   │   │   ├── 2023-03-CostCenterA-services.xlsx
│   │   │   ├── ...
│   ├── CostCenterB
│   │   ├── 2023
│   │   │   ├── 2023-02-CostCenterB-services.csv
│   │   │   ├── 2023-02-CostCenterB-services.xlsx
│   │   │   ├── 2023-03-CostCenterB-services.csv
│   │   │   ├── 2023-03-CostCenterB-services.xlsx
│   │   │   ├── ...
│   └── Summary
│   │   ├── 2023
│   │       ├── 2022-07-Summary-charges.csv
│   │       ├── 2022-07-Summary-charges.xlsx
│   │       ├── 2022-07-Summary-services.csv
│   │       ├── 2022-07-Summary-services.xlsx
│   │       ├── ...
└── Inventories
    ├── 2023
    │   ├── 03
    │   │   ├── 2023-03-13-inventory.csv
    │   │   ├── 2023-03-18-inventory.csv
    │   │   └── 2023-03-25-inventory.csv
    │   ├── 04
    │   │   ├── 2023-04-01-inventory.csv
    │   │   ├── 2023-04-02-inventory.csv
    │   │   ├── 2023-04-08-inventory.csv
    │   │   ├── 2023-04-15-inventory.csv
    │   │   ├── 2023-04-22-inventory.csv
    │   │   └── 2023-04-29-inventory.csv
    │   ├── ...

Definition of Done

  • change code to add the year in path of generated reports
  • change test code accordingly
  • pass make all-tests
  • pass make lint
  • validate in production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant