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

Improve tests and functions dealing with config reading/writing #30

Open
3 tasks done
rwinterschlaf opened this issue Feb 23, 2023 · 6 comments
Open
3 tasks done

Comments

@rwinterschlaf
Copy link
Collaborator

rwinterschlaf commented Feb 23, 2023

Currently default-based tests are thrown off if a user-generated config exists. Config writing has not been turned into a test yet. Thus this issue encapsulates the following areas:

  • config writing
    --> more importantly: making tests unintrusive to running collections; perhaps through a placeholder URL that does not actually lead anywhere and gets deleted again after testing
    --> add a config retriever option that immediately chooses the default config, even if user config exists (could be good for testing)
    --> implement format guidelines that throw errors if a user does not following them (i.e. www. .de instead of https://www. .de/)
    --> make a TEST!
  • TEST: correct config being chosen
  • Rinse and repeat for metadata configs

In this vein, also test out if PK's idea to have the default configs as .py with dicts in them works and stops problems from popping up.

@FlxVctr
Copy link
Member

FlxVctr commented Feb 23, 2023

would refrain from having configs as .py files, as they're more prone to user error/less user friendly.

Besides that, pytest has built-in functions for temporal directories that could be used for testing.

@FlxVctr
Copy link
Member

FlxVctr commented Feb 23, 2023

@rwinterschlaf
Copy link
Collaborator Author

All functional so far - tests check for default and user created homepage and metadata configs. Not sure how to proceed in the field of the metadata config. Would an interactive fill-out click function (as with the homepage config) be sensible?

@rwinterschlaf
Copy link
Collaborator Author

  • decide on whether an interactive fill-in prompt function would be useful or too much of a hassle for the user
    @FlxVctr thoughts?

@FlxVctr
Copy link
Member

FlxVctr commented Mar 17, 2023

It's a nice convenience function, but depends on how much time you have to spare

@FlxVctr
Copy link
Member

FlxVctr commented Mar 17, 2023

A function to create and open a well commented template file might be quicker to develop, less error prone and easier to maintain in the future

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

2 participants