Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changelog and other minor documentation changes #16

Merged
merged 2 commits into from
Oct 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


#### For reviewers
<!-- Don't remove the checklist below. -->
- [ ] New features, API changes, and deprecations are mentioned in the unreleased
section in `CHANGELOG.rst`.
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
=========
Changelog
=========

Morphops implements common operations and algorithms for Geometric
Morphometrics, in Python 3.

All notable changes to this project will be documented in this file. The format is based
on `Keep a Changelog <https://keepachangelog.com/en/1.1.0>`_.

Contributors to each release are listed in alphabetical order by first name. List
entries are sorted in descending chronological order.

Unreleased
==========

Added
-----
- This project now keeps a changelog.
29 changes: 20 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
.. image:: https://travis-ci.com/vaipatel/morphops.svg?branch=master
:target: https://travis-ci.com/vaipatel/morphops

Welcome to Morphops!
====================

Morphops implements common operations and algorithms for Geometric
Morphometrics, in Python 3.

.. GitHub Actions
.. image:: https://github.com/vaipatel/morphops/actions/workflows/build.yml/badge.svg
:target: https://github.com/vaipatel/morphops/actions/workflows/build.yml
:alt: Build status

.. Read the Docs
.. image:: https://readthedocs.org/projects/morphops/badge/?version=latest
:target: https://morphops.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. PyPI version
.. image:: https://img.shields.io/pypi/v/morphops
:target: https://pypi.org/project/morphops
:alt: PyPI version

Features
========

Some high-level operations in the current version are

* Centering, rescaling data: \
* Rigid Rotation, Ordinary and Generalized Procrustes alignment: \
* Thin-plate spline warping: \
* Reading from and writing to \*.dta files: \
* Centering, rescaling data:
* Rigid Rotation, Ordinary and Generalized Procrustes alignment:
* Thin-plate spline warping:
* Reading from and writing to \*.dta files:

Dependencies
------------
Expand Down Expand Up @@ -106,5 +118,4 @@ they can now be submitted to various commonly used statistical procedures like
Principal Components Analysis and various kinds of regression for further
analysis.


**(This file was autogenerated from README_for_docs.rst by running `make README_for_gh html` in the docs directory)**
**(This file was autogenerated from README_for_docs.rst by running `make README_for_gh` in the docs directory)**
35 changes: 19 additions & 16 deletions README_for_docs.rst
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
.. GitHub Actions
.. image:: https://github.com/hakonanes/morphops/workflows/build/badge.svg
:target: https://github.com/hakonanes/morphops/actions
:alt: Build status

|

.. contents::
:local:

|

Welcome to Morphops!
====================

Morphops implements common operations and algorithms for Geometric
Morphometrics, in Python 3.

.. GitHub Actions
.. image:: https://github.com/vaipatel/morphops/actions/workflows/build.yml/badge.svg
:target: https://github.com/vaipatel/morphops/actions/workflows/build.yml
:alt: Build status

.. Read the Docs
.. image:: https://readthedocs.org/projects/morphops/badge/?version=latest
:target: https://morphops.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. PyPI version
.. image:: https://img.shields.io/pypi/v/morphops
:target: https://pypi.org/project/morphops
:alt: PyPI version

Features
========

Some high-level operations in the current version are

* Centering, rescaling data: \
* Centering, rescaling data:
:meth:`remove_position(lmk_sets) <morphops.procrustes.remove_position>`,
:meth:`remove_scale(lmk_sets) <morphops.procrustes.remove_scale>`
* Rigid Rotation, Ordinary and Generalized Procrustes alignment: \
* Rigid Rotation, Ordinary and Generalized Procrustes alignment:
:meth:`rotate(src_sets,tar_sets) <morphops.procrustes.rotate>`,
:meth:`opa(src_set,tar_set) <morphops.procrustes.opa>`,
:meth:`gpa(all_sets) <morphops.procrustes.gpa>`
* Thin-plate spline warping: \
* Thin-plate spline warping:
:meth:`tps_warp(X, Y, pts) <morphops.tps.tps_warp>`
* Reading from and writing to \*.dta files: \
* Reading from and writing to \*.dta files:
:meth:`read_dta(fn) <morphops.io.read_dta>`,
:meth:`write_dta(fn,lmk_sets,names) <morphops.io.write_dta>`

Expand Down
3 changes: 1 addition & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ help:
README_for_gh:
@echo "Building docs for GitHub"
@cp ../README_for_docs.rst ../$(README_FOR_GH)
sed -i '' -e '4,10d' ../$(README_FOR_GH)
echo "\n**(This file was autogenerated from README_for_docs.rst by running \`make README_for_gh\` in the docs directory)**" >> ../$(README_FOR_GH)
sed -i '' -e '/^ :meth:/ d' ../$(README_FOR_GH)
echo "\n\n**(This file was autogenerated from README_for_docs.rst by running \`make README_for_gh html\` in the docs directory)**" >> ../$(README_FOR_GH)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
2 changes: 2 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. This is a stub, see the top level CHANGELOG.rst file for the changelog.
.. include:: ../../CHANGELOG.rst
12 changes: 8 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from datetime import datetime
import os
import sys

from morphops._version import __version__ as full_version


sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('../../morphops'))
sys.setrecursionlimit(1500)

# -- Project information -----------------------------------------------------

project = 'Morphops'
copyright = '2018-2020, Vaibhav Patel'
copyright = f"2018-{datetime.now().year}, Vaibhav Patel"
author = 'Vaibhav Patel'

# The short X.Y version
version = '0.1'
# The full version, including alpha/beta/rc tags
release = '0.1.11'
release = full_version

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -105,7 +109,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -207,4 +211,4 @@
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None)
}
}
5 changes: 5 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ morphops module
.. Members
.. =======

.. toctree::
:hidden:

changelog.rst

Indices and tables
==================

Expand Down
6 changes: 3 additions & 3 deletions morphops/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MopsFileWriteError(Exception):


def read_dta(filename):
r"""Reads *.dta files, as written by the IDAV Landmark Editor.
r"""Reads \*.dta files, as written by the IDAV Landmark Editor.

dta files typically have the following structure.

Expand Down Expand Up @@ -92,11 +92,11 @@ def read_dta(filename):


def write_dta(filename, lmk_sets, names=[]):
r"""Writes *.dta files, as written by the IDAV Landmark Editor.
r"""Writes \*.dta files, as written by the IDAV Landmark Editor.

See also
--------
read_dta: For an explanation of the *.dta format.
read_dta: For an explanation of the \*.dta format.

Todo
----
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from itertools import chain
from setuptools import setup, find_packages


with open('README.rst') as readme_file:
readme = readme_file.read()

Expand All @@ -8,8 +10,12 @@
exec(version_file.read(), version)

extra_feature_requirements = {
"tests": ["coverage >= 5.0", "pytest >= 5.4", "pytest-cov >= 2.8.1"],
"tests": ["coverage >= 5.0", "pytest >= 5.4", "pytest-cov >= 2.8.1", "tox"],
"docs": ["sphinx < 2", "sphinx-rtd-theme"],
}
extra_feature_requirements["dev"] = list(
chain(*list(extra_feature_requirements.values()))
)

setup(
name='morphops',
Expand Down