Skip to content

Commit 0844f64

Browse files
committed
-m DME-3 building a better python package
1 parent f742e13 commit 0844f64

43 files changed

Lines changed: 2267 additions & 50 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coverage

35.3 KB
Binary file not shown.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
dist/
44
magicembed.egg-info/
55
build
6+
.tox
7+
django_magicembed.egg-info

.travis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
language: python
2+
3+
python:
4+
- "2.7"
5+
- "3.4"
6+
7+
env:
8+
- DJANGO=django==1.4.*
9+
- DJANGO=django==1.5.*
10+
- DJANGO=django==1.6.*
11+
- DJANGO=django==1.7.*
12+
- DJANGO=django==1.8.*
13+
14+
install:
15+
- pip install -r test_requirements.txt --use-mirrors
16+
- pip install $DJANGO
17+
- pip install coveralls
18+
19+
script:
20+
- cd magicembed/tests
21+
- ./runtests.py
22+
- mv .coverage ../../
23+
- cd ../../
24+
25+
matrix:
26+
exclude:
27+
- python: "3.4"
28+
env: DJANGO=django==1.4.*
29+
30+
after_success:
31+
- coveralls

AUTHORS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Current or previous core committers
2+
3+
Adolfo Fitoria
4+
Andres Reyes
5+
Oscar Cortez
6+
7+
* Your name could stand here :)

CHANGELOG.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
=== 0.0.X (onggoing, to be released as 0.1) ===
2+
- Initial commit
3+
4+
5+
# Suggested file syntax:
6+
#
7+
# === (ongoing) ===
8+
# - this is always on top of the file
9+
# - when you release a new version, you rename the last `(ongoing)` to the new
10+
# version and add a new `=== (ongoing) ===` to the top of the file
11+
#
12+
# === 1.0 ===
13+
# - a major version is created when the software reached a milestone and is
14+
# feature complete
15+
#
16+
# === 0.2 ===
17+
# - a minor version is created when a lot of new features have bene added or
18+
# significant backwards incompatible changes have been made.

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
An easy and simple Django template tag and tool to embed video and get thumbnails from video providers.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright (c) 2015 Adolfo Fitoria
2+
Copyright (c) 2015 Adolfo Fitoria
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy of
55
this software and associated documentation files (the "Software"), to deal in

MANIFEST.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
include AUTHORS
2+
include LICENSE
3+
include DESCRIPTION
4+
include CHANGELOG.txt
5+
include README.md
6+
include tox.ini
7+
include requirements.txt
8+
graft magicembed
9+
global-exclude *.orig *.pyc *.log *.swp local_settings.py
10+
prune magicembed/tests/coverage
11+
prune magicembed/.ropeproject

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
develop: setup-git
2+
pip install "file://`pwd`#egg=magicembed[dev]"
3+
pip install -e .
4+
pip install -r test_requirements.txt
5+
6+
setup-git:
7+
git config branch.autosetuprebase always
8+
cd .git/hooks && ln -sf hooks/* ./
9+
10+
lint-python:
11+
@echo "Linting Python files"
12+
PYFLAKES_NODOCTEST=1 flake8 magicembed
13+
@echo ""

README.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ When you have the API key, add this in your settings.py:
3939
How to install it?
4040
-------------------
4141

42+
To get the latest stable release from PyPI
43+
44+
.. code-block:: bash
45+
pip install django-magicembed
46+
47+
To get the latest commit from GitHub
48+
49+
.. code-block:: bash
50+
51+
pip install -e git+git://github.com/kronoscode/django-magicembed.git#egg=magicembed
52+
4253
If you have a requeriments list add this to your requeriments
4354

4455
1. <code>magicembed==(version)</code>
@@ -47,16 +58,21 @@ If you have a requeriments list add this to your requeriments
4758

4859
3. <code>add magicembed to **INSTALLED_APPS**</code>
4960

50-
Or if you use setup.py
61+
.. code-block:: python
62+
INSTALLED_APPS = (
63+
...,
64+
'magicembed',
65+
)
5166

52-
1. run <code>python setup.py install</code>
5367

5468
How to use
5569
---------------
5670

57-
First add this in the template to load the template tags
71+
Before your tags/filters are available in your templates, load them by using
72+
73+
.. code-block:: html
5874

59-
<code>{% load magicembed_tags %}</code>
75+
{% load magicembed_tags %}
6076

6177
Now if you need to embed a video, add this template tag to video url
6278
field
@@ -67,14 +83,33 @@ Or to get a thumbnail url
6783

6884
<code>{{ video|magicthumbnail }}</code>
6985

86+
Run magicembed test
87+
--------------------
88+
89+
If you want run test please set in the test_settings.py your
90+
Embedly Api Key correctly
91+
92+
In order to run the tests, simply execute ``tox``. This will install two new
93+
environments (for Django 1.6 and Django 1.7) and run the tests against both
94+
environments.
95+
7096
How to contrib
7197
----------------
7298

73-
1. Fork it ( http://github.com/kronoscode/django-magicembed/fork )
74-
2. Create your feature branch (`git checkout -b my-new-feature`)
75-
3. Commit your changes (`git commit -am 'Add some feature'`)
76-
4. Push to the branch (`git push origin my-new-feature`)
77-
5. Create new Pull Request
99+
If you want to contribute to this project, please perform the following steps
100+
101+
.. code-block:: bash
102+
103+
# Fork this repository
104+
# Clone your fork
105+
mkvirtualenv -p python2.7 django-magicembed
106+
make develop
107+
108+
git co -b feature_branch master
109+
# Implement your feature and tests
110+
git add . && git commit
111+
git push -u origin feature_branch
112+
# Send us a pull request for your feature branch
78113

79114
Licence
80115
--------------

0 commit comments

Comments
 (0)