Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
9dfc2a8
Fixed github action for auto updates for docs.
BryanRumsey Feb 28, 2022
5bebe12
Check working directory.
BryanRumsey Feb 28, 2022
a662daf
Check working directory.
BryanRumsey Feb 28, 2022
c6327ac
Check working directory.
BryanRumsey Feb 28, 2022
de37836
fix working cd dest.
BryanRumsey Feb 28, 2022
7108a1c
fix working cd dest.
BryanRumsey Feb 28, 2022
91d1547
Added working directory to update docs github action.
BryanRumsey Feb 28, 2022
a0d8a0c
Fixed working directory.
BryanRumsey Feb 28, 2022
3834cbb
Fixed working directory.
BryanRumsey Feb 28, 2022
85cdf5b
Fixed working directory.
BryanRumsey Feb 28, 2022
ff3178b
Check cwd.
BryanRumsey Feb 28, 2022
7209725
Check cwd.
BryanRumsey Feb 28, 2022
40ff44a
Check cwd.
BryanRumsey Feb 28, 2022
a017a8a
Added initialize environment step.
BryanRumsey Feb 28, 2022
e6e3530
Fixed update docs action.
BryanRumsey Feb 28, 2022
f6650eb
Added git pull to publish make cammand.
BryanRumsey Feb 28, 2022
6e2b5b7
Switched 'make html' to 'make autobuild'.
BryanRumsey Feb 28, 2022
c7f7023
reverted changes from last commit.
BryanRumsey Feb 28, 2022
a59145e
Added repo branch.
BryanRumsey Feb 28, 2022
e06f339
Pulled changes from develop.
BryanRumsey Feb 28, 2022
d262ad1
removed second 'uses'.
BryanRumsey Feb 28, 2022
e2ef450
changed v2 to develop-clone.
BryanRumsey Feb 28, 2022
6bdf5eb
Added branch ref to init env.
BryanRumsey Feb 28, 2022
3986e8a
Checkout working branch.
BryanRumsey Feb 28, 2022
05443b7
Testing with ref.
BryanRumsey Feb 28, 2022
4dbc13b
Testing make autobuild.
BryanRumsey Feb 28, 2022
99eec35
Updated publish rule for docs makefile.
BryanRumsey Mar 1, 2022
e663b1b
Updated publish rule for docs makefile.
BryanRumsey Mar 1, 2022
227e8a3
Updated publish rule for docs makefile.
BryanRumsey Mar 1, 2022
496884e
Added shpinx dependency to action.
BryanRumsey Mar 1, 2022
90700c4
Added shpinx dependency to action.
BryanRumsey Mar 1, 2022
0260176
Added setup python step.
BryanRumsey Mar 1, 2022
efe3534
Added setup python step.
BryanRumsey Mar 1, 2022
32b20a9
Added additional dependencies.
BryanRumsey Mar 1, 2022
42cb13f
Added additional dependencies.
BryanRumsey Mar 1, 2022
cd33a57
Added additional dependencies.
BryanRumsey Mar 1, 2022
54d04c2
Updated version to v1.1.2
BryanRumsey Oct 5, 2022
d63af2e
Refactored the reaction constructor, add_product, and add_reactant fu…
BryanRumsey Oct 6, 2022
e8bf65c
Merge pull request #329 from StochSS/hotfix-hdma-propensities
briandrawert Oct 26, 2022
dcffc64
Merge branch 'develop', remote-tracking branch 'origin' into develop-…
BryanRumsey Nov 18, 2022
d49b889
Added github token to action.
BryanRumsey Nov 18, 2022
fb7858f
re-order with and run.
BryanRumsey Nov 18, 2022
d5b3090
Replaced run with uses.
BryanRumsey Nov 18, 2022
95071f6
replaced 'with' with 'env'.
BryanRumsey Nov 18, 2022
d2712cb
Removed publish from publish release.
BryanRumsey Nov 18, 2022
5d78a06
Added git pull to makefile.
BryanRumsey Nov 18, 2022
d0a8a7f
Moved git pull above make clean.
BryanRumsey Nov 18, 2022
6066ca2
Refactored to use github push action.
BryanRumsey Nov 18, 2022
73faedd
Changed branch for testing.
BryanRumsey Nov 18, 2022
b1f2e65
Latest docs build.
github-actions[bot] Nov 18, 2022
b8832f3
release prep.
BryanRumsey Nov 18, 2022
939de8c
Merge remote-tracking branch 'refs/remotes/origin/develop-clone' into…
BryanRumsey Nov 18, 2022
072a660
Merge pull request #226 from StochSS/develop-clone
briandrawert Dec 5, 2022
484a831
Added github action to run pylint checks on pull requests.
BryanRumsey Dec 15, 2022
34eae14
Fixed divide by zero error in spherical lattices.
BryanRumsey Dec 15, 2022
69d80b0
Fixed divide by zero error in cylindrical lattices.
BryanRumsey Dec 15, 2022
740b49e
Fixed import error. Pylint changes.
BryanRumsey Dec 15, 2022
05903d2
Fixed issue with applying remove actions.
BryanRumsey Dec 16, 2022
d8bdc8a
Added axis to fix.
BryanRumsey Dec 16, 2022
c7eaacf
Merge pull request #332 from StochSS/pylint-github-action
briandrawert Dec 22, 2022
5b91c87
Merge pull request #333 from StochSS/lattice-dividebyzero-error
seanebum Dec 22, 2022
f35fd77
Merge pull request #334 from StochSS/hotfix-remove-action
briandrawert Dec 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/pylint_on_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: PyLint On Pull Request
on: [pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Set Up Python
uses: actions/setup-python@v2
- name: Install PyLint
run: pip install --upgrade pylint
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout Head
run: git checkout $HEAD_REF
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
- name: Checkout Base
run: git checkout $BASE_REF
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
- name: Get Base Lint Score
run: |
echo BASE_LINT=$(git diff --name-only --diff-filter=M $HEAD_REF | grep -E "\.py" | xargs pylint | grep -E -o "at [0-9.-]+" | grep -E -o [0-9.-]+) >> $GITHUB_ENV
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
if: always()
- name: Set Base Lint to 0
run: echo BASE_LINT=0 >> $GITHUB_ENV
if: env.BASE_LINT == ''
- name: Checkout Head
run: git checkout $HEAD_REF
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
- name: Get Head Lint Score
run: |
echo HEAD_LINT=$(git diff --name-only --diff-filter=M $BASE_REF | grep -E "\.py" | xargs pylint | grep -E -o "at [0-9.-]+" | grep -E -o [0-9.-]+) >> $GITHUB_ENV
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
if: always()
- name: Set Head Lint to 0
run: echo HEAD_LINT=0 >> $GITHUB_ENV
if: env.HEAD_LINT == ''
- name: Get Added Files Lint Score
run: |
echo ADDED_LINT=$(git diff --name-only --diff-filter=A $BASE_REF | grep -E "\.py" | xargs pylint | grep -E -o "at [0-9.-]+" | grep -E -o [0-9.-]+) >> $GITHUB_ENV
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
if: always()
- name: Get Delta
run: |
import os
base = float(os.environ['BASE_LINT'])
head = float(os.environ['HEAD_LINT'])
delta = head - base
os.popen(f"echo DELTA={round(delta, 2)} >> $GITHUB_ENV")
shell: python
- name: Display Results
run: |
echo "Lint of modified files in base:"
echo ${{ env.BASE_LINT }}
echo "Lint of modified files in head:"
echo ${{ env.HEAD_LINT }}
echo "Delta (+/-):"
echo ${{ env.DELTA }}
echo "Lint of files added by head:"
echo ${{ env.ADDED_LINT }}
if: always()
- name: Fail If Negative Delta
run: |
import os
if float(os.environ['HEAD_LINT']) < 9 and float(os.environ['DELTA']) < 0:
raise Exception("Head lint score < 9 and negative delta.")
shell: python
46 changes: 46 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish SpatialPy Docs

on:
push:
branches: [main]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Initialize environment
uses: actions/checkout@v2
with:
ref: main
fetch-depth: 0

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.7'

- name: Install Sphinx Dependency
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -U sphinx
python3 -m pip install numpy
python3 -m pip install -r requirements.txt

- name: Update the Docs
working-directory: docs
run: |
make build-docs

- name: Commit Changes
working-directory: docs
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
make commit-docs

- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
27 changes: 18 additions & 9 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,34 @@ autobuild: $(FORMAT)
clean:
rm -rf "$(BUILDDIR)"

publish:
build-docs:
git pull
make clean
git stash
git checkout gh-pages
git checkout main
make html

commit-docs:
-git add -f "$(BUILDDIR)"
-git commit -m "Latest build." "$(BUILDDIR)"
git push origin gh-pages -f
make clean
git checkout @{-1}
git stash pop
-git commit -m "Latest docs build." "$(BUILDDIR)"

publish-release: publish
publish:
make clean
git stash
git checkout main
git pull
git checkout staging
make html
-git add -f "$(BUILDDIR)"
-git commit -m "Latest docs build." "$(BUILDDIR)"
git push origin staging -f
make clean
git checkout gh-pages
git pull origin staging
git push origin gh-pages -f
git checkout @{-2}
git stash pop

publish-release: build-docs commit-docs
git push origin main -f
make clean
git checkout @{-1}
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8b8c7260a070827b00291bef99cea017
config: aa9a9a3c9380df45ffa4c7a40b7ba182
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/build/html/.doctrees/classes/spatialpy.core.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/spatialpy.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/spatialpy.solvers.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/spatialpy.stochss.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/html/.doctrees/index.doctree
Binary file not shown.
8 changes: 5 additions & 3 deletions docs/build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; SpatialPy 1.1.0 documentation</title>
<title>Overview: module code &#8212; SpatialPy 1.1.2 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css" />
<link rel="stylesheet" type="text/css" href="../_static/css/spatialpy_alabaster_customizations.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />

Expand Down Expand Up @@ -71,7 +73,7 @@ <h3 id="searchlabel">Quick search</h3>
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<script>document.getElementById('searchbox').style.display = "block"</script>



Expand Down Expand Up @@ -128,7 +130,7 @@ <h1>All modules for which code is available</h1>
&copy;Copyright (C) 2019-2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.4.0</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.3.0</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>
Expand Down
134 changes: 134 additions & 0 deletions docs/build/html/_static/_sphinx_javascript_frameworks_compat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
*
*/

/**
* select a different prefix for underscore
*/
$u = _.noConflict();


/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};

/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;

/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};

/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};

/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();

var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];

return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
Loading