-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to Package. Add Tests. Refactor.
- Loading branch information
Showing
26 changed files
with
2,093 additions
and
348 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,20 @@ | ||
environment: | ||
PYTHONIOENCODING: UTF-8 | ||
LOG_LEVEL: DEBUG | ||
matrix: | ||
- PYTHON: "C:\\Python36-x64" | ||
- PYTHON: "C:\\Python37-x64" | ||
|
||
install: | ||
- set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH% | ||
- pip install pipenv | ||
- pipenv --python=%PYTHON%\\python.exe | ||
- pipenv lock -r >> requirements.txt | ||
- pipenv lock -r --dev >> requirements.txt | ||
- pip install -r requirements.txt | ||
|
||
build: off | ||
|
||
test_script: | ||
- python --version | ||
- pytest -v -s --cov |
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,6 @@ | ||
[run] | ||
branch = True | ||
source = | ||
src | ||
omit = | ||
*/tests/* |
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 |
---|---|---|
@@ -1,3 +1,26 @@ | ||
.vscode | ||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
*.pyc | ||
|
||
.idea | ||
.venv | ||
log.txt | ||
.vscode | ||
.coverage | ||
htmlcov | ||
tests/private.* | ||
*.log |
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,32 @@ | ||
sudo: false | ||
language: python | ||
matrix: | ||
include: | ||
- os: linux | ||
python: 3.6 | ||
- os: linux | ||
python: 3.7 | ||
- os: osx | ||
language: generic | ||
env: PYENV_VERSION=3.6.8 | ||
- os: osx | ||
language: generic | ||
env: PYENV_VERSION=3.7.4 | ||
install: | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then brew update ; fi | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then brew outdated pyenv || brew upgrade pyenv ; fi | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then pyenv install $PYENV_VERSION ; fi | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then ~/.pyenv/versions/$PYENV_VERSION/bin/python -m venv .venv ; fi | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then source .venv/bin/activate ; fi | ||
- python --version | ||
- python -m pip install -U pip | ||
- python -m pip install -U pipenv | ||
- pipenv install --dev | ||
- pip install coveralls | ||
before_script: | ||
- python -m coverage erase | ||
script: | ||
- python --version | ||
- python -m pytest -v -s --cov | ||
after_success: | ||
- python -m coveralls |
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 @@ | ||
# Change Log | ||
|
||
## Version 0.0.1 (2019-11-20) | ||
### Added | ||
- Initial release. |
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,3 @@ | ||
include LICENSE | ||
include NOTICE | ||
include README.md |
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,47 @@ | ||
.PHONY: pip_install | ||
pip_install: | ||
pipenv install --dev | ||
|
||
|
||
.PHONY: test | ||
test: | ||
pytest -v --cov --cov-report=term --cov-report=html | ||
|
||
|
||
.PHONY: build | ||
build: clean | ||
python setup.py sdist | ||
python setup.py bdist_wheel | ||
twine check dist/* | ||
|
||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf ./build/* | ||
rm -rf ./dist/* | ||
rm -rf ./htmlcov | ||
|
||
|
||
.PHONY: install_local | ||
install_local: | ||
pip install -e . | ||
|
||
|
||
.PHONY: install_test | ||
install_test: | ||
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple synapse-uploader | ||
|
||
|
||
.PHONY: publish_test | ||
publish_test: build | ||
twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
|
||
|
||
.PHONY: publish | ||
publish: build | ||
twine upload dist/* | ||
|
||
|
||
.PHONY: uninstall | ||
uninstall: | ||
pip uninstall -y synapse-uploader |
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,13 @@ | ||
Copyright 2019-present, Bill & Melinda Gates Foundation | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
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,22 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
pytest = "*" | ||
pylint = "*" | ||
pytest-mock = "*" | ||
pytest-pylint = "*" | ||
pytest-cov = "*" | ||
coverage = "*" | ||
coveralls = "*" | ||
twine = "*" | ||
wheel = "*" | ||
autopep8 = "*" | ||
|
||
[packages] | ||
synapseclient = "*" | ||
|
||
[requires] | ||
python_version = "3.7" |
Oops, something went wrong.