Skip to content

Commit

Permalink
Merge pull request #120 from hakonanes/fix-packaging
Browse files Browse the repository at this point in the history
Update pypi installation files, readme type, and pytest args
  • Loading branch information
hakonanes committed Jan 8, 2020
2 parents 417f5c5 + c3e6a4e commit 9d1269c
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ install:

script:
- export MPLBACKEND=Agg
- pytest --cov=kikuchipy
- pytest --cov=kikuchipy --pyargs kikuchipy

after_success:
- coveralls
Expand Down
13 changes: 8 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
include LICENSE
include README.md
include MANIFEST.in
include pyproject.toml
include pytest.ini
include README.rst
include readthedocs.yml
include setup.py
include kikuchipy/hyperspy_extension.yaml

recursive-include kikuchipy/data *

include doc/Makefile
include doc/make.bat
recursive-include doc Makefile make.bat
recursive-include doc *.rst *.py
recursive-include doc/_static *.png *.jpg *.svg *.gif *.sh
recursive-include kikuchipy/data *
40 changes: 0 additions & 40 deletions README.md

This file was deleted.

58 changes: 58 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
|travis-ci|_ |coveralls|_ |doc|_ |pypi_version|_ |doi|_ |black|_

.. |travis-ci| image:: https://api.travis-ci.org/kikuchipy/kikuchipy.svg?branch=master
.. _travis-ci: https://travis-ci.org/kikuchipy/kikuchipy

.. |coveralls| image:: https://coveralls.io/repos/github/kikuchipy/kikuchipy/badge.svg?branch=master
.. _coveralls: https://coveralls.io/github/kikuchipy/kikuchipy?branch=master

.. |doc| image:: https://readthedocs.org/projects/kikuchipy/badge/?version=latest
.. _doc: https://kikuchipy.readthedocs.io

.. |pypi_version| image:: http://img.shields.io/pypi/v/kikuchipy.svg?style=flat
.. _pypi_version: https://pypi.python.org/pypi/kikuchipy

.. |doi| image:: https://zenodo.org/badge/doi/10.5281/zenodo.3597646.svg
.. _doi: https://doi.org/10.5281/zenodo.3597646

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
.. _black: https://black.readthedocs.io

*KikuchiPy is an open-source Python library for processing and analysis of
electron backscatter diffraction (EBSD) patterns.*

The library builds upon the tools for multi-dimensional data analysis provided
by the `HyperSpy <https://hyperspy.org>`_ library. This means that the EBSD
class, which has several common methods for processing of EBSD patterns, also
inherits all relevant methods from HyperSpy's Signal2D and `Signal
<https://hyperspy.org/hyperspy-doc/current/user_guide/tools.html>`_ classes.

Note that the project is in an alpha stage, and there will likely be breaking
changes with each release.

KikuchiPy is released under the GPL v3 license.

User guide
----------

Installation instructions, a user guide and the full API reference is available
`here <https://kikuchipy.readthedocs.io>`_ via Read the Docs.

Contributing
------------

Everyone is welcome to contribute. Please read our `contributor guide
<https://kikuchipy.readthedocs.io/en/latest/contributing.html>`_ to get started!

Code of Conduct
---------------

KikuchiPy has a `Code of Conduct
<https://kikuchipy.readthedocs.io/en/latest/code_of_conduct.html>`_
that should be honoured by everyone who participates in the KikuchiPy community.

Cite
----

If analysis using KikuchiPy forms a part of published work, please consider
recognizing the code development by citing the DOI above.
2 changes: 1 addition & 1 deletion doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ dummy scan and corresponding background pattern, are available in the

To run the tests::

pytest --cov
pytest --cov --pyargs kikuchipy

The ``--cov`` flag makes `coverage.py
<https://coverage.readthedocs.io/en/latest/>`_ print a nice report in the
Expand Down
34 changes: 1 addition & 33 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,7 @@
KikuchiPy
=========

|travis-ci|_ |coveralls|_ |doc|_ |pypi_version|_ |doi|_ |black|_

.. |travis-ci| image:: https://api.travis-ci.org/kikuchipy/kikuchipy.svg?branch=master
.. _travis-ci: https://travis-ci.org/kikuchipy/kikuchipy

.. |coveralls| image:: https://coveralls.io/repos/github/kikuchipy/kikuchipy/badge.svg?branch=master
.. _coveralls: https://coveralls.io/github/kikuchipy/kikuchipy?branch=master

.. |doc| image:: https://readthedocs.org/projects/kikuchipy/badge/?version=latest
.. _doc: https://kikuchipy.readthedocs.io

.. |pypi_version| image:: http://img.shields.io/pypi/v/kikuchipy.svg?style=flat
.. _pypi_version: https://pypi.python.org/pypi/kikuchipy

.. |doi| image:: https://zenodo.org/badge/doi/10.5281/zenodo.3597646.svg
.. _doi: https://doi.org/10.5281/zenodo.3597646

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
.. _black: https://github.com/psf/black

*KikuchiPy is an open-source Python library for processing and analysis of
electron backscatter diffraction (EBSD) patterns.*

The library builds upon the tools for multi-dimensional data analysis provided
by the `HyperSpy <https://hyperspy.org>`_ library. This means that the EBSD
class, which has several common methods for processing of EBSD patterns, also
inherits all relevant methods from HyperSpy's Signal2D and `Signal
<https://hyperspy.org/hyperspy-doc/current/user_guide/tools.html>`_ classes.

Note that the project is in an alpha stage, and there will likely be breaking
changes with each release.

KikuchiPy is released under the GPL v3 license.
.. include:: ../README.rst

.. toctree::
:hidden:
Expand Down
3 changes: 2 additions & 1 deletion kikuchipy/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
maintainer = "Håkon Wiik Ånes"
maintainer_email = "hakon.w.anes@ntnu.no"
name = "kikuchipy"
platforms = ["Linux", "MacOS X", "Windows"]
status = "Development"
version = "0.2.0.dev0"
version = "0.1.2"
64 changes: 42 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
VERSION = line.strip().split(" = ")[-1][1:-1]
elif line.startswith("license"):
LICENSE = line.strip().split(" = ")[-1][1:-1]
elif line.startswith("platforms"):
PLATFORMS = line.strip().split(" = ")[-1][1:-1]

# Projects with optional features for building the documentation and running
# tests. From setuptools:
Expand All @@ -58,29 +60,17 @@
] + list(chain(*list(extra_feature_requirements.values())))

setup(
# Package description
name=NAME,
version=VERSION,
license=LICENSE,
url="https://kikuchipy.readthedocs.io",
python_requires=">=3.7",
description=(
"Processing of electron backscatter diffraction (EBSD) patterns"
),
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author=AUTHOR,
author_email=MAINTAINER_EMAIL,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
keywords=[
"EBSD",
"electron backscatter diffraction",
"EBSP",
"electron backscatter pattern",
"BKD",
"backscatter kikuchi diffraction",
"SEM",
"scanning electron microscopy",
"kikuchi pattern",
],
url="https://kikuchipy.readthedocs.io",
long_description=open("README.rst").read(),
long_description_content_type="text/x-rst",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
Expand All @@ -92,6 +82,26 @@
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
],
platforms=PLATFORMS,
keywords=[
"EBSD",
"electron backscatter diffraction",
"EBSP",
"electron backscatter pattern",
"BKD",
"backscatter kikuchi diffraction",
"SEM",
"scanning electron microscopy",
"kikuchi pattern",
],
zip_safe=True,
# Contact
author=AUTHOR,
author_email=MAINTAINER_EMAIL,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
# Dependencies
extras_require=extra_feature_requirements,
install_requires=[
"dask[array]",
"hyperspy >= 1.5.2",
Expand All @@ -103,10 +113,20 @@
"scikit-learn",
"scipy",
],
extras_require=extra_feature_requirements,
entry_points={"hyperspy.extensions": "kikuchipy = kikuchipy"},
# Files to include when distributing package
packages=find_packages(),
package_dir={"kikuchipy": "kikuchipy"},
license=LICENSE,
entry_points={"hyperspy.extensions": "kikuchipy = kikuchipy"},
python_requires=">=3.7",
include_package_data=True,
package_data={
"": [
"LICENSE",
"README.rst",
"pyproject.toml",
"pytest.ini",
"readthedocs.yml",
"setup.py",
],
"kikuchipy": ["*.py", "hyperspy_extension.yaml", "data/*"],
},
)

0 comments on commit 9d1269c

Please sign in to comment.