Skip to content

Commit

Permalink
Fix migration, delete models test, and lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
millerdev committed Feb 12, 2025
1 parent e78cf9e commit 3f3b9d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions corehq/apps/domain/tests/test_deletion_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
'domain.SuperuserProjectEntryRecord',
'dropbox.DropboxUploadHelper',
'export.DefaultExportSettings',
'experiments.ExperimentEnabler',
'field_audit.AuditEvent',
'fixtures.UserLookupTableStatus',
'fixtures.LookupTableRow', # handled by cascading delete
Expand Down
6 changes: 3 additions & 3 deletions corehq/apps/experiments/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class Migration(migrations.Migration):
name='ExperimentEnabler',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('campaign', models.CharField(help_text='Campaign name identifying a group of related experiments.', max_length=255)),
('path', models.CharField(blank=True, help_text="Example: 'corehq.apps.experiment.func'. Incomplete paths may be specified to match all experiments in a namespace. An empty string matches all experiments.", max_length=1024)),
('enabled_percent', models.SmallIntegerField(default=0, help_text='Zero means run only old, -1 to disable metrics as well. 1-100 means % of time to run new. 101 means always run new, never run old; 102 to disable metrics as well.', validators=[django.core.validators.MinValueValidator(-1), django.core.validators.MaxValueValidator(102)])),
('campaign', models.CharField(help_text='Identifier for a group of related experiments.', max_length=255)),
('path', models.CharField(blank=True, help_text='Example: corehq.apps.experiments.func Partial paths may be specified to match all experiments in a namespace. An empty string matches all experiments.', max_length=1024)),
('enabled_percent', models.SmallIntegerField(default=0, help_text='Zero means run only old, -1 to disable metrics as well. 1-100 means % of time to run new. 101 means run only new, 102 to disable metrics as well.', validators=[django.core.validators.MinValueValidator(-1), django.core.validators.MaxValueValidator(102)])),
],
options={
'unique_together': {('campaign', 'path')},
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/experiments/tests/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def func(a, *, x):

with pytest.raises(UserWarning, match="Duplicate experiment"):
@experiment
def func(a, *, x):
def func(a, *, x): # noqa: F811
return x


Expand Down

0 comments on commit 3f3b9d2

Please sign in to comment.