Skip to main content
https://travis-ci.org/MacHu-GWU/elementary_math-project.svg?branch=master https://codecov.io/gh/MacHu-GWU/elementary_math-project/branch/master/graph/badge.svg https://img.shields.io/pypi/v/elementary_math.svg https://img.shields.io/pypi/l/elementary_math.svg https://img.shields.io/pypi/pyversions/elementary_math.svg https://img.shields.io/badge/Star_Me_on_GitHub!--None.svg?style=social

Welcome to elementary_math Documentation

elementary_math is a project to demonstrate: how to setup environment and toolsets for a python library project on github, includes these powerful components:

  • virtual environment setup (one command install everything)

  • setup.py file (one click install/uninstall)

  • auto Google stylize your code

  • fancy sphinx document (one click build/view/deploy)

  • unittest suits with pytest

  • code coverage test with coverall

  • multi python version test with tox

  • integration with https://travis-ci.org/

  • integration with https://codecov.io/

  • auto deploy to AWS S3

  • publish to PyPI

Usage

  1. Clone the repo.

  2. Navigate to elementary_math-project/start-a-project, edit init_project.py and run it.

  3. A <repo-name> directory will be created, you can use this as your github repo directory.

  4. Take a look at Makefile, all magic happens here!

AWS Command Line (Optional)

Use AWS S3 to host your doc site is a good idea!

We need awscli to automate the deployment.

  1. Install awscli, just pip install awscli.

  2. Configure your API token, just aws configure and follow the instruction.

Config PyPI (Optional)

If you want to publish your package to PyPI or new PyPI, you need a pypi account and Configure your credential.

  1. Create a ${HOME}/.pypirc file.

  2. put these contents:

    [distutils]
    index-servers =
        pypi
    
    [pypi]
    username:<username>
    password:<password>

CI (Continues Integration) (Optional)

  1. Test with travis-ci, basically you just need to:
    • sign in using GitHub account.

    • toggle on your repo.

  2. Code Coverage Test with codecov.

For Windows

Because Windows doesn’t have shell script and make command, so we have to install some third-party software to make it works.

Install Git Bash as shell emulator

  1. Download and install git.

  2. Now you can use C:\Program Files\Git\git-bash.exe like the terminal in MacOS/Linux.

Install MinGW

  1. Download and install, use the installer to install MinGW Base.

  2. Find C:\MinGW\bin\mingw32-make.exe, copy and paste and rename as C:\MinGW\bin\make.exe.

  3. Add C:\MinGW\bin to $PATH (environment variable).

Now you can use make <target> in git-bash.exe now.

For MacOS

You have to make sure:

There’s two way of using virtualenv in MacOS:

  1. Use generic virtualenv.

  2. Use pyenv + pyenv-virtualenv.

I prefer pyenv + pyenv-virtualenv, because it allows you:

  1. use tox to test against multiple python version locally before using cloud CI (continues integration).

  2. will not mess up your global python environment.

  3. the Makefile will do the pyenv + pyenv-virtualenv setup for you, just make sure that you have HomeBrew installed.

Install

elementary_math is released on PyPI, so all you need is:

$ pip install elementary_math

To upgrade to latest version:

$ pip install --upgrade elementary_math

Metadata

Release files for elementary_math 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elementary_math 0.0.8
File Size Uploaded
elementary_math-0.0.8.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elementary_math 0.0.8
File Interpreter ABI Platform
elementary_math-0.0.8-py2-none-any.whl Python 2 none any Details

Total release size: 20.5 kB

Release files / elementary_math-0.0.8.tar.gz

Download URL elementary_math-0.0.8.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
14b210128d8f19d3ea4795624a20ccd234ce3116ff24713df4d0ab1c06c7cf1a
BLAKE2b-256 checksum
How to use checksums
d549ec52a5ce3b606180a27590937cad83892197e75b05d9347de7c771a79489
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / elementary_math-0.0.8-py2-none-any.whl

Download URL elementary_math-0.0.8-py2-none-any.whl
Size 12.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
12f13800d1663347fbd1c37851e070d899e21d4b54f1c6aba8b1942acb59163f
BLAKE2b-256 checksum
How to use checksums
005753ab52701723b78d47bdc47c7ea8d877e85723a7d9bcb57e4cc4d134cd9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page