Skip to content

Commit

Permalink
Merge pull request #16 from ConorMacBride/refactor-to-base
Browse files Browse the repository at this point in the history
Refactor common attributes and methods to ModelBase. Improve documentation and testing of mcalf.models.
  • Loading branch information
ConorMacBride committed Feb 6, 2021
2 parents 73f1f6b + ec1d734 commit 0951778
Show file tree
Hide file tree
Showing 11 changed files with 1,198 additions and 619 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ __pycache__
*/cython_version.py
htmlcov
.coverage
coverage.xml
MANIFEST
.ipynb_checkpoints

Expand Down
6 changes: 3 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ python:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
- all
# Build from requirements.txt to use https://github.com/astropy/sphinx-automodapi/pull/121
# extra_requirements:
# - docs
system_packages: true
15 changes: 15 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
]
numpydoc_show_class_members = False
nbsphinx_execute = 'never'
all_methods = [
'mcalf.models.base.ModelBase',
'mcalf.models.ModelBase',
]
automodsumm_private_methods_of = all_methods
automodsumm_special_methods_of = all_methods

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -58,6 +65,14 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

intersphinx_mapping = {
"python": ('https://docs.python.org/3', None),
"astropy": ("https://docs.astropy.org/en/stable/", None),
"matplotlib": ('https://matplotlib.org/', None),
"numpy": ('https://numpy.org/doc/stable', None),
"scipy": ('https://docs.scipy.org/doc/scipy/reference', None),
"sklearn": ('https://scikit-learn.org/stable', None),
}

# -- Options for HTML output -------------------------------------------------

Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sphinx==3.1.2
sphinx-automodapi==0.12
#sphinx-automodapi==0.12
-e git+https://github.com/astropy/sphinx-automodapi.git@refs/pull/121/head#egg=sphinx-automodapi
ipykernel
nbsphinx==0.7.1
sphinx-rtd-theme==0.5.0
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ docs =
[options.packages.find]
where = src

[tool:pytest]
filterwarnings =
ignore:Spectra should be fully processed before loading into MCALF.

[coverage:run]
omit =
*/mcalf/tests/*

0 comments on commit 0951778

Please sign in to comment.