Skip to content

Commit 2fe226f

Browse files
Merge pull request #105 from Flutterwave/dev
Add deployment workflow to the repo
2 parents 78ea1b2 + d0a97ae commit 2fe226f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2423
-1277
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,31 @@ assignees: ''
77

88
---
99

10-
Have you read our [Code of Conduct](https://github.com/Flutterwave/Python/blob/master/CONTRIBUTING.md)? By filing an Issue, you are expected to comply with it, including treating everyone with respect
10+
Have you read our [Code of Conduct](https://github.com/Flutterwave/Python/blob/master/CONTRIBUTING.md)? By filing an Issue, you are expected to comply with it, including treating everyone with respect.
1111

12-
Do you want to ask a question? Are you looking for support? The developer slack is the best place for getting [support](https://bit.ly/34Vkzcg)
12+
# Description
13+
<!-- Description of the issue -->
1314

14-
### Description
15+
# Steps to Reproduce
1516

17+
1. <!-- First Step -->
18+
2. <!-- Second Step -->
19+
3. <!-- and so on… -->
1620

17-
### Steps to Reproduce
21+
## Expected behaviour
22+
<!-- What you expect to happen -->
1823

24+
## Actual behaviour
25+
<!-- What actually happens -->
1926

20-
**Expected behaviour:**
27+
## Reproduces how often
28+
<!-- What percentage of the time does it reproduce? -->
2129

30+
# Configuration
31+
- API Version: <!-- v2 or v3 -->
32+
- Environment: <!-- test mode or live mode -->
33+
- Browser: <!-- [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] -->
34+
- Language: <!-- [all | Node X.X | TypeScript X.X | Python X.X | ES6/7 | ES5 | Dart | Android X.X | PHP X.X | Laravel X.X ] -->
2235

23-
**Actual behaviour:**
24-
25-
26-
**Reproduces how often:**
27-
28-
29-
### Configuration
30-
31-
32-
### Additional Information
33-
36+
# Additional Information
37+
<!-- Any additional information, configuration or data that might be necessary to reproduce the issue e.g. detailed explanation, stack traces, related issues, suggestions on how to fix, links for us to have more context like StackOverflow, Gitter, etc. -->
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Review changes on Dev (Commits/PRs)
2+
3+
on:
4+
push:
5+
branches: ['dev']
6+
pull_request:
7+
types:
8+
- opened
9+
10+
jobs:
11+
code-check:
12+
runs-on: ubuntu-latest
13+
env:
14+
OS: ubuntu-latest
15+
PYTHON: '3.7'
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: '3.7'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements.txt
27+
28+
- name: run unit tests and coverage scan
29+
env:
30+
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}
31+
RAVE_SECRET_KEY: ${{ secrets.SECRET_KEY }}
32+
run: |
33+
pip install coverage
34+
coverage run test.py
35+
36+
- name: upload coverage report to codecov
37+
uses: codecov/codecov-action@v2
38+
39+
- name: push build status to Slack
40+
uses: 8398a7/action-slack@v3
41+
with:
42+
status: ${{ job.status }}
43+
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
44+
env:
45+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
46+
if: always()
Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,78 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
4-
name: Upload Python Package
1+
name: Publish to PyPi
52

63
on:
74
release:
85
types: [created]
96

107
jobs:
11-
deploy:
8+
check-docs-update:
9+
runs-on: ubuntu-latest
10+
env:
11+
OS: ubuntu-latest
12+
PYTHON: '3.7'
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: technote-space/get-diff-action@v6
16+
with:
17+
PATTERNS: |
18+
+(documentation)/*.md
19+
*.md
20+
CHANGE*.md
21+
FILES: |
22+
CHANGELOG.md
1223
13-
runs-on: ubuntu-latest
24+
- name: log git diff
25+
run: |
26+
echo ${{ env.GIT_DIFF }}
27+
echo ${{ env.MATCHED_FILES }}
28+
echo ${{ env.GIT_DIFF_FILTERED }}
1429
30+
- name: Check if README.md or Doc/** is updated else exit
31+
if: (env.GIT_DIFF == '')
32+
run: |
33+
echo Update documentation files and README.md before push
34+
exit 1
35+
36+
- name: push build status to Slack
37+
uses: 8398a7/action-slack@v3
38+
with:
39+
status: ${{ job.status }}
40+
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
41+
env:
42+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
43+
if: always()
44+
45+
46+
distribute:
47+
runs-on: ubuntu-latest
48+
env:
49+
OS: ubuntu-latest
50+
PYTHON: '3.7'
1551
steps:
1652
- uses: actions/checkout@v2
1753
- name: Set up Python
1854
uses: actions/setup-python@v2
1955
with:
20-
python-version: '3.x'
56+
python-version: '3.7'
57+
2158
- name: Install dependencies
2259
run: |
2360
python -m pip install --upgrade pip
2461
pip install setuptools wheel twine
62+
2563
- name: Build and publish
2664
env:
2765
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2866
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2967
run: |
3068
python setup.py sdist bdist_wheel
3169
twine upload dist/*
70+
71+
- name: push build status to Slack
72+
uses: 8398a7/action-slack@v3
73+
with:
74+
status: ${{ job.status }}
75+
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
76+
env:
77+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
78+
if: always()

.github/workflows/trello_issue_automation.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ build/
2222
dist/
2323
rave_python.egg-info/
2424
staging
25-
25+
zero
26+
.coverage
27+
example.py

CHANGELOG.MD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Title

CONTRIBUTING.md

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,13 @@ When you report an issue, it is important to:
1919
- Use a clear and descriptive title to help us to identify the problem.
2020
- Describe steps we can use to replicate the bug and be as precise as possible.
2121
- Include screenshots of the error messages.
22+
2223
2. Include details about your configuration and setup
2324
- What version of the library are you using?
2425
- Did you experience the bug on test mode or live?
2526
- Do you have the recommended versions of the library dependencies?
2627

2728
> 💡 Please make use of the issue template when reporting bugs.
28-
```markdown
29-
### Description
30-
31-
<!-- Description of the issue -->
32-
33-
### Steps to Reproduce
34-
35-
1. <!-- First Step -->
36-
2. <!-- Second Step -->
37-
3. <!-- and so on… -->
38-
39-
**Expected behaviour:**
40-
41-
<!-- What you expect to happen -->
42-
43-
**Actual behaviour:**
44-
45-
<!-- What actually happens -->
46-
47-
**Reproduces how often:**
48-
49-
<!-- What percentage of the time does it reproduce? -->
50-
51-
### Configuration
52-
53-
- API Version: <!-- v2 or v3 -->
54-
- Environment: <!-- test mode or live mode -->
55-
- Browser: <!-- [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] -->
56-
- Language: <!-- [all | Node X.X | TypeScript X.X | Python X.X | ES6/7 | ES5 | Dart | Android X.X | PHP X.X | Laravel X.X ] -->
57-
58-
### Additional Information
59-
60-
<!-- Any additional information, configuration or data that might be necessary to reproduce the issue e.g. detailed explanation, stack traces, related issues, suggestions on how to fix, links for us to have more context like StackOverflow, Gitter, etc. -->
61-
```
62-
6329
6430
### Requesting a feature
6531
If you need an additional feature added to the library, kindly send us an email at developers@flutterwavego.com. Be sure to include the following in your request:

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,5 +2828,9 @@ Read more about our community contribution guidelines [here](/CONTRIBUTING.md)
28282828
## License
28292829

28302830
By contributing to this library, you agree that your contributions will be licensed under its [MIT license](/LICENSE).
2831-
28322831
Copyright (c) Flutterwave Inc.
2832+
2833+
## Test section
2834+
Sample Description for teset file.
2835+
2836+
Final test 3 out of 10. Fingers crossed

example.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from rave_python import Rave, RaveExceptions, Misc
2+
PublicKey = "FLWPUBK-45587fdb1c84335354ab0fa388b803d5-X"
3+
SecretKey = "FLWSECK-2c9a2a781e56760b5d9c29c67ec22347-X"
4+
5+
rave = Rave(PublicKey, SecretKey, production=True, usingEnv=False)
6+
7+
accountDetails = {
8+
"email": "cornelius.ashley@outlook.com",
9+
"seckey": SecretKey,
10+
"is_permanent": True,
11+
"narration": "Yaovi Test",
12+
"bvn": "22169541783",
13+
"txRef": "sample1234"
14+
}
15+
print(rave.VirtualAccount.create(accountDetails))

0 commit comments

Comments
 (0)