backo 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- backo-0.0.1/.github/workflows/pylint.yml +24 -0
- backo-0.0.1/.github/workflows/release.yml +28 -0
- backo-0.0.1/.github/workflows/test.yml +26 -0
- backo-0.0.1/.gitignore +5 -0
- backo-0.0.1/.pylintrc +33 -0
- backo-0.0.1/CHANGELOG.md +18 -0
- backo-0.0.1/CONTRIBUTING.md +56 -0
- backo-0.0.1/LICENSE +21 -0
- backo-0.0.1/PKG-INFO +563 -0
- backo-0.0.1/README.md +527 -0
- backo-0.0.1/backo/__init__.py +25 -0
- backo-0.0.1/backo/action.py +89 -0
- backo-0.0.1/backo/api_toolbox.py +75 -0
- backo-0.0.1/backo/backoffice.py +100 -0
- backo-0.0.1/backo/collection.py +415 -0
- backo-0.0.1/backo/current_user.py +51 -0
- backo-0.0.1/backo/db_connector.py +92 -0
- backo-0.0.1/backo/db_mongo_connector.py +192 -0
- backo-0.0.1/backo/db_yml_connector.py +146 -0
- backo-0.0.1/backo/error.py +57 -0
- backo-0.0.1/backo/item.py +361 -0
- backo-0.0.1/backo/log.py +168 -0
- backo-0.0.1/backo/meta_data_handler.py +118 -0
- backo-0.0.1/backo/patch.py +34 -0
- backo-0.0.1/backo/reference.py +715 -0
- backo-0.0.1/backo/request_decorators.py +104 -0
- backo-0.0.1/backo/status.py +18 -0
- backo-0.0.1/backo/transaction.py +64 -0
- backo-0.0.1/backo/view.py +60 -0
- backo-0.0.1/pyproject.toml +29 -0
- backo-0.0.1/requirements.txt +4 -0
- backo-0.0.1/tests/__init__.py +18 -0
- backo-0.0.1/tests/test_action.py +138 -0
- backo-0.0.1/tests/test_api_toolbox.py +57 -0
- backo-0.0.1/tests/test_crud.py +201 -0
- backo-0.0.1/tests/test_log.py +40 -0
- backo-0.0.1/tests/test_mongo.py +218 -0
- backo-0.0.1/tests/test_reference.py +782 -0
- backo-0.0.1/tests/test_routes.py +298 -0
- backo-0.0.1/tests/test_view.py +94 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Pylint
|
|
2
|
+
|
|
3
|
+
on: [ push, pull_request ]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ["3.10"]
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
14
|
+
uses: actions/setup-python@v3
|
|
15
|
+
with:
|
|
16
|
+
python-version: ${{ matrix.python-version }}
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: |
|
|
19
|
+
python -m pip install --upgrade pip
|
|
20
|
+
python -m pip install pylint
|
|
21
|
+
python -m pip install -r requirements.txt
|
|
22
|
+
- name: Analysing the code with pylint
|
|
23
|
+
run: |
|
|
24
|
+
pylint $(git ls-files '*.py')
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Build_Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ["3.10"]
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
16
|
+
uses: actions/setup-python@v3
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python-version }}
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade pip
|
|
22
|
+
python3 -m pip install --upgrade build
|
|
23
|
+
python3 -m pip install --upgrade twine
|
|
24
|
+
python -m pip install -r requirements.txt
|
|
25
|
+
- name: uploading package
|
|
26
|
+
run: |
|
|
27
|
+
python3 -m build
|
|
28
|
+
python3 -m twine upload --username ${{ secrets.PYPI_LOGIN }} --password ${{ secrets.PYPI_PASSWORD }} dist/*
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: CodeCov
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ["3.10"]
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
14
|
+
uses: actions/setup-python@v3
|
|
15
|
+
with:
|
|
16
|
+
python-version: ${{ matrix.python-version }}
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: |
|
|
19
|
+
python -m pip install --upgrade pip
|
|
20
|
+
python -m pip install coverage[toml]
|
|
21
|
+
python -m pip install -r requirements.txt
|
|
22
|
+
- name: run tests and coverage
|
|
23
|
+
run: |
|
|
24
|
+
coverage run -m unittest tests
|
|
25
|
+
- name: Coverage Badge
|
|
26
|
+
uses: tj-actions/coverage-badge-py@v2
|
backo-0.0.1/.gitignore
ADDED
backo-0.0.1/.pylintrc
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[MASTER]
|
|
2
|
+
init-hook='import sys; sys.path.append("../stricto")'
|
|
3
|
+
|
|
4
|
+
[DESIGN]
|
|
5
|
+
max-attributes=16
|
|
6
|
+
max-args = 7
|
|
7
|
+
max-positional-arguments = 7
|
|
8
|
+
|
|
9
|
+
[FORMAT]
|
|
10
|
+
max-line-length=240
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[SIMILARITIES]
|
|
14
|
+
|
|
15
|
+
# Minimum lines number of a similarity.
|
|
16
|
+
min-similarity-lines=10
|
|
17
|
+
|
|
18
|
+
# Ignore comments when computing similarities.
|
|
19
|
+
ignore-comments=yes
|
|
20
|
+
|
|
21
|
+
# Ignore docstrings when computing similarities.
|
|
22
|
+
ignore-docstrings=yes
|
|
23
|
+
|
|
24
|
+
# Ignore imports when computing similarities.
|
|
25
|
+
ignore-imports=no
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
[MESSAGES CONTROL]
|
|
29
|
+
disable =
|
|
30
|
+
wrong-import-position,
|
|
31
|
+
dangerous-default-value,
|
|
32
|
+
super-init-not-called, # Bug ?
|
|
33
|
+
protected-access # must be removed
|
backo-0.0.1/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
# Change Log
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [0.0.1]
|
|
11
|
+
|
|
12
|
+
First version
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Contributing to ctricto
|
|
2
|
+
|
|
3
|
+
Help wanted! We'd love your contributions to backo. Please review the following guidelines before contributing. Also, feel free to propose changes to these guidelines by updating this file and submitting a pull request.
|
|
4
|
+
|
|
5
|
+
- [I have a question...](#questions)
|
|
6
|
+
- [I found a bug...](#bugs)
|
|
7
|
+
- [I have a feature request...](#features)
|
|
8
|
+
- [I have a contribution to share...](#process)
|
|
9
|
+
|
|
10
|
+
## <a id="questions"></a> Have a Question?
|
|
11
|
+
|
|
12
|
+
Please don't open a GitHub issue for questions about how to use `backo`, as the goal is to use issues for managing bugs and feature requests. Issues that are related to general support will be closed and redirected to our gitter room.
|
|
13
|
+
|
|
14
|
+
For all support related questions, please use [discussions](https://github.com/bwallrich/backo/discussions).
|
|
15
|
+
|
|
16
|
+
## <a id="bugs"></a> Found a Bug?
|
|
17
|
+
|
|
18
|
+
If you've identified a bug in `backo`, please [submit an issue](#issue) to our GitHub repo: [bwallrich/backo](https://github.com/bwallrich/backo/issues/new). Please also feel free to submit a [Pull Request](#pr) with a fix for the bug!
|
|
19
|
+
|
|
20
|
+
## <a id="features"></a> Have a Feature Request?
|
|
21
|
+
|
|
22
|
+
All feature requests should start with [submitting an issue](#issue) documenting the user story and acceptance criteria. Again, feel free to submit a [Pull Request](#pr) with a proposed implementation of the feature.
|
|
23
|
+
|
|
24
|
+
If you are not sure, go to [discussions](https://github.com/bwallrich/backo/discussions)
|
|
25
|
+
|
|
26
|
+
## <a id="process"></a> Ready to Contribute
|
|
27
|
+
|
|
28
|
+
### <a id="issue"></a> Create an issue
|
|
29
|
+
|
|
30
|
+
Before submitting a new issue, please search the issues to make sure there isn't a similar issue doesn't already exist.
|
|
31
|
+
|
|
32
|
+
Assuming no existing issues exist, please ensure you include required information when submitting the issue to ensure we can quickly reproduce your issue.
|
|
33
|
+
|
|
34
|
+
We may have additional questions and will communicate through the GitHub issue, so please respond back to our questions to help reproduce and resolve the issue as quickly as possible.
|
|
35
|
+
|
|
36
|
+
New issues can be created with in our [GitHub repo](https://github.com/bwallrich/backo/issues/new).
|
|
37
|
+
|
|
38
|
+
### <a id="pr"></a>Pull Requests
|
|
39
|
+
|
|
40
|
+
Pull requests should target the `master` branch. Please also reference the issue from the description of the pull request using [special keyword syntax](https://help.github.com/articles/closing-issues-via-commit-messages/) to auto close the issue when the PR is merged. For example, include the phrase `fixes #14` in the PR description to have issue #14 auto close.
|
|
41
|
+
|
|
42
|
+
### <a id="style"></a> Styleguide
|
|
43
|
+
|
|
44
|
+
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Here are only one point to keep it mind : [pylint](https://pypi.org/project/pylint/) is strict in ci-cd. Your code must be compliant 100% to it (otherwise your push/pull will be rejected).
|
|
45
|
+
|
|
46
|
+
Please use **sparingly**
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
# pylint: disable something...
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### License
|
|
53
|
+
|
|
54
|
+
By contributing your code, you agree to license your contribution under the terms of the [MIT License](https://github.com/bwallrich/backo/blob/main/LICENSE).
|
|
55
|
+
|
|
56
|
+
All files are released with this licence.
|
backo-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Bertrand Wallrich
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|