Skip to content

Commit

Permalink
Provide mock Python modules for building docs.
Browse files Browse the repository at this point in the history
This should allow us to build the docs without needing Modeller
or the _mdt C extension.
  • Loading branch information
benmwebb committed Sep 4, 2015
1 parent 3fbfcd2 commit 45bc747
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def get_version():
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
sys.path.append(os.path.abspath('mockpy'))
sys.path.append(os.path.abspath('../pyext'))

# General configuration
Expand Down
3 changes: 3 additions & 0 deletions doc/mockpy/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This directory simply contains mock Python files for MDT dependencies
(Modeller, _mdt extension) so that the docs can 'import mdt' without having
to actually have all the dependencies present.
75 changes: 75 additions & 0 deletions doc/mockpy/_mdt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
class MDTError(object): pass
class FileFormatError(object): pass
def mdt_version_get(): return ''

MOD_MDTB_FLOAT = 0
MOD_MDTB_DOUBLE = 1
MOD_MDTB_INT32 = 2
MOD_MDTB_UINT32 = 3
MOD_MDTB_INT16 = 4
MOD_MDTB_UINT16 = 5
MOD_MDTB_INT8 = 6
MOD_MDTB_UINT8 = 7

mdt_feature_xray_resolution = 0
mdt_feature_radius_of_gyration = 0
mdt_feature_sequence_length = 0
mdt_feature_residue_type = 0
mdt_feature_residue_accessibility = 0
mdt_feature_chi1_dihedral = 0
mdt_feature_chi2_dihedral = 0
mdt_feature_chi3_dihedral = 0
mdt_feature_chi4_dihedral = 0
mdt_feature_phi_dihedral = 0
mdt_feature_psi_dihedral = 0
mdt_feature_omega_dihedral = 0
mdt_feature_alpha_dihedral = 0
mdt_feature_chi1_class = 0
mdt_feature_chi2_class = 0
mdt_feature_chi3_class = 0
mdt_feature_chi4_class = 0
mdt_feature_chi5_class = 0
mdt_feature_phi_class = 0
mdt_feature_psi_class = 0
mdt_feature_omega_class = 0
mdt_feature_mainchain_conformation = 0
mdt_feature_residue_group = 0
mdt_feature_sidechain_biso = 0
mdt_feature_residue_distance = 0
mdt_feature_average_residue_accessibility = 0
mdt_feature_residue_index_difference = 0
mdt_feature_phi_dihedral_difference = 0
mdt_feature_psi_dihedral_difference = 0
mdt_feature_omega_dihedral_difference = 0
mdt_feature_neighborhood_difference = 0
mdt_feature_gap_distance = 0
mdt_feature_residue_distance_difference = 0
mdt_feature_average_neighborhood_difference = 0
mdt_feature_average_gap_distance = 0
mdt_feature_atom_accessibility = 0
mdt_feature_z_coordinate = 0
mdt_feature_fractional_atom_accessibility = 0
mdt_feature_atom_type = 0
mdt_feature_hydrogen_bond_donor = 0
mdt_feature_hydrogen_bond_acceptor = 0
mdt_feature_hydrogen_bond_charge = 0
mdt_feature_atom_table = 0
mdt_feature_atom_distance = 0
mdt_feature_atom_bond_separation = 0
mdt_feature_hydrogen_bond_satisfaction = 0
mdt_feature_alpha_content = 0
mdt_feature_sequence_identity = 0
mdt_feature_tuple_type = 0
mdt_feature_tuple_distance = 0
mdt_feature_tuple_angle1 = 0
mdt_feature_tuple_angle2 = 0
mdt_feature_tuple_dihedral1 = 0
mdt_feature_tuple_dihedral2 = 0
mdt_feature_tuple_dihedral3 = 0
mdt_feature_bond_type = 0
mdt_feature_angle_type = 0
mdt_feature_dihedral_type = 0
mdt_feature_bond_length = 0
mdt_feature_angle = 0
mdt_feature_dihedral = 0
mdt_feature_cluster = 0
1 change: 1 addition & 0 deletions doc/mockpy/_modeller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# do nothing
1 change: 1 addition & 0 deletions doc/mockpy/modeller/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# do nothing
1 change: 1 addition & 0 deletions doc/mockpy/modeller/util/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# do nothing
1 change: 1 addition & 0 deletions doc/mockpy/modeller/util/modlist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class FixList(object): pass
2 changes: 2 additions & 0 deletions doc/mockpy/modeller/util/modobject.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class modobject(object):
pass

0 comments on commit 45bc747

Please sign in to comment.