← Winnitude! Search  ·  Reader Mode (829 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 45 LINKS

GitHub - xtensor-stack/xtensor-python-cookiecutter: Cookiecutter for a Python project making use of xtensor

Repository navigation

xtensor-python-cookiecutter
Public

About

Cookiecutter for a Python project making use of xtensor

Resources

Readme BSD-3-Clause license Activity Custom properties

Stars

31 stars

Watchers

5 watching

Forks

9 forks Report repository
Branches

Tags
Go to Branches page Go to Tags page

Latest commit

 

History


29 Commits
View commit history for this file.

Folders and files

Name Name Last commit message Last commit date
{{cookiecutter.github_project_name}} {{cookiecutter.github_project_name}}    
.appveyor.yml .appveyor.yml    
.gitignore .gitignore    
.travis.yml .travis.yml    
LICENSE LICENSE    
README.md README.md    
cookiecutter.json cookiecutter.json    
xtensor-cookiecutter.svg xtensor-cookiecutter.svg    

Repository files navigation

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

Readme BSD-3-Clause license Activity Custom properties

Stars

31 stars

Watchers

5 watching

Forks

9 forks Report repository

Releases

Packages

Used by

Contributors

Languages