PAHdb / pyPAHdb

A Python tool to decompose astronomical PAH emission into contributing PAH subclasses.
https://www.astrochemistry.org/pahdb/
BSD 3-Clause "New" or "Revised" License
7 stars 6 forks source link

Add documentation #8

Closed mattjshannon closed 6 years ago

mattjshannon commented 6 years ago

Added the first round of documentation. I refactored writer.py slightly to better handle where/how to save the outputs. I've added an optional argument in the spectrum class (file_path) so that now the writer has access to the original file's location when passed through observation.spectrum.

Should compile fine on Travis and auto-documentation should be working, will double-check after creating PR.

I wonder if we should consider creating a branch for me to PR against, so as to not impact the master directly. Hard to say though.

codecov-io commented 6 years ago

Codecov Report

Merging #8 into master will increase coverage by 13.26%. The diff coverage is 87.5%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master       #8       +/-   ##
===========================================
+ Coverage   40.34%   53.61%   +13.26%     
===========================================
  Files          10        7        -3     
  Lines         637      360      -277     
===========================================
- Hits          257      193       -64     
+ Misses        380      167      -213
Impacted Files Coverage Δ
pypahdb/__init__.py 100% <ø> (ø) :arrow_up:
pypahdb/tests/test_spectrum.py 94.73% <100%> (ø) :arrow_up:
pypahdb/tests/test_observation.py 90.9% <100%> (+0.9%) :arrow_up:
pypahdb/spectrum.py 100% <100%> (ø) :arrow_up:
pypahdb/observation.py 56.25% <66.66%> (-1.82%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9f66f8b...cd123c4. Read the comment docs.

PAHdb commented 6 years ago

Please include the adjustments that resolve #7.

mattjshannon commented 6 years ago

Added a Mydecomposer class (within mydecomposer.py) that is a subclass of Decomposer, now with its own write_to_disk functionality. Also addressed issue #7 in this PR.

Still need improved unit test coverage and additional docstring cleanups, will make this a separate issue/PR in the future. I believe this particular is all ready to go.

mattjshannon commented 6 years ago

I think it is ready to go now. Resolves additional requests/issues we discussed, including relabeling decomposer as decomposer_base, and the new subclass taking over as decomposer. Also removed writer and split up the write_to_disk method into two submethods.