Skip to content

Commit 8192178

Browse files
committed
Merge branch 'main' of github.com:mapillary/mapillary-python-sdk into Rubix982/Docusaurus
Stable merge
2 parents fa668fb + 0f0a627 commit 8192178

File tree

4 files changed

+113
-2
lines changed

4 files changed

+113
-2
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: documentation
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
checks:
11+
if: github.event_name != 'push'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: '12.x'
18+
- name: Test Build
19+
run: |
20+
cd docs
21+
if [ -e yarn.lock ]; then
22+
yarn install --frozen-lockfile
23+
elif [ -e package-lock.json ]; then
24+
npm ci
25+
else
26+
npm i
27+
fi
28+
npm run build
29+
gh-release:
30+
if: github.event_name != 'pull_request'
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v1
34+
- uses: actions/setup-node@v1
35+
with:
36+
node-version: '12.x'
37+
- uses: webfactory/[email protected]
38+
with:
39+
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
40+
- name: Release to GitHub Pages
41+
env:
42+
USE_SSH: true
43+
GIT_USER: git
44+
run: |
45+
cd docs
46+
git config --global user.email "[email protected]"
47+
git config --global user.name "Saif Ul Islam"
48+
if [ -e yarn.lock ]; then
49+
yarn install --frozen-lockfile
50+
elif [ -e package-lock.json ]; then
51+
npm ci
52+
else
53+
npm i
54+
fi
55+
npm run deploy

.github/workflows/pypi-publish.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow will build the distributions with sdist, bdist_wheel, run tests, format, and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Mapillary Python SDK - Publishing to PyPi
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.9
21+
22+
- name: Install dependencies
23+
run: |
24+
python3 -m pip install --upgrade pip
25+
pip install wheel build twine readme-renderer check-manifest
26+
27+
- name: Setup PyPi RC
28+
run: |
29+
touch ~/.pypirc
30+
cat >> ~/.pypyirc <<EOL
31+
[distutils]
32+
index-servers =
33+
pypi
34+
testpypi
35+
36+
[testpypi]
37+
repository: https://test.pypi.org/legacy
38+
username = ${{ secrets.PYPI_USERNAME }}
39+
password = ${{ secrets.PYPI_PASSWORD }}
40+
41+
[pypi]
42+
username = ${{ secrets.PYPI_USERNAME }}
43+
password = ${{ secrets.PYPI_PASSWORD }}
44+
EOL
45+
46+
- name: Uploading To PyPi
47+
run: |
48+
python3 setup.py upload
49+
50+
- name: Publish a Python distribution to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1
52+
with:
53+
user: ${{ secrets.PYPI_USERNAME }}
54+
password: ${{ secrets.PYPI_PASSWORD }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
# Setup variables. Change as needed
2525
NAME = "mapillary"
26-
VERSION = "0.0.31"
26+
VERSION = "0.0.32"
2727
AUTHOR = "Christopher Beddow"
2828
AUTHOR_EMAIL = "[email protected]"
2929
LICENSE = "MIT"

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
def mly_access_token():
2121
"""Specify the access token here"""
2222

23-
token = "MLY|YYY"
23+
# The default token is the "Testing" token specially created for testing services
24+
# Ref:: 'PyTest Workflow for Mapillary API v4 Python SDK'
25+
token = "MLY|3976749565769581|3022bf582da20b0ce0bb44373289ebb2"
2426

2527
if "MLY|YYY" in token or "MLY|XXX" in token:
2628
raise ValueError("[tests.conftest]: MLY Access Token is not specified")

0 commit comments

Comments
 (0)