Giter Club home page Giter Club logo

pycon.tw's Introduction

codecov.io travis-ci status

PyCon TW

This repository serves the website of PyCon TW, Python Conference Taiwan. This project is open source and the license can be found in LICENSE.

Getting Started

Requirements

  • Git 1.8+
  • Python 3.6+
  • Yarn 1.0+

Set up a Virtual Environment

Built-in venv

Create your virtual environment:

python3 -m venv venv

And enable it:

. venv/bin/activate

You need to specify your python path when creating the virtual environment:

mkvirtualenv --python=$(which python3) pycontw2016

Install Dependencies

Use pip to install Python depedencies:

pip install -r requirements.txt

Use Yarn to install Node dependencies:

yarn install --dev

Set up Local Environment Variables and Database

Settings are stored in environment variables via django-environ. The quickest way to start is to copy local.sample.env into local.env:

cp src/pycontw2016/settings/local.sample.env src/pycontw2016/settings/local.env

Then edit the SECRET_KEY line in local.env, replacing {{ secret_key }} into any Django Secret Key value. An example:

SECRET_KEY=twvg)o_=u&@6^*cbi9nfswwh=(&hd$bhxh9iq&h-kn-pff0&&3

After that, just run the migration

Get Ready for Development

cd into the src directory:

cd src

And migrate the database:

python manage.py migrate

Now you’re all set!

Run the Development Server

python manage.py runserver

Run Tests

Tests are managed with pytest-django. You have two options to run tests, either with the local environment, or in an isolated one via Tox.

Testing in the Local Environment

Run the following command inside src:

pytest

To run tests with coverage report:

pytest --cov=.

Testing with Tox

Run the following inside the top-level directory (the one with tox.ini):

tox

How to Contribute

Follow the GitHub Flow, please DO NOT push the commits into master directly. Always create branch by the feature you want to update. You are encouraged to submit a pull request for reviewing before merging things into master.

We strongly recommend you configure your editor to match our coding styles. You can do this manually, or use an EditorConfig plugin if your editor supports it. An .editorconfig file has already been attached to the repository.

Internationalisation

Translations are hosted on Transifex. When new commits are added into master branch, Travis CI will automatically push new translation strings to Transifex, so simply fix or edit the translation online.

Update translation

Translation updates into code base are done manually under src/. You need to configure the Transifex client first by adding the file ~/.transifexrc.

Old translation files will stop tx pull updating if they have later modified time, which they generally have when they are pulled from the remote repo. So old translation files should be removed first:

rm locale/en_US/LC_MESSAGES/django.*
rm locale/zh_Hant/LC_MESSAGES/django.*
# ... more languages

Run tx pull to get newer translation and recompile the PO files:

tx pull -a
python manage.py compilemessages -x _src

pycon.tw's People

Contributors

uranusjr avatar flywindy avatar ccwang002 avatar daikeren avatar chairco avatar jneo8 avatar starwilly avatar adrianliaw avatar keitheis avatar yaoyy16 avatar timtan avatar linmic avatar jackklpan avatar ccc-larc avatar l34marr avatar note35 avatar hsiaoyi0504 avatar stanleyding avatar vagrantpi avatar manuel4131 avatar nick0916 avatar apua avatar tai271828 avatar xingularity avatar changyc avatar chenesan avatar emjames avatar tborsa avatar flisky avatar

Watchers

James Cloos avatar Mark Chang 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.