Skip to content

Commit 613be9f

Browse files
zulquerdanielcivit
authored andcommitted
Release of 1.0.0rc1
0 parents  commit 613be9f

File tree

333 files changed

+24159
-0
lines changed

Some content is hidden

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

333 files changed

+24159
-0
lines changed

.coveragerc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[run]
2+
source =
3+
src
4+
tests
5+
omit =
6+
env/

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
API_KEY=
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Code quality checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
code-quality:
13+
name: Code quality checks
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
18+
steps:
19+
- name: Checkout master repository
20+
uses: actions/checkout@v4
21+
with:
22+
path: ./multisafepay-python
23+
24+
- name: Clone MultiSafepay docker python
25+
uses: actions/checkout@v4
26+
with:
27+
repository: MultiSafepay/docker-python
28+
token: ${{ secrets.GLOBAL_GITHUB_TOKEN }}
29+
path: ./docker-python
30+
submodules: 'false'
31+
32+
- name: Setup submodule
33+
run: |
34+
rm -rf ./docker-python/packages-source/multisafepay/multisafepay-python
35+
mv ./multisafepay-python ./docker-python/packages-source/multisafepay/multisafepay-python
36+
37+
- name: Copy environment file
38+
run: cp .env.example .env
39+
working-directory: ./docker-python
40+
41+
- name: Replace environment variable
42+
run: sed -i "s/^PYTHON_VERSION=.*/PYTHON_VERSION=${{ matrix.python-version }}/" .env
43+
working-directory: ./docker-python
44+
45+
- name: Setup containers and application
46+
run: bin/setup
47+
working-directory: ./docker-python
48+
49+
- name: Run linting
50+
run: bin/lint
51+
working-directory: ./docker-python
52+
53+
- name: Static type checker
54+
run: bin/static-type-check
55+
working-directory: ./docker-python
56+
57+
- name: Run tests
58+
run: bin/test-report
59+
working-directory: ./docker-python
60+
61+
- name: Upload coverage file to Codecov
62+
uses: codecov/codecov-action@v5
63+
with:
64+
fail_ci_if_error: true
65+
files: ./docker-python/packages-source/multisafepay/multisafepay-python/coverage.xml
66+
token: ${{ secrets.CODECOV_TOKEN }}
67+
verbose: true

.gitignore

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
# Mac files
132+
.DS_Store

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
5+
- id: format-check
6+
name: Format code check
7+
entry: docker compose exec -T app make format-check
8+
language: system
9+
always_run: true
10+
pass_filenames: false
11+
12+
- id: lint
13+
name: Run all linters
14+
entry: docker compose exec -T app make lint
15+
language: system
16+
always_run: true
17+
pass_filenames: false
18+
19+
- id: static-type-check
20+
name: Static type checker
21+
entry: docker compose exec -T app make static-type-check
22+
language: system
23+
always_run: true
24+
pass_filenames: false
25+
26+
- id: test
27+
name: Run tests
28+
entry: docker compose exec -T app make test
29+
language: system
30+
always_run: true
31+
pass_filenames: false
32+
33+
- id: test-e2e
34+
name: Run tests e2e
35+
entry: docker compose exec -T app make test-e2e
36+
language: system
37+
always_run: true
38+
pass_filenames: false

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported
58+
by contacting someone listed as a [project maintainer](README.md#maintainers).
59+
All complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [https://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: https://contributor-covenant.org
74+
[version]: https://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Contributing Guidelines
2+
3+
🎉 First off, thanks for taking the time to contribute! 🎉
4+
5+
The following is a set of guidelines for contributing to this repository.
6+
7+
Before contributing, we encourage you to also read our [LICENSE](LICENSE) and [README](README.md) files, also found in this repository. If you have any questions not answered by the content of this repository, please don't hesitate to post in the discussions thread.
8+
9+
## How Can I Contribute?
10+
11+
### Report a bug
12+
13+
If you think you have found a bug in this tool, we'd love your help identifying and fixing it. To do so, please follow these guidelines:
14+
15+
1. **Search the issue list:** Check to see if anyone has reported a similar issue. If so, comment on that issue with additional details or context.
16+
1. **Use the issue template** If no one else has reported it yet, please submit a new issue and select the `Bug Report` template. This is populated with the following sections:
17+
- **Overview:** Succinctly describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior
18+
- **Steps to Reproduce:** Describe the exact steps which reproduce the problem in as many details as possible. For example, start by explaining how you got to the page where you encountered the bug.
19+
- **Expected Behavior:** Explain which behavior you expected to see instead, why, and how the behavior you saw failed to meet that expectation.
20+
- **Screenshots:** Include screenshots and animated GIFs if possible, which show you following the described steps and clearly demonstrate the problem.
21+
- **Your Environment:** List the technical details about your computer and/or development environment.
22+
1. **Check the Bug Tracker:** Check the status of your bug by referencing the Bug Tracker project board on the project tab.
23+
24+
### Request new functionality
25+
26+
If you don't have specific language or code to submit but would like to suggest a change, request a feature,
27+
or have something addressed, we'd love to get your feedback. To request new functionality, please follow these guidelines:
28+
29+
1. **Search the issue list:** Check the list of existing issues to see if anyone has requested a similar feature or functionality. If so, feel free to comment on that issue with more context or details.
30+
1. **Use the issue template** If no one else has requested something similar, please submit a new issue and select the `Feature Request` template. This is populated with the following sections:
31+
- **Feature Overview:** Brief description of the feature you want added to this tool. Along with some details about how it should function and whether it's related to a specific problem you're encountering.
32+
- **Alternatives Considered:** What other options might exist to achieve the same functionality with the existing tool. Why aren't those workarounds sufficient.
33+
- **Additional Context:** Anything else we should know about this request?
34+
1. **Check the Feature Roadmap:** Check the status of your request by referencing the Feature Roadmap project board on the project tab.
35+
36+
> **NOTE:** Not all feature requests will be implemented. The project maintainers will review each feature request and consider scoping it into the roadmap or explaining why the feature won't be implemented.
37+
38+
### Contribute to the codebase
39+
40+
If you've implemented a new feature, fixed a bug, or made some documentation clearer, we'd love to consider your contribution to this tool. In order to submit a contribution, please follow these steps:
41+
42+
1. **Fork the repo:** Create a copy of this repo where you can make your proposed changes by [following the Github forking methodology](https://docs.github.com/en/github/getting-started-with-github/quickstart/fork-a-repo).
43+
1. **Find or create an issue:** Before proposing a change, make sure there is a corresponding issue (i.e. Bug Fix, Task, Feature Request) that describes the contribution you'll be making. If there isn't an existing issue, create a new one by selecting and filling out a template from the issue tab.
44+
1. **Create a feature branch:** Create a feature branch on your forked repository with a descriptive name, ideally one that references the issue number that your contribution is related to (e.g., `issue-10-unit-testing`).
45+
1. **Make changes and test them:** Add your code or documentation and commit those changes to the feature branch. If your contribution includes code, make sure you've written tests for it and that all of the tests are passing.
46+
1. **Submit a pull request** When you're ready to make your contribution, [submit a pull request against the upstream repo.](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) and fill out the PR template sections so that project maintainers can begin to review your contributions.
47+
1. **Fix requested changes:** As maintainers review your proposed contribution, they may request specific changes. If so, simply add and commit those changes to the feature branch directly and they'll automatically show up on the PR.
48+
1. **Celebrate:** Once all of the requested changes are made, your commits will be merged into the `main` branch. Time to give yourself a hand because you just added to this project!!!
49+
50+
51+
## Resources
52+
53+
To learn more about contributing best practices or how to use GitHub for code collaboration, don't hesitate to check these resources out:
54+
55+
- [GitHub Tutorials](https://lab.github.com/)
56+
- [How to contribute to open source software](https://opensource.guide/how-to-contribute/)

0 commit comments

Comments
 (0)