Commit Graph

4 Commits

Author SHA1 Message Date
9622f5d314 Migrate to poetry, nox and GitHub actions (#78)
* Replace setup files with pyproject.toml

Now we can use poetry to manage the package.
poetry install to install the package in a venv
poetry run ... to launch pylint, pytest or black

* Add CI with GitHub Action

Add a tests and release workflow
Add release drafter
Add dependabot

* Remove old CI based on travis and pylint

* Add linting configuration files

Linting mainly based on flake8 and plugins.
Add specific files for darglint and mypy.

* Update .gitignore

* Add test suite with nox and pre-commit

Test suite inculde pre-commit, safety, mypy, tests, typguard and documentation
checks.

* Add .gitattributes

* Update code coverage target to 80%

* Code style update by Black

* Update poetry lock file

* Deactivate temporarly some linting tests

* Add a contributing guide

* Remove Python 3.6 in GitHub Action

* Patch noxfile.py to be able to test mypy session

* Rebase version to 1.0.0
2020-10-21 21:38:25 +02:00
c9b8de00c5 Add logout method (#79) 2020-10-20 23:40:57 +02:00
0622bcf560 Refactor requests (#33)
* API discovery (SYNO.API.Info) + use Exceptions

- remove dsm_version
- use SynologyDSMRequestException for failed requests

* _discover_apis any time

* simplify requests

- Add api.request(api, method, params=None)

* Add connection failed tests

* Finalized ?

* Fix SynologyDSMRequestException not beeing SynologyDSMException

* Fix SynologyDSMAPINotExistsException not beeing SynologyDSMException

* Add Virtual Machine Manager API documentation

* Can get and post request

- Add error handling by API code

* Pylint

* Add get + post tests + SynologyDSMAPIErrorException
2020-04-22 14:00:27 +02:00
e393b1282c Add SYNO.API.Info to test constants + reorganize test consts (#31) 2020-04-14 14:01:58 +02:00