feat(export): patient replace person - ref gestion-de-projet#3198#3200 - #504
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR systematically updates the table name reference from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
exporters/tests/base_test.py (1)
57-57: Consider extracting a shared table-name constant in test fixtures.
"Patient"is repeated across multiple fixture lines; using one constant inExportersTestBasewould reduce future rename churn.♻️ Suggested refactor
class ExportersTestBase(TestCaseWithDBs): + REQUIRED_TABLE_NAME = "Patient" @@ - self.csv_export_table = ExportTable.objects.create(export=self.csv_export, - name="Patient", + self.csv_export_table = ExportTable.objects.create(export=self.csv_export, + name=self.REQUIRED_TABLE_NAME, @@ - self.xlsx_export_table = ExportTable.objects.create(export=self.xlsx_export, - name="Patient", + self.xlsx_export_table = ExportTable.objects.create(export=self.xlsx_export, + name=self.REQUIRED_TABLE_NAME, @@ - self.hive_export_table = ExportTable.objects.create(export=self.hive_export, - name="Patient", + self.hive_export_table = ExportTable.objects.create(export=self.hive_export, + name=self.REQUIRED_TABLE_NAME,Also applies to: 68-68, 74-74
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@exporters/tests/base_test.py` at line 57, Extract the repeated literal "Patient" into a single class-level constant on ExportersTestBase (e.g., PATIENT_TABLE_NAME = "Patient") and update all test fixtures that currently use the string literal (the repeated table-name occurrences in the fixtures) to reference ExportersTestBase.PATIENT_TABLE_NAME instead; this centralizes the name for easy renames and reduces duplication across the fixtures.exporters/tests/test_hive_exporter.py (1)
12-12: Rename local test symbol/comments topatientfor consistency.Line 12 keeps
person_table_namewhile value is"Patient". Renaming the variable (and related comment wording) would improve clarity and avoid mixed terminology in this suite.Also applies to: 27-27, 41-41, 48-48, 54-54
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@exporters/tests/test_hive_exporter.py` at line 12, Rename the local test symbol person_table_name to patient_table_name (or patient_table) and update any comments that mention "person" to "patient" for consistency: locate the variable declaration person_table_name = "Patient" and rename all references (including assertions, fixtures, and comments around the same test file locations noted) so they use patient_table_name/patient_table and matching comment wording; ensure test helper names and any string comparisons remain unchanged except for the identifier and comment text.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@exporters/tests/base_test.py`:
- Line 57: Extract the repeated literal "Patient" into a single class-level
constant on ExportersTestBase (e.g., PATIENT_TABLE_NAME = "Patient") and update
all test fixtures that currently use the string literal (the repeated table-name
occurrences in the fixtures) to reference ExportersTestBase.PATIENT_TABLE_NAME
instead; this centralizes the name for easy renames and reduces duplication
across the fixtures.
In `@exporters/tests/test_hive_exporter.py`:
- Line 12: Rename the local test symbol person_table_name to patient_table_name
(or patient_table) and update any comments that mention "person" to "patient"
for consistency: locate the variable declaration person_table_name = "Patient"
and rename all references (including assertions, fixtures, and comments around
the same test file locations noted) so they use patient_table_name/patient_table
and matching comment wording; ensure test helper names and any string
comparisons remain unchanged except for the identifier and comment text.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 32b1b34b-cfbf-485a-b7f5-d8adfac9dd78
📒 Files selected for processing (9)
exporters/apis/export_api.pyexporters/tests/base_test.pyexporters/tests/test_csv_exporter.pyexporters/tests/test_hive_exporter.pyexporters/tests/test_xlsx_exporter.pyexports/tests/test_export_downloader.pyexports/tests/test_service_export.pyexports/tests/test_view_export.pyexports/tests/test_view_export_request.py
|
Conflits a gérer à cause du linter |
8da4b85 to
9260b1e
Compare
Fixes
Fixes ID/design-et-produit/ipa/cohort360/gestion-de-projet#3198
Fixes ID/design-et-produit/ipa/cohort360/gestion-de-projet#3200
Description
patient replace person
Summary by CodeRabbit