GithubHelp home page GithubHelp logo

bhanditz / tincanpython Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appsembler/tincanpython

0.0 2.0 0.0 655 KB

Python Library for Tin Can API

Home Page: http://rusticisoftware.github.io/TinCanPython/

License: Apache License 2.0

Python 100.00%

tincanpython's Introduction

A Python library for implementing Tin Can API.

Build Status

For hosted API documentation, basic usage instructions, supported version listing, etc. visit the main project website at:

http://rusticisoftware.github.io/TinCanPython/

For more information about the Tin Can API visit:

http://tincanapi.com/

Requires Python 2.7 or later.

Installation

TinCanPython requires Python 2.7 or later. Python 3 is not supported.

If you are installing from the Github repo, you will need to install aniso8601 and pytz (use sudo as necessary):

easy_install aniso8601 pytz

Recommended optimization

To speed up the timezone lookups, run:

pip unzip pytz

Testing

The preferred way to run the tests is from the command line.

Unix-like systems and Mac OS X

No preparation needed.

Windows

Make sure that your Python installation allows you to run python from the command line. If not:

  1. Run the Python installer again.
  2. Choose "Change Python" from the list.
  3. Include "Add python.exe to Path" in the install options. I.e. install everything.
  4. Click "Next," then "Finish."

Running the tests

It is possible to run all the tests in one go, or just run one part of the tests to verify a single part of TinCanPython. The tests are located in test/.

All the tests:

  1. cd to the test directory.

  2. Run

     python main.py
    

One of the tests:

  1. cd to the directory containing the test.

  2. Run

     python result_test.py
    

    (or whatever test you want to run)

A single test case of one of the tests:

  1. cd to the directory containing the test.

  2. Run

     python -m unittest remote_lrs_test.RemoteLRSTest.test_retrieve_statement
    

    Where "remote_lrs_test" is the test file, "RemoteLRSTest" is the class in that file, and "test_retrieve_statement" is the specific test case.

API doc generation

To automatically generate documentation, at the root of the repository run,

sphinx-apidoc -f -o ./docs/source/ tincan/

Then from the docs/ directory run,

make html

The docs will be output to docs/build/html/.

If you would like to change the names of each section, you can do so by modifying docs/source/tincan.rst.

Releasing

To release to PyPI, first make sure that you have a PyPI account set up at https://pypi.python.org/pypi (and at https://testpypi.python.org/pypi if you plan on using the test index). You will also need a .pypirc file in your home directory with the following contents.

[distutils]

index-servers =
    pypi
    pypitest

[pypi] # authentication details for live PyPI
repository: https://pypi.python.org/pypi
username: <username>
password: <password>

[pypitest] # authentication details for test PyPI
repository: https://testpypi.python.org/pypi
username: <username>
password: <password>

The pypitest contents of the .pypirc file are optional and are used for hosting to the test PyPI index.

Update setup.py to contain the correct release version and any other new information.

To test the register/upload, run the following commands in the repo directory:

python setup.py register -r pypitest
python setup.py sdist upload -r pypitest

You should get no errors and should be able to find this tincan version at https://testpypi.python.org/pypi.

To register/upload to the live PyPI server, run the following commands in the repo directory:

python setup.py register -r pypi
python setup.py sdist upload -r pypi

The new module should be now be installable with pip or easy_install.

easy_install tincan

or

pip install tincan

Use sudo as necessary.

tincanpython's People

Contributors

brianjmiller avatar saleem-latif avatar fishhooks avatar redglow avatar usernolan avatar bscscorm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.