Skip to content

Commit 928cbfb

Browse files
committed
added missing files
1 parent adf152c commit 928cbfb

8 files changed

Lines changed: 219 additions & 0 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ironsource_api/_version.py export-subst

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/ironsource_api/ @levyitay @ISryancohen
2+
/docs/ @levyitay @ISryancohen
3+
/tests/ @levyitay @ISryancohen
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: IronSource Doc issue report
3+
description: Problems and issues with IronSource documentation
4+
labels: ["documentation"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
# yamllint disable rule:line-length
9+
value: "
10+
<img src='https://raw.githubusercontent.com/ironSource/mobile-api-lib-python/main/docs/is_logo.jpg' align='left' width='80' height='80'>
11+
Thank you for finding the time to improve our documentation.
12+
13+
**Please do not open an issue related to ironSource platform, sdk and etc. Only for ironSource API Library.**
14+
15+
You do not have to create an issue if you have a pull request ready.
16+
17+
You can open [Pull Request](https://github.com/ironSource/mobile-api-lib-python/pulls) immediately instead.
18+
<br clear='left'/>"
19+
# yamllint enable rule:line-length
20+
- type: textarea
21+
attributes:
22+
label: What do you see as an issue?
23+
description: Please describe the issue with documentation you have.
24+
placeholder: >
25+
Please include links to the documentation that has the problem and possibly screenshots showing
26+
the problem. Explain why do you think it is an issue. Please explain why you think the docs are wrong.
27+
- type: textarea
28+
attributes:
29+
label: Proposed documentation change
30+
description: How do you think the problem can be solved?
31+
placeholder: >
32+
Please explain how you think the documentation could be fixed.
33+
- type: checkboxes
34+
attributes:
35+
label: Are you willing to submit PR?
36+
description: >
37+
This is not required, but we will be happy if you would like to submit a pull-request.
38+
options:
39+
- label: Yes I am willing to submit a PR!
40+
- type: checkboxes
41+
attributes:
42+
label: Code of conduct
43+
description: By checking this checkbox you agree to ironSource [code of conduct](https://www.is.com)
44+
options:
45+
- label: I agree
46+
required: true
47+
- type: markdown
48+
attributes:
49+
value: "Thanks you!"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pull-Request-Dependency
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "requirements.txt"
9+
- "dev_requirements.txt"
10+
env:
11+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
12+
GH_TOKEN: ${{secrets.PAT_TOKEN}}
13+
14+
jobs:
15+
dependency-review:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: "Checkout Repository"
19+
uses: actions/checkout@v3
20+
- name: "get refs"
21+
id: vars
22+
run: |
23+
echo ::set-output name=base_ref::${{ github.event.pull_request.base.ref || github.ref }}
24+
echo ::set-output name=head_ref::${{ github.event.pull_request.head.ref || github.ref }}
25+
26+
- name: Dependency Review
27+
uses: actions/dependency-review-action@v2
28+
with:
29+
fail-on-severity: high
30+
base-ref: ${{steps.vars.outputs.base_ref}}
31+
head-ref: ${{steps.vars.outputs.head_ref}}

.github/workflows/deploy.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Python Deploy
2+
3+
on:
4+
release:
5+
types: ["published"]
6+
workflow_dispatch:
7+
8+
env:
9+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
10+
GH_TOKEN: ${{secrets.PAT_TOKEN}}
11+
12+
jobs:
13+
14+
integration_test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Generate Short SHA and Unique runner id
19+
id: vars
20+
run: |
21+
echo ::set-output name=sha_short::${GITHUB_SHA::7}
22+
echo ::set-output name=uuid::${{ env.BRANCH_NAME }}:${GITHUB_SHA::7}:${GITHUB_RUN_ID}
23+
- name: Trigger Integration tests remote task
24+
id: integration_test_trigger
25+
timeout-minutes: 20
26+
uses: ironSource/action-trigger-workflow@main
27+
with:
28+
owner: ${{ secrets.TRIGGERED_OWNER }}
29+
repo: ${{ secrets.TRIGGERED_REPO }}
30+
github_token: ${{ secrets.PAT_TOKEN }}
31+
workflow_file_name: api-tests-py.yml
32+
job_uuid: "${{ steps.vars.outputs.uuid }}"
33+
monitored_job_name: test
34+
inputs: '{ "repository": "${{github.repository}}", "branch_name": "${{ env.BRANCH_NAME }}", "user": "${{github.actor}}", "job_uuid": "${{ steps.vars.outputs.uuid }}"}'
35+
36+
- name: Print Integration Tests results
37+
if: failure()
38+
run: |
39+
echo Checking log for workflow ${{steps.integration_test_trigger.outputs.workflow_id}} job ${{steps.integration_test_trigger.outputs.job_id}}
40+
gh --repo ${{ secrets.TRIGGERED_OWNER }}/${{ secrets.TRIGGERED_REPO }} run view --job ${{steps.integration_test_trigger.outputs.job_id}} --log
41+
42+
build:
43+
runs-on: ubuntu-latest
44+
strategy:
45+
max-parallel: 1
46+
matrix:
47+
python-version: [3.8]
48+
needs: integration_test
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: Set up Python ${{ matrix.python-version }}
52+
uses: actions/setup-python@v4
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
- name: Install dependencies
56+
run: |
57+
python -m pip install --upgrade pip setuptools wheel build
58+
pip install -r dev_requirements.txt
59+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
60+
- name: Run 📦 creation
61+
run: |
62+
python -m build --sdist
63+
- name: Publish 📦 to Jfrog
64+
uses: pypa/gh-action-pypi-publish@release/v1
65+
with:
66+
password: ${{ secrets.JFROG_PASSWORD }}
67+
user: ${{ secrets.JFROG_USER }}
68+
repository_url: https://ironsrc.jfrog.io/artifactory/api/pypi/pypi-local-release-py3
69+
- name: Archive package
70+
uses: actions/upload-artifact@v2
71+
with:
72+
name: ironsource-api
73+
path: dist

.github/workflows/main.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Python Pull-Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "ironsource_api/**"
9+
- "tests/**"
10+
tags-ignore:
11+
- '**'
12+
env:
13+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
14+
GH_TOKEN: ${{secrets.PAT_TOKEN}}
15+
16+
jobs:
17+
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
strategy:
22+
max-parallel: 1
23+
matrix:
24+
python-version: [3.8,3.9,'3.10']
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: Install dependencies
33+
run: |
34+
brew install gitleaks
35+
python -m pip install --upgrade pip setuptools wheel
36+
pip install -r dev_requirements.txt
37+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
38+
- name: Test with pytest
39+
run: |
40+
pytest -s --log-cli-level=INFO --timeout=3000 --color=auto --log-cli-format="%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)" ./tests/unit_tests/
41+
- name: Lint with pylint
42+
run: |
43+
pylint --rcfile ./.pylintrc ironsource_api
44+
45+
- name: gitleaks-action
46+
run: |
47+
gitleaks --verbose detect --log-opts --since="2021-11-25"
48+
49+

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
venv
2+
.idea
3+
ironsource_api/__init__.pyc
4+
ironsource_api/__pycache__/
5+
dist
6+
ironsource_api.egg-info
7+
__pycache__

.pylintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[MESSAGES CONTROL]
2+
disable=broad-except, too-many-arguments, too-many-locals,too-few-public-methods,duplicate-code
3+
4+
[FORMAT]
5+
max-line-length=240
6+

0 commit comments

Comments
 (0)