From ba3cba5c39239e0b17b20c18392b8eee2094e411 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Thu, 27 Jul 2023 09:27:31 -0500 Subject: [PATCH 01/33] avoiding deprecated functions --- phylesystem_api/phylesystem_api/views/default.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phylesystem_api/phylesystem_api/views/default.py b/phylesystem_api/phylesystem_api/views/default.py index 08a5576b..b3445dfe 100644 --- a/phylesystem_api/phylesystem_api/views/default.py +++ b/phylesystem_api/phylesystem_api/views/default.py @@ -204,7 +204,7 @@ def clear_cache_keys(request): """ api_utils.raise_on_CORS_preflight(request) key_pattern = request.matchdict.get("key_pattern") - _LOG.warn(">> key_pattern: {}".format(key_pattern)) + _LOG.warning(">> key_pattern: {}".format(key_pattern)) """ # TODO: decode this from URL-encoding?? @@ -465,7 +465,7 @@ def _get_synth_input_collection_ids(): ) cfg = ConfigParser() try: - cfg.readfp(conf_fo) + cfg.read_file(conf_fo) except: raise HTTPInternalServerError( body="Could not parse file from {}".format(url_of_synth_config) @@ -528,7 +528,7 @@ def merge_docstore_changes(request): m = traceback.format_exc() raise HTTPConflict( detail=json.dumps( - {"error": 1, "description": "Could not merge! Details: %s" % (m)} + {"error": 1, "description": "Could not merge! Details: {}".format(m)} ) ) From e69eb7b6dbfd229844307d3a82368c20c945d7fe Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Thu, 27 Jul 2023 09:28:11 -0500 Subject: [PATCH 02/33] avoiding deprecated logging.warn function --- .../phylesystem_api/views/study.py | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/phylesystem_api/phylesystem_api/views/study.py b/phylesystem_api/phylesystem_api/views/study.py index 9d039bfc..10c8df20 100644 --- a/phylesystem_api/phylesystem_api/views/study.py +++ b/phylesystem_api/phylesystem_api/views/study.py @@ -685,15 +685,15 @@ def update_study(request): @view_config(route_name="delete_study", renderer="json") def delete_study(request): # _LOG = api_utils.get_logger(request, 'delete_study') - _LOG.warn("delete_study STARTING...") + _LOG.warninging("delete_study STARTING...") api_version = request.matchdict["api_version"] study_id = request.matchdict["study_id"] - _LOG.warn("api_version={}".format(api_version)) - _LOG.warn("study_id={}".format(study_id)) + _LOG.warning("api_version={}".format(api_version)) + _LOG.warning("study_id={}".format(study_id)) # this method requires authentication auth_info = api_utils.authenticate(request) - _LOG.warn("auth_info={}".format(auth_info)) + _LOG.warning("auth_info={}".format(auth_info)) # gather any user-provided git-commit message try: @@ -703,39 +703,39 @@ def delete_study(request): commit_msg = None except: commit_msg = None - _LOG.warn("commit_msg={}".format(commit_msg)) + _LOG.warning("commit_msg={}".format(commit_msg)) parent_sha = find_in_request(request, "starting_commit_SHA", None) - _LOG.warn("parent_sha={}".format(parent_sha)) + _LOG.warning("parent_sha={}".format(parent_sha)) phylesystem = api_utils.get_phylesystem( request ) # set READONLY flag before testing! api_utils.raise_if_read_only() - _LOG.warn("passed the read-only test") + _LOG.warning("passed the read-only test") - _LOG.warn("trying to delete now... via:") - _LOG.warn(phylesystem.delete_study) + _LOG.warning("trying to delete now... via:") + _LOG.warning(phylesystem.delete_study) try: x = phylesystem.delete_study( study_id, auth_info, parent_sha, commit_msg=commit_msg ) - _LOG.warn("initial return x:") - _LOG.warn(x) + _LOG.warning("initial return x:") + _LOG.warning(x) if x.get("error") == 0: - _LOG.warn("calling deferred push...") + _LOG.warning("calling deferred push...") api_utils.deferred_push_to_gh_call( request, None, doc_type="nexson", auth_token=auth_info["auth_token"] ) - _LOG.warn("back from deferred push") + _LOG.warning("back from deferred push") return x except GitWorkflowError as err: - _LOG.warn("got a GitWorkflowError:") - _LOG.warn(err) + _LOG.warning("got a GitWorkflowError:") + _LOG.warning(err) raise HTTPBadRequest(err.msg) except Exception as err: - _LOG.warn("some other kind of error") - _LOG.warn(err) + _LOG.warning("some other kind of error") + _LOG.warning(err) # _LOG.exception('Exception getting nexson content in phylesystem.delete_study') raise HTTPBadRequest( json.dumps({"error": 1, "description": "Unknown error in study deletion"}) From 80fac7c9555642058a861f929fdfb65798bd21f1 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Thu, 27 Jul 2023 09:30:03 -0500 Subject: [PATCH 03/33] removed unused and poorly-coded function --- phylesystem_api/phylesystem_api/gitdata.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/phylesystem_api/phylesystem_api/gitdata.py b/phylesystem_api/phylesystem_api/gitdata.py index e107561d..8e2c9d1c 100644 --- a/phylesystem_api/phylesystem_api/gitdata.py +++ b/phylesystem_api/phylesystem_api/gitdata.py @@ -7,12 +7,6 @@ class GitData(PhylesystemGitAction): def __init__(self, repo, **kwargs): PhylesystemGitAction.__init__(self, repo, **kwargs) - def delete_remote_branch(self, remote, branch, env={}): - "Delete a remote branch" - # deleting a branch is the same as - # git push remote :branch - self.push(remote, env, ":%s" % branch) - def pull(self, remote, env={}, branch=None): """ Pull a branch from a given remote From 4d4085780924dbe8a0bfa1c564949f89156a5516 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Thu, 27 Jul 2023 14:07:22 -0500 Subject: [PATCH 04/33] non functional test --- phylesystem_api/tests/test_views.py | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 phylesystem_api/tests/test_views.py diff --git a/phylesystem_api/tests/test_views.py b/phylesystem_api/tests/test_views.py deleted file mode 100644 index 8e9e701f..00000000 --- a/phylesystem_api/tests/test_views.py +++ /dev/null @@ -1,14 +0,0 @@ -from phylesystem_api.views.default import my_view -from phylesystem_api.views.notfound import notfound_view - - -def test_my_view(app_request): - info = my_view(app_request) - assert app_request.response.status_int == 200 - assert info["project"] == "phylesystem API" - - -def test_notfound_view(app_request): - info = notfound_view(app_request) - assert app_request.response.status_int == 404 - assert info == {} From 41f33be1ee6ed222e60727382fb5c45530fb347e Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Thu, 27 Jul 2023 15:17:20 -0500 Subject: [PATCH 05/33] refactoring based on pycharm warnings --- phylesystem_api/phylesystem_api/api_utils.py | 7 +- phylesystem_api/phylesystem_api/cors.py | 1 - phylesystem_api/phylesystem_api/gitdata.py | 6 +- .../phylesystem_api/static/theme.css | 447 +++++++++--------- .../phylesystem_api/templates/404.jinja2 | 8 +- .../phylesystem_api/templates/home.jinja2 | 31 +- .../phylesystem_api/templates/layout.jinja2 | 133 +++--- .../phylesystem_api/views/amendment.py | 34 +- .../phylesystem_api/views/amendments.py | 18 +- .../phylesystem_api/views/collection.py | 39 +- .../phylesystem_api/views/collections.py | 14 - .../phylesystem_api/views/default.py | 23 +- .../phylesystem_api/views/notfound.py | 17 +- .../phylesystem_api/views/studies.py | 28 +- .../phylesystem_api/views/study.py | 184 +++---- phylesystem_api/tests/conftest.py | 1 - phylesystem_api/tests/test_gitdata.py | 225 --------- 17 files changed, 443 insertions(+), 773 deletions(-) delete mode 100644 phylesystem_api/tests/test_gitdata.py diff --git a/phylesystem_api/phylesystem_api/api_utils.py b/phylesystem_api/phylesystem_api/api_utils.py index 9a37c42e..f984f87a 100644 --- a/phylesystem_api/phylesystem_api/api_utils.py +++ b/phylesystem_api/phylesystem_api/api_utils.py @@ -6,6 +6,7 @@ from peyotl.utility import read_config as read_peyotl_config from configparser import ConfigParser from datetime import datetime +from peyotl.api import OTI # see exception subclasses at https://docs.pylonsproject.org/projects/pyramid/en/latest/api/httpexceptions.html from pyramid.request import Request @@ -859,7 +860,7 @@ def remove_tags(markup): except (UnicodeDecodeError, AttributeError): pass try: - markup = u"".join(ElementTree.fromstring(markup).itertext()) + markup = "".join(ElementTree.fromstring(markup).itertext()) except ElementTree.ParseError: # if it won't parse (badly-formed XML/HTML, or plaintext), return unchanged pass @@ -893,3 +894,7 @@ def extract_json_from_http_call(request, data_field_name="data", request_params= ) ) return json_obj + + +def get_oti_wrapper(request): + return OTI(oti=get_oti_domain(request)) diff --git a/phylesystem_api/phylesystem_api/cors.py b/phylesystem_api/phylesystem_api/cors.py index 7c30e52a..651aada6 100644 --- a/phylesystem_api/phylesystem_api/cors.py +++ b/phylesystem_api/phylesystem_api/cors.py @@ -4,7 +4,6 @@ def includeme(config): config.add_directive("add_cors_preflight_handler", add_cors_preflight_handler) config.add_route_predicate("cors_preflight", CorsPreflightPredicate) - config.add_subscriber(add_cors_to_response, "pyramid.events.NewResponse") diff --git a/phylesystem_api/phylesystem_api/gitdata.py b/phylesystem_api/phylesystem_api/gitdata.py index 8e2c9d1c..87dbbc28 100644 --- a/phylesystem_api/phylesystem_api/gitdata.py +++ b/phylesystem_api/phylesystem_api/gitdata.py @@ -7,7 +7,7 @@ class GitData(PhylesystemGitAction): def __init__(self, repo, **kwargs): PhylesystemGitAction.__init__(self, repo, **kwargs) - def pull(self, remote, env={}, branch=None): + def pull(self, remote, env=None, branch=None): """ Pull a branch from a given remote @@ -23,11 +23,11 @@ def pull(self, remote, env={}, branch=None): branch_to_pull = branch else: branch_to_pull = self.current_branch() - + env = {} if env is None else env # if there is no PKEY, we don't need to override env # We are explicit about what we are pushing, since the default behavior # is different in different versions of Git and/or by configuration - if env["PKEY"]: + if "PKEY" in env: new_env = os.environ.copy() new_env.update(env) git( diff --git a/phylesystem_api/phylesystem_api/static/theme.css b/phylesystem_api/phylesystem_api/static/theme.css index 8ad40b7a..f60c0857 100644 --- a/phylesystem_api/phylesystem_api/static/theme.css +++ b/phylesystem_api/phylesystem_api/static/theme.css @@ -13,601 +13,614 @@ /* SYNTAX HIGHLIGHTING */ /***********************/ .highlight { - background-color: #222; - padding: 5px 10px; - margin: 20px 0; + background-color: #222; + padding: 5px 10px; + margin: 20px 0; } .highlight pre { - /* overflow: scroll; Prefer no word wrap? Uncomment this line and comment out the 2 lines below. */ - word-break: break-all; - word-wrap: break-word; + /* overflow: scroll; Prefer no word wrap? Uncomment this line and comment out the 2 lines below. */ + word-break: break-all; + word-wrap: break-word; } code { - font-family: 'Courier', monospace; - font-size: 14px; - color: #999; + font-family: 'Courier', monospace; + font-size: 14px; + color: #999; } /* Comment */ .highlight .c, .highlight .c1 { - color: #586E75; + color: #586E75; } /* Error */ .highlight .err { - color: #93A1A1; + color: #93A1A1; } /* Generic */ .highlight .g { - color: #93A1A1; + color: #93A1A1; } /* Keyword */ .highlight .k { - color: #859900; + color: #859900; } /* Literal */ .highlight .l { - color: #93A1A1; + color: #93A1A1; } /* Name */ .highlight .n { - color: #93A1A1; + color: #93A1A1; } /* Operator */ .highlight .o { - color: #859900; + color: #859900; } /* Other */ .highlight .x { - color: #CB4B16; + color: #CB4B16; } /* Punctuation */ .highlight .p { - color: #93A1A1; + color: #93A1A1; } /* Comment.Multiline */ .highlight .cm { - color: #586E75; + color: #586E75; } /* Comment.Preproc */ .highlight .cp { - color: #859900; + color: #859900; } /* Comment.Single */ .highlight .c1 { - color: #586E75; + color: #586E75; } /* Comment.Special */ .highlight .cs { - color: #859900; + color: #859900; } /* Generic.Deleted */ .highlight .gd { - color: #2AA198; + color: #2AA198; } /* Generic.Emph */ .highlight .ge { - color: #93A1A1; - font-style: italic; + color: #93A1A1; + font-style: italic; } /* Generic.Error */ .highlight .gr { - color: #DC322F; + color: #DC322F; } /* Generic.Heading */ .highlight .gh { - color: #CB4B16; + color: #CB4B16; } /* Generic.Inserted */ .highlight .gi { - color: #859900; + color: #859900; } /* Generic.Output */ .highlight .go { - color: #93A1A1; + color: #93A1A1; } /* Generic.Prompt */ .highlight .gp { - color: #93A1A1; + color: #93A1A1; } /* Generic.Strong */ .highlight .gs { - color: #93A1A1; - font-weight: bold; + color: #93A1A1; + font-weight: bold; } /* Generic.Subheading */ .highlight .gu { - color: #CB4B16; + color: #CB4B16; } /* Generic.Traceback */ .highlight .gt { - color: #93A1A1; + color: #93A1A1; } /* Keyword.Constant */ .highlight .kc { - color: #CB4B16; + color: #CB4B16; } /* Keyword.Declaration */ .highlight .kd { - color: #268BD2; + color: #268BD2; } /* Keyword.Namespace */ .highlight .kn { - color: #859900; + color: #859900; } /* Keyword.Pseudo */ .highlight .kp { - color: #859900; + color: #859900; } /* Keyword.Reserved */ .highlight .kr { - color: #268BD2; + color: #268BD2; } /* Keyword.Type */ .highlight .kt { - color: #DC322F; + color: #DC322F; } /* Literal.Date */ .highlight .ld { - color: #93A1A1; + color: #93A1A1; } /* Literal.Number */ .highlight .m { - color: #2AA198; + color: #2AA198; } /* Literal.String */ .highlight .s { - color: #2AA198; + color: #2AA198; } /* Name.Attribute */ .highlight .na { - color: #93A1A1; + color: #93A1A1; } /* Name.Builtin */ .highlight .nb { - color: #B58900; + color: #B58900; } /* Name.Class */ .highlight .nc { - color: #268BD2; + color: #268BD2; } /* Name.Constant */ .highlight .no { - color: #CB4B16; + color: #CB4B16; } /* Name.Decorator */ .highlight .nd { - color: #268BD2; + color: #268BD2; } /* Name.Entity */ .highlight .ni { - color: #CB4B16; + color: #CB4B16; } /* Name.Exception */ .highlight .ne { - color: #CB4B16; + color: #CB4B16; } /* Name.Function */ .highlight .nf { - color: #268BD2; + color: #268BD2; } /* Name.Label */ .highlight .nl { - color: #93A1A1; + color: #93A1A1; } /* Name.Namespace */ .highlight .nn { - color: #93A1A1; + color: #93A1A1; } /* Name.Other */ .highlight .nx { - color: #555; + color: #555; } /* Name.Property */ .highlight .py { - color: #93A1A1; + color: #93A1A1; } /* Name.Tag */ .highlight .nt { - color: #268BD2; + color: #268BD2; } /* Name.Variable */ .highlight .nv { - color: #268BD2; + color: #268BD2; } /* Operator.Word */ .highlight .ow { - color: #859900; + color: #859900; } /* Text.Whitespace */ .highlight .w { - color: #93A1A1; + color: #93A1A1; } /* Literal.Number.Float */ .highlight .mf { - color: #2AA198; + color: #2AA198; } /* Literal.Number.Hex */ .highlight .mh { - color: #2AA198; + color: #2AA198; } /* Literal.Number.Integer */ .highlight .mi { - color: #2AA198; + color: #2AA198; } /* Literal.Number.Oct */ .highlight .mo { - color: #2AA198; + color: #2AA198; } /* Literal.String.Backtick */ .highlight .sb { - color: #586E75; + color: #586E75; } /* Literal.String.Char */ .highlight .sc { - color: #2AA198; + color: #2AA198; } /* Literal.String.Doc */ .highlight .sd { - color: #93A1A1; + color: #93A1A1; } /* Literal.String.Double */ .highlight .s2 { - color: #2AA198; + color: #2AA198; } /* Literal.String.Escape */ .highlight .se { - color: #CB4B16; + color: #CB4B16; } /* Literal.String.Heredoc */ .highlight .sh { - color: #93A1A1; + color: #93A1A1; } /* Literal.String.Interpol */ .highlight .si { - color: #2AA198; + color: #2AA198; } /* Literal.String.Other */ .highlight .sx { - color: #2AA198; + color: #2AA198; } /* Literal.String.Regex */ .highlight .sr { - color: #DC322F; + color: #DC322F; } /* Literal.String.Single */ .highlight .s1 { - color: #2AA198; + color: #2AA198; } /* Literal.String.Symbol */ .highlight .ss { - color: #2AA198; + color: #2AA198; } /* Name.Builtin.Pseudo */ .highlight .bp { - color: #268BD2; + color: #268BD2; } /* Name.Variable.Class */ .highlight .vc { - color: #268BD2; + color: #268BD2; } /* Name.Variable.Global */ .highlight .vg { - color: #268BD2; + color: #268BD2; } /* Name.Variable.Instance */ .highlight .vi { - color: #268BD2; + color: #268BD2; } /* Literal.Number.Integer.Long */ .highlight .il { - color: #2AA198; + color: #2AA198; } html { - padding: auto; - background-color: #f3f3f3; + padding: auto; + background-color: #f3f3f3; } body { - /* margin: 0; */ - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 20px; - color: #333333; - background-color: #ffffff; - margin: 0 auto; - padding: 1em 20px; - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; - overflow-y: scroll; - /* for consistent page width */ + /* margin: 0; */ + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; + margin: 0 auto; + padding: 1em 20px; + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; + overflow-y: scroll; + /* for consistent page width */ } /* responsive page width (but not too wide) */ @media (min-width: 768px) { - body { - width: 724px; - } + body { + width: 724px; + } } + @media (max-width: 767px) { - body { - width: auto; - } + body { + width: auto; + } } + h1 { - color: #666; - height: 32px; - margin-bottom: 0px; + color: #666; + height: 32px; + margin-bottom: 0px; } .maintenance-notice { - margin: 30px 40px 20px; - color: #900; - font-size: 170%; - font-weight: bold; - line-height: normal; + margin: 30px 40px 20px; + color: #900; + font-size: 170%; + font-weight: bold; + line-height: normal; } .maintenance-details { - margin: 0px 40px; - font-size: 130%; - line-height: 1.4em; + margin: 0px 40px; + font-size: 130%; + line-height: 1.4em; } .wrapper-masthead { - overflow: hidden; - /* prevent collapse */ + overflow: hidden; + /* prevent collapse */ } .masthead { - overflow: hidden; - /* prevent collapse */ - border-bottom: 1px solid #f3f3f3; + overflow: hidden; + /* prevent collapse */ + border-bottom: 1px solid #f3f3f3; } + @media screen and (max-width: 640px) { - .masthead { - text-align: center; - } + .masthead { + text-align: center; + } } .site-avatar { - float: left; - width: 70px; - height: 70px; - margin-right: 15px; + float: left; + width: 70px; + height: 70px; + margin-right: 15px; } + @media screen and (max-width: 640px) { - .site-avatar { - float: none; - display: block; - margin: 0 auto; - } + .site-avatar { + float: none; + display: block; + margin: 0 auto; + } } + .site-avatar img { - border-radius: 5px; + border-radius: 5px; } .site-info { - float: left; - padding-bottom: 4px; + float: left; + padding-bottom: 4px; } + @media screen and (max-width: 640px) { - .site-info { - float: none; - display: block; - margin: 0 auto; - } + .site-info { + float: none; + display: block; + margin: 0 auto; + } } .site-name { - background: url(/static/mini-opentree-logo.png) no-repeat center left; - padding: 12px 0 0 28px; - height: 32px; - margin: 0; + background: url(/static/mini-opentree-logo.png) no-repeat center left; + padding: 12px 0 0 28px; + height: 32px; + margin: 0; } .site-name a { - color: #666; - cursor: pointer; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 300; - font-size: 28px; - letter-spacing: 1px; - text-decoration: none; + color: #666; + cursor: pointer; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + font-size: 28px; + letter-spacing: 1px; + text-decoration: none; } .site-description { - margin: -5px 0 0 0; - color: #666; - font-size: 16px; + margin: -5px 0 0 0; + color: #666; + font-size: 16px; } + @media screen and (max-width: 640px) { - .site-description { - margin: 3px 0; - } + .site-description { + margin: 3px 0; + } } .masthead { - position: relative; - /* support positioning within this */ + position: relative; + /* support positioning within this */ } nav { - display: inline-block; - position: absolute; - right: 0px; - bottom: 0px; - border-top: 1px solid #f3f3f3; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 18px; + display: inline-block; + position: absolute; + right: 0px; + bottom: 0px; + border-top: 1px solid #f3f3f3; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 18px; } + @media screen and (max-width: 640px) { - nav { - float: none; - margin-top: 9px; - display: block; - font-size: 16px; - } + nav { + float: none; + margin-top: 9px; + display: block; + font-size: 16px; + } } + nav a { - margin-left: 20px; - color: #333; - text-align: right; - font-weight: 300; - letter-spacing: 1px; - text-decoration: none; - cursor: pointer; + margin-left: 20px; + color: #333; + text-align: right; + font-weight: 300; + letter-spacing: 1px; + text-decoration: none; + cursor: pointer; } + nav a:hover, nav a:active { - color: #4183C4; + color: #4183C4; } + @media screen and (max-width: 640px) { - nav a { - margin: 0 10px; - color: #4183C4; - } + nav a { + margin: 0 10px; + color: #4183C4; + } } .boxlink { - display: block; - overflow: hidden; - /* to prevent collapse */ - text-decoration: none; - color: black; + display: block; + overflow: hidden; + /* to prevent collapse */ + text-decoration: none; + color: black; } .container { - clear: both; + clear: both; } .boxcontainer { - margin-top: 30px; - margin-bottom: 30px; - border: 1px solid #ddd; - border-radius: 5px; - padding: 0.7em 0.5em; - clear: both; + margin-top: 30px; + margin-bottom: 30px; + border: 1px solid #ddd; + border-radius: 5px; + padding: 0.7em 0.5em; + clear: both; } .boxcontainer:hover { - background-color: #eef; - color: green; - border: 1px solid #559; + background-color: #eef; + color: green; + border: 1px solid #559; } .boxcontainer .featured-image { - float: left; - margin-right: 1em; - border-radius: 5px; - width: 50%; + float: left; + margin-right: 1em; + border-radius: 5px; + width: 50%; } .boxcontainer p { - margin: 0; + margin: 0; } .posts > .post { - padding-bottom: 2em; - border-bottom: 1px solid #f3f3f3; + padding-bottom: 2em; + border-bottom: 1px solid #f3f3f3; } .posts > .post:last-child { - padding-bottom: 1em; - border-bottom: none; + padding-bottom: 1em; + border-bottom: none; } .post blockquote { - margin: 1.8em .8em; - border-left: 2px solid #666; - padding: 0.1em 1em; - color: #666; - font-size: 22px; - font-style: italic; + margin: 1.8em .8em; + border-left: 2px solid #666; + padding: 0.1em 1em; + color: #666; + font-size: 22px; + font-style: italic; } + .post .comments { - margin-top: 10px; + margin-top: 10px; } + .post .read-more { - text-transform: uppercase; - font-size: 15px; + text-transform: uppercase; + font-size: 15px; } .wrapper-footer { - margin: 50px -21px -15px; - border-top: 1px solid #ddd; - background-color: #f3f3f3; + margin: 50px -21px -15px; + border-top: 1px solid #ddd; + background-color: #f3f3f3; } footer { - padding: 20px 0; - text-align: center; + padding: 20px 0; + text-align: center; } diff --git a/phylesystem_api/phylesystem_api/templates/404.jinja2 b/phylesystem_api/phylesystem_api/templates/404.jinja2 index aaf12413..3e8b23e9 100644 --- a/phylesystem_api/phylesystem_api/templates/404.jinja2 +++ b/phylesystem_api/phylesystem_api/templates/404.jinja2 @@ -1,8 +1,8 @@ {% extends "layout.jinja2" %} {% block content %} -
-

Pyramid Starter project

-

404 Page Not Found

-
+
+

Pyramid Starter project

+

404 Page Not Found

+
{% endblock content %} diff --git a/phylesystem_api/phylesystem_api/templates/home.jinja2 b/phylesystem_api/phylesystem_api/templates/home.jinja2 index 1a1fc28f..387148f6 100644 --- a/phylesystem_api/phylesystem_api/templates/home.jinja2 +++ b/phylesystem_api/phylesystem_api/templates/home.jinja2 @@ -1,19 +1,20 @@ {% extends "layout.jinja2" %} {% block content %} -

phylesystem API

-

- Welcome to the phylesystem API server! This API is used to explore and modify - studies and trees in the - phylesystem repository on - GitHub, as well as smaller documents like tree collections and - taxonomic annotations. -

-

- The phylesystem API is - documented here, - with helpful examples. There's also - a more complete reference to all OpenTree APIs beyond the phylesystem. -

+

phylesystem API

+

+ Welcome to the phylesystem API server! This API is used to explore and modify + studies and trees in the + phylesystem repository on + GitHub, as well as smaller documents like tree collections and + taxonomic annotations. +

+

+ The phylesystem API is + documented here, + with helpful examples. There's also + a more + complete reference to all OpenTree APIs beyond the phylesystem. +

{% endblock content %} diff --git a/phylesystem_api/phylesystem_api/templates/layout.jinja2 b/phylesystem_api/phylesystem_api/templates/layout.jinja2 index 308b2fc6..2a3fc24c 100644 --- a/phylesystem_api/phylesystem_api/templates/layout.jinja2 +++ b/phylesystem_api/phylesystem_api/templates/layout.jinja2 @@ -1,90 +1,103 @@ - - + + Open Tree of Life – {{ title }} - + - + - + - -
-
+ +
+
+
-
-
+
+
-
- {% block content %} - No content! - {% endblock content %} -
+
+ {% block content %} + No content! + {% endblock content %} +
-
-
+
+
-