Skip to content

Commit

Permalink
Experimenting with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Dec 1, 2021
1 parent 6b1d349 commit 1ff7e4a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/_getstarted/overview.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from pyenzyme import EnzymeMLDocument, Vessel, Protein, Reactant

# Initialize the EnzymeMLDocument clas
enzmldoc = EnzymeMLDocument(name="First example")

# Create a vessel object
vessel = Vessel(name="Falcon Tube", volume=10.0, unit="ml")
vessel_id = enzmldoc.addVessel(vessel)

# Create a protein object from the UniProt database (Alcohol Dehydrogenase)
adh = Protein(
uniprotid="P07327", vessel_id=vessel_id,
init_conc=10.0, unit="mmole / l"
)

adh_id = enzmldoc.addProtein(adh)

# Create a custom reactant object
ethanol = Reactant(
name="Ethanol", vessel_id=vessel_id,
init_conc=20.0, unit="mmole / l"
)

ethanol_id = enzmldoc.addReactant(ethanol)
29 changes: 29 additions & 0 deletions docs/_getstarted/overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Overview
========

.. code-block:: python
from pyenzyme import EnzymeMLDocument, Vessel, Protein, Reactant
# Initialize the EnzymeMLDocument clas
enzmldoc = EnzymeMLDocument(name="First example")
# Create a vessel object
vessel = Vessel(name="Falcon Tube", volume=10.0, unit="ml")
vessel_id = enzmldoc.addVessel(vessel)
# Create a protein object from the UniProt database (Alcohol Dehydrogenase)
adh = Protein(
uniprotid="P07327", vessel_id=vessel_id,
init_conc=10.0, unit="mmole / l"
)
adh_id = enzmldoc.addProtein(adh)
# Create a custom reactant object
ethanol = Reactant(
name="Ethanol", vessel_id=vessel_id,
init_conc=20.0, unit="mmole / l"
)
ethanol_id = enzmldoc.addReactant(ethanol)
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Welcome to PyEnzyme's documentation!
:caption: First Steps

_getstarted/01_Overview
_getstarted/overview.rst

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit 1ff7e4a

Please sign in to comment.