GSA-TTS / FAC

GSA's Federal Audit Clearinghouse
Other
18 stars 5 forks source link

Move Django commands to `support` #2829

Closed tadhg-ohiggins closed 5 months ago

tadhg-ohiggins commented 9 months ago

We decided to move all of our Django management commands into one app for easier tracking and to reduce the possibilities of collisions; we will move them to support and name them in such a way as to indicate what app they’re closest to.

These are mostly independent of each other, except when multiple items refer to a command plus its tests and/or documentation, and can (and probably should) be tackled in small groups.

- [ ]   Move `audit/management/commands/csv_to_pg.py` to `support/management/commands/audit_local_create_cognizant_baseline_json.py`.
- [ ]   Update its documentation and move it to `support/management/commands/audit_local_create_cognizant_baseline_json.md`.
- [ ]   Move `audit/management/commands/load_fixtures.py` to `support/management/commands/audit_load_fixtures.py`.
- [ ]   Update its documentation and move it to `support/management/commands/audit_load_fixtures.md`.
- [ ]   Update its tests in `audit/test_commands.py`and move them to `support/test_command_audit_load_fixtures.py`.
- [ ]   Move `audit/management/commands/update_oldformat_report_ids.py` to `support/management/commands/audit_update_oldformat_report_ids.py`.
- [ ]   Move `census_historical_migration/management/commands/csv_to_postgres.py` to `support/management/commands/census_historical_migration_csv_to_postgres.py`.
- [ ]   Move `census_historical_migration/management/commands/historic_data_migrator.py` to `support/management/commands/census_historical_migration_historic_data_migrator.py`.
- [ ]   Move `census_historical_migration/management/commands/historic_workbook_generator.py` to `support/management/commands/census_historical_migration_historic_workbook_generator.py`.
- [ ]   Either delete `data_distro` or write issue for moving its management commands.
- [ ]   Move `dissemination/management/commands/create_api_jwt.py` to `support/management/commands/dissemination_create_api_jwt.py`.
- [ ]   Move `dissemination/management/commands/create_api_schema.py` to `support/management/commands/dissemination_create_api_schema.py`.
- [ ]   Move `dissemination/management/commands/create_api_views.py` to `support/management/commands/dissemination_create_api_views.py`.
- [ ]   Move `dissemination/management/commands/delete_and_regenerate_dissemination_from_intake.py` to `support/management/commands/dissemination_delete_and_regenerate_dissemination_from_intake.py`.
- [ ]   Move `dissemination/management/commands/drop_api_schema.py` to `support/management/commands/dissemination_drop_api_schema.py`.
- [ ]   Move `dissemination/management/commands/drop_api_views.py` to `support/management/commands/dissemination_drop_api_views.py`.
- [ ]   Move `dissemination/management/commands/drop_deprecated_api_schema_and_views.py` to `support/management/commands/dissemination_drop_deprecated_api_schema_and_views.py`.
- [ ]   Move `dissemination/management/commands/end_to_end_test_data_generator.py` to `support/management/commands/dissemination_end_to_end_test_data_generator.py`.
- [ ]   Move `dissemination/management/commands/generate_workbook_files.py` to `support/management/commands/dissemination_generate_workbook_files.py`.
- [ ]   Move `support/management/commands/`
- [ ]   Rename `support/management/commands/collect_metrics.py` to `support_collect_metrics.py`.
- [ ]   Rename `support/management/commands/fac_s3.py` to `support_fac_s3.py`.
- [ ]   Rename `support/management/commands/purge_data.py` to `support_purge_data.py`.
- [ ]   Rename `support/management/commands/run_2022.py` to `support_run_2022.py`.
- [ ]   Rename `support/management/commands/seed_cog_baseline.py` to `support_seed_cog_baseline.py`.
- [ ]   Move `users/management/commands/make_staff.py` to `support/management/commands/users_make_staff.py`.
- [ ]   Update its tests in and move them.
- [ ]   Move `users/management/commands/make_super.py` to `support/management/commands/users_make_super.py`.
- [ ]   Update its tests in and move them.
jadudm commented 6 months ago

I'm going to leave this in backlog. I'm unclear why everything is support.

I'm worried that the "support" app becomes a default dumping ground, as opposed to (say) commands that operate on the dissemination models.

But, if this was decided, then we'll leave the ticket. I think some of these commands are no longer needed, and perhaps shouldn't be moved. But, I can't easily evaluate that right now.

danswick commented 5 months ago

Let's close this as not planned for now. "Soon" we will take stock of all the Django apps and do a larger consolidation. Let's handle management commands as part of that work rather than something to do now.