Skip to content

Web site for converting Unix timestamps into human-readable dates

License

Notifications You must be signed in to change notification settings

craiga/unixtimesta.mp

Repository files navigation

Code for the web site https://www.unixtimesta.mp/.

Build Status Requirements Status codecov Maintainability

Getting Started

First, check out the code:

git clone https://github.com/craiga/unixtimesta.mp.git
cd unixtimesta.mp

Set up the project by creating a virtual environment, activating it, and installing the required packages:

virtualenv --python=python3 venv
. venv/bin/activate
pip install -r requirements.txt

Finally, run the the Flask development server and access the application in a web browser at http://localhost:5000.

export FLASK_APP=unixtimestamp.py
export FLASK_DEBUG=1
flask run

Managing Packages

This project uses pip-tools to manage dependencies.

  • Add packages to requirements.in.
  • Run pip-compile to produce a new version of requirements.txt (use pip-compile --upgrade to update to the latest versions of packages).
  • Run pip-sync update your environment to the packages in requirements.txt.

Ensuring Code Quality

The most important way to ensure code quality is to run the test suite with nose and behave.

nosetests
behave

Setting up this project will install pycodestyle, pydocstyle, Pylint and piprot. These help test for adherance to PEP 8, PEP 257 and other generally-accepted best Python coding practices, as well as ensuring the latest available versions of all packages are installed.

pycodestyle
pydocstyle
find . -iname "*.py" | xargs pylint
piprot

Note that Travis CI is set up to automatically run these when commits are pushed to GitHub. If any of them fail, you should be notified of it.

Reporting Issues

Report bugs, issues and requests through GitHub.