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

Refactor config module to export a lazy-load object #94

Open
berinhard opened this issue Oct 10, 2019 · 0 comments
Open

Refactor config module to export a lazy-load object #94

berinhard opened this issue Oct 10, 2019 · 0 comments

Comments

@berinhard
Copy link
Owner

@isabarros raised a very valid point during our discussion in the PR #93. To expand pyp5js configuration and also to be able to unit test the base SKETCHBOOK_DIR creation, we should change the existing pytest.config module to export a lazy-load object instead of giving direct access to its configuration constants. Django's settings should be the main guide as an approach to address that. The ideal import to use pyp5js configs would be:

from pyp5js.config import conf
print(conf.SKETCHBOOK_DIR)

I think it's only worthwhile to work on this issue after #93 is merged into develop. This is because this new conf object implicates in a few code changes that would be better to do with a better test coverage for the web application.

@berinhard berinhard changed the title Refactor config module to be an lazy-load object Refactor config module to export a lazy-load object Oct 10, 2019
@berinhard berinhard mentioned this issue Oct 10, 2019
11 tasks
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

No branches or pull requests

1 participant