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

Sanitize API #76

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft

Sanitize API #76

wants to merge 17 commits into from

Conversation

vilhelmprytz
Copy link
Member

@vilhelmprytz vilhelmprytz commented Sep 4, 2020

  • wilfred.errors is now wilfred.api.errors, wilfred.database is now wilfred.api.database

TODO:

  • Move functionality that is supposed to be in API to the API.
  • api: Implement all possible functions so that no operations require direct interaction to the database (e.g. server.create which currently requires the CLI to manually create a database object).
  • cli: Remove references to the database and only use the API

Fixes #60

* wilfred.errors is now wilfred.api.errors, wilfred.database is now wilfred.api.database
@vilhelmprytz vilhelmprytz added this to In progress in v0.8.0 Sep 4, 2020
@vilhelmprytz vilhelmprytz removed this from In progress in v0.8.0 Sep 4, 2020
* introduced wilfred.api.servers "create" function, ability to create a new server without ever having to interact with the database
* introduced wilfred.api.servers "query" function, get a db object of server via API and not via database
* accidentally imported "environ" from os in previous commit, removed this
* added ability to override random_string() as id when creating a new server
* tests/test_server.py: now uses wilfred.api.servers.create to create server over adding db object to database directly
* forgot variable name, name=name.lower() and not just the argument name.lower()
@vilhelmprytz
Copy link
Member Author

This is quite out-of-date with master. I will check if the conflicts are solved easily, if not, I will just re-do the work I started here.

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.

Restructure and sanitize Wilfred API
1 participant