Skip to content

Commit

Permalink
Merge pull request #43 from isogeo/write-scripting
Browse files Browse the repository at this point in the history
Add API RW abilities to the package (min-sdk --> SDK)
  • Loading branch information
Guts authored Jul 24, 2019
2 parents 55b7c5d + 4744d29 commit ca723b8
Show file tree
Hide file tree
Showing 130 changed files with 24,704 additions and 2,567 deletions.
27 changes: 27 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# GLOBAL
ISOGEO_PLATFORM=qa
OAUTHLIB_INSECURE_TRANSPORT=1

# URLS
ISOGEO_API_URL=https://api.qa.isogeo.com/
ISOGEO_ID_URL=https://id.api.qa.isogeo.com/

# API - GROUP (Client Credentials)
ISOGEO_API_DEV_ID=
ISOGEO_API_DEV_SECRET=

# API - USER (Authorization Code)
ISOGEO_API_USER_CLIENT_ID=
ISOGEO_API_USER_CLIENT_SECRET=

# API - SCRIPTS (Legacy Workflow)
ISOGEO_API_SCRIPTS_CLIENT_ID=
ISOGEO_API_SCRIPTS_CLIENT_SECRET=

# USER
ISOGEO_USER_NAME=
ISOGEO_USER_PASSWORD=

# SHORTCUTS
ISOGEO_FIXTURES_METADATA_COMPLETE=
ISOGEO_WORKGROUP_TEST_UUID=
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ virtenv*/
virtualenv/
*.pypirc
*env*
!.env.example

# tests
junit/*
Expand All @@ -93,3 +94,6 @@ junit/*
# PTVS
*.ptvs
*.vs

*_wip*
*.xlsx
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exclude: ^(.venv_packaging/|.venv*/|tests/dev/|tests/fixtures/)
repos:
- repo: https://github.com/python/black
rev: 19.3b0
hooks:
- id: black
name: black
description: 'Formatting code using Black'
exclude_types: [directory,]
language_version: python3
log_file: dev_precommit.log
types: [file, python]
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
language: python
dist: xenial # required for Python >= 3.7

git:
depth: false
submodules: false

# https://docs.travis-ci.com/user/languages/python/#specifying-python-versions
python:
- "3.5"
- "3.6"

matrix:
include:
- python: 3.6
- python: 3.7
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)

cache: pip

# dependencies
install:
- "pip install --upgrade -r tests/requirements_test.txt"
- pip install -e .

# run tests
script:
Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"davidanson.vscode-markdownlint",
"eriklynd.json-tools",
"lextudio.restructuredtext",
"mikestead.dotenv",
"ms-azure-devops.azure-pipelines",
"ms-python.python",
"felixrieseberg.vsc-travis-ci-status"
"ms-vscode.powershell"
]
}

15 changes: 9 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@
"python.jediEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--ignore=E24,E501,W504",
"--ignore=E24,E265,E501,W504",
"--verbose"
],
"python.linting.pylintEnabled": true,
"python.pythonPath": ".venv_tests\\Scripts\\python.exe",
"python.unitTest.pyTestArgs": [],
"python.unitTest.nosetestsEnabled": false,
"python.unitTest.pyTestEnabled": true,
"python.unitTest.unittestArgs": [
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"-c",
"setup.cfg"
],
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": false,
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"test_*.py"
],
"python.unitTest.unittestEnabled": false,
"restructuredtext.confPath": "${workspaceFolder}\\docs",
"travis.username": "isogeo",
"travis.repository": "isogeo-api-py-minsdk",
Expand Down
40 changes: 40 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{
"label": "Tests and coverage",
"type": "shell",
"dependsOn": [
"Format tests"
],
"command": "./tool_test_coverage.ps1",
"group": {
"kind": "test",
Expand All @@ -15,6 +18,9 @@
{
"label": "Build package and upload",
"type": "shell",
"dependsOn": [
"Format code"
],
"command": "./tool_build_upload.ps1",
"group": {
"kind": "build",
Expand All @@ -28,6 +34,40 @@
"command": "./tool_docs_build.ps1",
"group": "build",
"problemMatcher": []
},
{
"label": "Format code and tests",
"dependsOn": [
"Format code",
"Format tests"
],
"problemMatcher": []
},
{
"label": "Format code",
"type": "shell",
"command": "${config:python.pythonPath}",
"args": [
"-m",
"black",
"--target-version=py36",
"./isogeo_pysdk"
],
"group": "build",
"problemMatcher": []
},
{
"label": "Format tests",
"type": "shell",
"command": "${config:python.pythonPath}",
"args": [
"-m",
"black",
"--target-version=py36",
"./tests"
],
"group": "build",
"problemMatcher": []
}
]
}
4 changes: 3 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ black = "==19.3b0"
codecov = "*"
flake8 = "*"
pip = "*"
pre-commit = "*"
pycodestyle = "*"
pylint = "*"
pytest= "*"
pytest-cov="*"
python-dateutil = "*"
python-dotenv = "*"
requests-oauthlib = "*"
setuptools = "*"
twine = "*"
wheel = "*"

[packages]
requests = ">=2.20.0"
requests-oauthlib = ">=1.2.0"

[requires]
python_version = "3.6"
Loading

0 comments on commit ca723b8

Please sign in to comment.