-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ff3b78f
Showing
11 changed files
with
792 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# OS X | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: python | ||
python: | ||
- "3.8" | ||
install: | ||
- "pip install coveralls" | ||
- "pip install -e .[test]" | ||
script: | ||
- py.test | ||
- coverage run --source=uploader -m py.test | ||
after_success: | ||
- coveralls | ||
sudo: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# BRAMON - Uploader | ||
|
||
Sync directory to BRAMON API. | ||
|
||
## Instalação | ||
|
||
``` | ||
pip install -e . | ||
``` | ||
|
||
## Uso | ||
|
||
```console | ||
export API_TOKEN=<token> | ||
|
||
uploader <directorio> <stations.json> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[egg_info] | ||
tag_build = dev | ||
|
||
[upload] | ||
dry-run = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from codecs import open as codecs_open | ||
from setuptools import setup, find_packages | ||
|
||
# Get the long description from the relevant file | ||
with codecs_open('README.md', encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
setup(name='uploader', | ||
version='0.0.1', | ||
description=u"Image uploader.", | ||
long_description=long_description, | ||
classifiers=[], | ||
keywords='image,uploader', | ||
author=u"Thiago Paes", | ||
author_email='mrprompt@gmail.com', | ||
url='https://github.com/bramon-org/uploader-sync', | ||
license='MIT', | ||
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), | ||
include_package_data=True, | ||
zip_safe=False, | ||
install_requires=[ | ||
'click', | ||
], | ||
extras_require={ | ||
'test': [ | ||
'pytest', | ||
'requests' | ||
], | ||
}, | ||
entry_points=""" | ||
[console_scripts] | ||
uploader=uploader.scripts.cli:cli | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from click.testing import CliRunner | ||
from uploader.scripts.cli import cli | ||
|
||
|
||
def test_cli_count(): | ||
runner = CliRunner() | ||
result = runner.invoke(cli, ['./', '*P.jpg', 'output.jpg']) | ||
assert result.exit_code == 0 | ||
assert result.output == "- Reading captures\n- Nothing to do\n" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import os | ||
|
||
BASE_PATH = os.path.dirname(__file__) | ||
# API_URL = 'http://local-api.bramonmeteor.org/v1/operator/captures' | ||
API_URL = 'https://api.bramonmeteor.org/v1/operator/captures' | ||
API_TOKEN = os.environ.get('API_TOKEN') | ||
STATIONS_MAP = "{}/../data/stations.json".format(BASE_PATH) |
Oops, something went wrong.