Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Apr 7, 2022
2 parents c5a2ba4 + d90e745 commit 96f399a
Show file tree
Hide file tree
Showing 13 changed files with 928 additions and 31 deletions.
15 changes: 1 addition & 14 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,6 @@ blockquote div.line {
line-height: 125%;
}

/* Adds the Agile logo in the footer. */
.related-information:before{
display: block;
width:48px;
content: url('agile-open-logo-nocircle-grey_40px.png');
float: left;
margin-top: -4px;
}

.related-information {
padding-left: 0px;
}

/* Adds the GitHub ribbon. */
#forkongithub a {
background:rgb(158, 158, 158);
Expand Down Expand Up @@ -80,4 +67,4 @@ blockquote div.line {
-o-transform:rotate(45deg);
box-shadow:4px 4px 10px rgba(0,0,0,0.4);
}
}
}
14 changes: 14 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@ def setup(app):

html_theme_options = {
"sidebar_hide_name": True,
"footer_icons": [
{
"name": "Agile",
"url": "https://code.agilescientific.com",
"html": """
<svg width="200" height="200" version="1.1" viewBox="0 0 187.5 187.5" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(3.94 -1.28 1.28 3.94 -906.1 -3676)" style="color-rendering:auto;color:#000000;fill:#14ca29;image-rendering:auto;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;stroke-width:1px;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal">
<path d="m-46.98 936.1q3.515-1.622 6.705-3.244t5.083-2.379 3.028-0.757q1.893 0 3.244 1.298 1.406 1.244 1.406 3.136 0 1.081-0.7029 2.271-0.6489 1.136-1.406 1.46-6.975 2.758-15.36 4.001 1.514 1.406 3.731 3.731t2.325 2.487q0.8111 1.136 2.271 2.812 1.46 1.676 2.001 2.65 0.5948 0.9192 0.5948 2.271 0 1.73-1.298 3.028t-3.352 1.298q-2.055 0-4.65-3.19-2.541-3.19-6.597-11.46-4.109 7.462-5.515 9.841t-2.704 3.623q-1.298 1.19-2.974 1.19-2.001 0-3.352-1.352-1.298-1.406-1.298-2.974 0-1.46 0.5407-2.217 4.975-6.759 10.38-11.73-4.542-0.7029-8.111-1.568t-7.57-2.541q-0.6489-0.3244-1.298-1.46-0.5948-1.19-0.5948-2.163 0-1.893 1.352-3.136 1.406-1.298 3.19-1.298 1.298 0 3.244 0.8111 1.947 0.757 4.921 2.271 3.028 1.46 6.867 3.298-0.7029-3.407-1.19-7.786-0.4326-4.434-0.4326-6.056 0-2.001 1.244-3.407 1.298-1.46 3.298-1.46 1.947 0 3.19 1.46 1.298 1.406 1.298 3.785 0 0.6489-0.2163 2.595-0.1622 1.893-0.5407 4.65-0.3244 2.704-0.757 6.218z" style="fill:#14ca29"/>
</g>
</svg>
""",
"class": "",
},
],
}

# The name for this set of Sphinx documents. If None, it defaults to
Expand Down
27 changes: 22 additions & 5 deletions docs/post_process_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,29 @@ def simplify_credits(html):
"""
Replace the credit part of the HTML footer. Return the new text.
"""
s = r"Created using <a href=\"https://www\.sphinx.+?Furo theme</a>."
pattern = re.compile(s, flags=re.DOTALL)
s = r'<a class="muted-link" href="https://pradyunsg\.me">@pradyunsg</a>\'s'
pattern = re.compile(s)
html = pattern.sub(r'', html)

new_s = '<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>'
new_s += ' | Created using Sphinx & Furo'
s = r'Copyright &#169; 2022, The Bruges Authors'
pattern = re.compile(s)
new_s = '&#169; 2022, The Bruges Authors | <a href="https://creativecommons.org/licenses/by/4.0/">CC BY</a>'
html = pattern.sub(new_s, html)

return html


def add_analytics(html):
"""
Add snippet to head.
"""
s = r'</head>'
pattern = re.compile(s)
new_s = '<script defer data-domain="code.agilescientific.com" src="https://plausible.io/js/plausible.js"></script></head>'
html = pattern.sub(new_s, html)

return html

return pattern.sub(new_s, html)

def main(path):
"""
Expand All @@ -26,6 +42,7 @@ def main(path):
html = f.read()

new_html = simplify_credits(html)
new_html = add_analytics(html)

f.seek(0)
f.write(new_html)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/01_Basics.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tutorial/02_Basic_objects.ipynb

Large diffs are not rendered by default.

881 changes: 880 additions & 1 deletion docs/tutorial/16_Block_logs.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion striplog/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DescriptionError(Exception):
pass


class Description(object):
class Description:
"""
Used to represent a description.
Expand Down
2 changes: 1 addition & 1 deletion striplog/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class IntervalError(Exception):


@total_ordering
class Interval(object):
class Interval:
"""
Used to represent a lithologic or stratigraphic interval, or single point,
such as a sample location.
Expand Down
4 changes: 2 additions & 2 deletions striplog/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LegendError(Exception):
pass


class Decor(object):
class Decor:
"""
A single display style. A Decor describes how to display a given set
of Component properties.
Expand Down Expand Up @@ -329,7 +329,7 @@ def plot(self, fmt=None, fig=None, ax=None):
return r


class Legend(object):
class Legend:
"""
A look-up table to assist in the conversion of Components to
a plot colour.
Expand Down
2 changes: 1 addition & 1 deletion striplog/lexicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LexiconError(Exception):
pass


class Lexicon(object):
class Lexicon:
"""
A Lexicon is a dictionary of 'types' and regex patterns.
Expand Down
2 changes: 1 addition & 1 deletion striplog/markov.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def regularize(sequence, strings_are_states=False) -> tuple:
return np.array(sorted(uniques)), seq_of_seqs


class Markov_chain(object):
class Markov_chain:
"""
Markov_chain object.
Expand Down
4 changes: 2 additions & 2 deletions striplog/position.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PositionError(Exception):
pass


class Meta(object):
class Meta:
"""
Used for metadata.
"""
Expand All @@ -25,7 +25,7 @@ def __init__(self, meta):


@total_ordering
class Position(object):
class Position:
"""
Used to represent a position: a top or base.
Expand Down
2 changes: 1 addition & 1 deletion striplog/striplog.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class StriplogError(Exception):
pass


class Striplog(object):
class Striplog:
"""
A Striplog is a sequence of intervals.
Expand Down

0 comments on commit 96f399a

Please sign in to comment.