Skip to content

API for tags#34

Merged
jerbob merged 17 commits into
masterfrom
api_tag_improvements
Mar 6, 2018
Merged

API for tags#34
jerbob merged 17 commits into
masterfrom
api_tag_improvements

Conversation

@lemonsaurus
Copy link
Copy Markdown
Contributor

No description provided.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 3, 2018

Pull Request Test Coverage Report for Build 392

  • 56 of 58 (96.55%) changed or added relevant lines in 4 files are covered.
  • 17 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-2.5%) to 87.339%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pysite/database.py 5 7 71.43%
Files with Coverage Reduction New Missed Lines %
pysite/mixins.py 1 95.24%
pysite/base_route.py 2 94.92%
pysite/views/error_handlers/http_4xx.py 2 69.23%
pysite/decorators.py 4 91.49%
pysite/database.py 8 60.61%
Totals Coverage Status
Change from base Build 385: -2.5%
Covered Lines: 407
Relevant Lines: 466

💛 - Coveralls

Comment thread pysite/base_route.py Outdated
elif error_code is ErrorCodes.incorrect_parameters:
data["error_message"] = "Incorrect parameters provided"
http_code = 400
elif error_code is ErrorCodes.database_error:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not gonna fail your PR for this block because we need to rethink this entire system - but this is inconsistent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we should remove all that stuff, after the discussion we already had. But it's not really something we should do on this PR maybe. I can remove the additions I made into the system, though.

Comment thread pysite/route_manager.py
self.log = logging.getLogger()
self.app.secret_key = os.environ.get("WEBPAGE_SECRET_KEY", "super_secret")
self.app.config["SERVER_NAME"] = os.environ.get("SERVER_NAME", "pythondiscord.com:8080")
self.app.config["SERVER_NAME"] = os.environ.get("SERVER_NAME", "pythondiscord.local:8080")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You guys really hate actually setting your env vars, don't you? :P

from pysite.mixins import DBMixin


class TagsView(APIView, DBMixin):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the methods in this class be validated? We have a decorator for that.

@jerbob jerbob merged commit 5d685b2 into master Mar 6, 2018
@jerbob jerbob deleted the api_tag_improvements branch March 6, 2018 19:06
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.

4 participants