Skip to content

Commit

Permalink
Merge pull request #681 from projectmesa/revert-675-markdown
Browse files Browse the repository at this point in the history
Revert "Markdown"
  • Loading branch information
jackiekazil committed May 7, 2019
2 parents fc1735d + 2063526 commit 5e6e72c
Show file tree
Hide file tree
Showing 16 changed files with 255 additions and 450 deletions.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This folder contains the docs that build the docs for the core mesa code on read

Updating docs can be confusing. Here are the basic setups.

#### Create the rST files from ipynb files
####Create the rST files from ipynb files
1. Change to the appropriate directory (usually docs/tutorials)
* ```cd tutorials```
1. Create rST files using nbconvert
Expand All @@ -18,7 +18,7 @@ Updating docs can be confusing. Here are the basic setups.
* jupyter: `pip install jupyter`
* [pandoc](http://pandoc.org/installing.html)

##### Submit a pull request with updates
#####Submit a pull request with updates
1. Create branch (either via branching or fork of repo) -- try to use a descriptive name.
* ```git checkout -b doc-updates```
1. Update the docs. Save.
Expand All @@ -31,14 +31,14 @@ Updating docs can be confusing. Here are the basic setups.
* ```git push origin doc-updates```
1. From here you will want to submit a pull request to master.

##### Update read the docs
#####Update read the docs

From this point, you will need to find someone that has access to readthedocs. Currently, that is [@jackiekazil](https://github.com/jackiekazil) and [@dmasad](https://github.com/dmasad).

1. Accept the pull request into master.
1. Log into readthedocs and launch a new build -- builds take about 10 minutes or so.

### Helpful Sphnix tips
###Helpful Sphnix tips
* Build html from docs:
* ```make html```
* Autogenerate / update sphninx from docstrings (replace your name as the author:
Expand Down
13 changes: 0 additions & 13 deletions docs/Useful-snippets/snippets.rst

This file was deleted.

14 changes: 7 additions & 7 deletions docs/best-practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ like the built-in ``random`` library.
def cool_method(self):
interesting_number = self.random.random()
print(interesting_number)
class AwesomeAgent(Agent):
# ...
def __init__(self, unique_id, model, ...):
Expand All @@ -57,31 +57,31 @@ like the built-in ``random`` library.
def my_method(self):
random_number = self.random.randint(0, 100)
(The agent's random property is just a reference to its parent model's
``random`` property).
(The agent's random property is just a reference to its parent model's
``random`` property).

When a model object is created, its random property is automatically seeded
with the current time. The seed determines the sequence of random numbers; if
with the current time. The seed determines the sequence of random numbers; if
you instantiate a model with the same seed, you will get the same results.
To allow you to set the seed, make sure your model as a ``seed`` argument in its
constructor.

.. code:: python
class AwesomeModel(Model):
def __init__(self, seed=None):
pass
def cool_method(self):
interesting_number = self.random.random()
print(interesting_number)
>>> model0 = AwesomeModel(seed=0)
>>> model0._seed
0
>>> model0.cool_method()
0.8444218515250481
>>> model1 = AwesomeModel(seed=0)
>>> model1.cool_method()
0.8444218515250481
0.8444218515250481
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,12 @@ ABM features users have shared that you may want to use in your model

.. toctree::
:hidden:
:maxdepth: 7
:maxdepth: 6

Mesa Overview <overview>
tutorials/intro_tutorial
tutorials/adv_tutorial
Best Practices <best-practices>
Useful Snippets <useful-snippets/snippets.rst>
API Documentation <apis/api_main>
Mesa Packages <packages>

Expand All @@ -103,3 +102,4 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

77 changes: 0 additions & 77 deletions docs/mesa.rst

This file was deleted.

70 changes: 0 additions & 70 deletions docs/mesa.visualization.modules.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs/mesa.visualization.rst

This file was deleted.

Loading

0 comments on commit 5e6e72c

Please sign in to comment.