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

feat: Add manufacture_data django command #734

Merged
merged 1 commit into from Jan 25, 2024
Merged

Conversation

marlonkeating
Copy link
Contributor

@marlonkeating marlonkeating commented Dec 20, 2023

Description

Adding support for the manufacture_data command from openedx/edx-django-utils#369

Ticket Link

ENT-7510

Testing

  1. make app-shell
  2. make requirements
  3. python ./manage.py manufacture_data --model enterprise_catalog.apps.catalog.models.EnterpriseCatalog --title "Test Catalog"

Test Cases

  • python ./manage.py manufacture_data --model enterprise_catalog.apps.catalog.models.EnterpriseCatalog --title "Test Catalog"
  • python ./manage.py manufacture_data --model enterprise_catalog.apps.curation.models. EnterpriseCurationConfig --title "Test Curation Config"
  • python ./manage.py manufacture_data --model enterprise_catalog.apps.academy.models.Academy --title "Test Academy"

TODO

Post-review

  • Squash commits into discrete sets of changes
  • Ensure that once the changes have been deployed to stage, prod is manually deployed

@marlonkeating marlonkeating force-pushed the mkeating/ENT-7510 branch 2 times, most recently from c8f434c to 62b9226 Compare January 24, 2024 17:51
build: add edx-django-utils 5.10.1

docs: update docstring

feat: Add academy/curation model factories

chore: isort fix

fix: ContentMetadataFactory now generates unique content_key

feat: condense fake content_key

build: remove common_constraints.txt. file
@marlonkeating marlonkeating merged commit 6dc6552 into master Jan 25, 2024
6 checks passed
@marlonkeating marlonkeating deleted the mkeating/ENT-7510 branch January 25, 2024 15:46
@@ -74,7 +74,7 @@ class Meta:
title = factory.Faker('lexify', text=f'{FAKE_CONTENT_TITLE_PREFIX} ??????????')

# model fields
content_key = factory.Sequence(lambda n: f'{str(n).zfill(5)}_metadata_item')
content_key = factory.Faker('bothify', text='??????????+####')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sequence count gets restarted from '0' whenever the management command is called, so we needed to move to a name generation scheme that ensures uniqueness with every call.

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

Successfully merging this pull request may close these issues.

None yet

2 participants