Skip to content

xtensor-stack/xtensor-python-cookiecutter

Repository files navigation

xtensor-cookiecutter

Travis Appveyor Documentation Status Join the Gitter Chat

A cookiecutter template for creating a custom Python extension with xtensor

What is xtensor-python-cookiecutter?

xtensor-python-cookiecutter helps extension authors create Python extension modules making use of xtensor.

It takes care of the initial work of generating a project skeleton with

  • A complete setup.py compiling the extension module

  • A few examples included in the resulting project including

    • A universal function defined from C++
    • A function making use of an algorithm from the STL on a numpy array
    • Unit tests
    • The generation of the HTML documentation with sphinx

Usage

Install cookiecutter:

$ pip install cookiecutter

After installing cookiecutter, use the xtensor-python-cookiecutter:

$ cookiecutter https://github.com/xtensor-stack/xtensor-python-cookiecutter.git

As xtensor-python-cookiecutter runs, you will be asked for basic information about your custom extension project. You will be prompted for the following information:

  • author_name: your name or the name of your organization,
  • author_email: your project's contact email,
  • github_project_name: name of the GitHub repository for your project,
  • github_organization_name: name of the GithHub organization for your project,
  • python_package_name: name of the Python package created by your extension,
  • cpp_namespace: name for the cpp namespace holding the implementation of your extension,
  • project_short_description: a short description for your project.

This will produce a directory containing all the required content for a minimal extension project making use of xtensor with all the required boilerplate for package management, together with a few basic examples. The generated Python extension requires an installation of xtensor ^0.18.0, xtensor-python ^0.21.0, numpy, and pybind11 ^2.1.0.

Install the module:

$ pip install ./{{ cookiecutter.github_project_name }}/

If you have Jupyter installed, run the Test_Run notebook:

$ cd {{ cookiecutter.github_project_name }}
$ jupyter notebook

Resources

About

Cookiecutter for a Python project making use of xtensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy