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

Extract content loader #264

Merged
merged 4 commits into from
May 10, 2016
Merged

Extract content loader #264

merged 4 commits into from
May 10, 2016

Conversation

Wynndow
Copy link
Contributor

@Wynndow Wynndow commented May 9, 2016

Removes the content loader
Removes the content_loader.py file and it's tests. They've been moved to a new package here: https://github.com/alphagov/digitalmarketplace-content-loader

Removes a couple of functions from formats.py
format_price and format_service_price have both been moved to the new package as format_price is a dependency of the content loader, and format_service_price of format_price. Tests have also been moved.

Mock dependency on test_documents.py
test_documents.py was importing ContentSection from the content loader. As it's now been removed form dmutils it makes sense to mock the dependency.

@allait
Copy link
Contributor

allait commented May 10, 2016

Needs a rebase, but looks good otherwise 👍

Wynndow added 4 commits May 10, 2016 10:58
Content loader has been extracted to a new package.

content_loader.py and its tests have been moved to the new dmcontent
package. The new package can be found here -
https://github.com/alphagov/digitalmarketplace-content-loader
The format_price function in dmutils.formats was only used by content
loader so it has been moved to the new package.

The format_service_price function is dependent on format_price so has
been moved too. It is however used by the front end apps - they will
need updating to import it from the new location.

The relevant tests have been moved to the new package.
The tests for document.py had a dependency on ContentSection from the
content_loader. As it has now been moved to a new package, the
dependency has been mocked.
@Wynndow Wynndow force-pushed the extract_content_loader branch from 611f6cd to 7092e22 Compare May 10, 2016 10:00
@Wynndow Wynndow merged commit a6ff621 into master May 10, 2016
@Wynndow Wynndow deleted the extract_content_loader branch May 10, 2016 10:02
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.

2 participants