Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump urllib3 from 1.25.11 to 1.26.3 #26

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ba64d0a
Add parameter verify_ssl (#76)
mib1185 Oct 19, 2020
3afe021
Move python file in src folder (#77)
oncleben31 Oct 19, 2020
7dda681
Add logout method (#79)
Quentame Oct 20, 2020
d5c3da2
Release 1.0.0
Quentame Oct 21, 2020
f90d149
Migrate to poetry, nox and GitHub actions (#78)
oncleben31 Oct 21, 2020
546c0c2
Bump pre-commit-hooks from 3.2.0 to 3.3.0 (#83)
dependabot[bot] Oct 21, 2020
02b80ec
Bump poetry from 1.0.10 to 1.1.3 in /.github/workflows (#82)
dependabot[bot] Oct 21, 2020
6962057
Bump release-drafter/release-drafter from v5.12.0 to v5.12.1 (#81)
dependabot[bot] Oct 21, 2020
c6b0b22
Bump mypy from 0.782 to 0.790 (#84)
dependabot[bot] Oct 21, 2020
fbdbe97
Fix a lot of flake8 linting errors (#85)
oncleben31 Oct 25, 2020
4156de8
Bump pygments from 2.7.1 to 2.7.2 (#87)
dependabot[bot] Oct 26, 2020
b7b8b4d
Bump virtualenv from 20.0.35 to 20.1.0 in /.github/workflows (#88)
dependabot[bot] Oct 26, 2020
a5dba9e
Bump poetry from 1.1.3 to 1.1.4 in /.github/workflows (#89)
dependabot[bot] Oct 26, 2020
adf7abf
Add Upgrade detail infos (#86)
mib1185 Oct 27, 2020
94d98ac
Bump pre-commit from 2.7.1 to 2.8.1 (#90)
dependabot[bot] Oct 29, 2020
43876f8
Bump pytest from 6.1.1 to 6.1.2 (#91)
dependabot[bot] Oct 29, 2020
38e2394
Fix MAC address may be empty if NAS uses PPPoE (#93)
Narmishka Oct 29, 2020
f8ff80c
Add CODEOWNERS (#94)
Narmishka Oct 30, 2020
b924e9c
Add missing code owner (#95)
Narmishka Oct 30, 2020
5d192bb
Bump pre-commit from 2.8.1 to 2.8.2 (#96)
dependabot[bot] Nov 2, 2020
3758d2a
Bump reorder-python-imports from 2.3.5 to 2.3.6 (#97)
dependabot[bot] Nov 2, 2020
9ef6fb9
Bump sphinx from 3.2.1 to 3.3.0 (#98)
dependabot[bot] Nov 3, 2020
35518eb
Update actions/checkout requirement to v2.3.4 (#99)
dependabot[bot] Nov 4, 2020
d28e92c
Bump actions/cache from v2.1.2 to v2.1.3 (#100)
dependabot[bot] Nov 11, 2020
9e33214
Bump requests from 2.24.0 to 2.25.0 (#101)
dependabot[bot] Nov 18, 2020
1e459e6
Bump codecov/codecov-action from v1.0.14 to v1.0.15 (#105)
dependabot[bot] Nov 18, 2020
da04bd7
Bump actions/upload-artifact from v2.2.0 to v2.2.1 (#104)
dependabot[bot] Nov 18, 2020
e9c290d
Bump actions/download-artifact from v2.0.5 to v2.0.6 (#103)
dependabot[bot] Nov 18, 2020
d05a278
Bump sphinx from 3.3.0 to 3.3.1 (#102)
dependabot[bot] Nov 18, 2020
ae0367f
Fix Upgrade API for DSM 6.1 (#106)
mib1185 Nov 18, 2020
d394fe3
Rename python-synology to synologydsm-api
Quentame Nov 19, 2020
7214129
Release 1.0.1
Quentame Nov 19, 2020
7a40291
Bump urllib3 from 1.25.11 to 1.26.3
dependabot[bot] Jan 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .darglint
@@ -0,0 +1,2 @@
[darglint]
strictness = short
15 changes: 15 additions & 0 deletions .flake8
@@ -0,0 +1,15 @@
[flake8]
select = B,B9,C,D,DAR,E,F,N,RST,S,W
# Some rules are ignore on top of the standard ones.
# C901 (complexity) will be processed in a dedicated PR
# DARxxx (documentation in docstrings) will be processed in a dedicated PR
# Final target is:
# ignore = E203,E501,RST201,RST203,RST301,W503
ignore = E203,E501,RST201,RST203,RST301,W503, C901, DAR101, DAR201
max-line-length = 80
max-complexity = 10
docstring-convention = google
per-file-ignores =
tests/*:S101
tests/**/const_*.py:B950
src/synology_dsm/const.py:B950
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto eol=lf
13 changes: 13 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1,13 @@
@Quentame

.github/* @oncleben31
.darglint @oncleben31
.flake8 @oncleben31

*/surveillance_station/* @shenxn
src/synology_dsm/api/core/share.py @Gestas
src/synology_dsm/api/core/system.py @mib1185
src/synology_dsm/api/core/upgrade.py @mib1185
tests/api_data/dsm_6/core/const_6_core_share.py @Gestas
tests/api_data/dsm_6/core/const_6_core_system.py @mib1185
tests/api_data/dsm_6/core/const_6_core_upgrade.py @mib1185
18 changes: 18 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: daily
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: daily
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
29 changes: 29 additions & 0 deletions .github/release-drafter.yml
@@ -0,0 +1,29 @@
categories:
- title: ":boom: Breaking Changes"
label: "breaking"
- title: ":rocket: Features"
label: "enhancement"
- title: ":fire: Removals and Deprecations"
label: "removal"
- title: ":beetle: Fixes"
label: "bug"
- title: ":racehorse: Performance"
label: "performance"
- title: ":rotating_light: Testing"
label: "testing"
- title: ":construction_worker: Continuous Integration"
label: "ci"
- title: ":books: Documentation"
label: "documentation"
- title: ":hammer: Refactoring"
label: "refactoring"
- title: ":lipstick: Style"
label: "style"
- title: ":package: Dependencies"
labels:
- "dependencies"
- "build"
template: |
## Changes
$CHANGES
5 changes: 5 additions & 0 deletions .github/workflows/constraints.txt
@@ -0,0 +1,5 @@
pip==20.2.4
nox==2020.8.22
nox-poetry==0.5.0
poetry==1.1.4
virtualenv==20.1.0
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,79 @@
name: Release

on:
push:
branches:
- main
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v2.1.4
with:
python-version: "3.9"

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version

- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version

- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"

- name: Detect and tag new version
id: check-version
if: steps.check-parent-commit.outputs.sha
uses: salsify/action-detect-and-tag-new-version@v2.0.1
with:
version-command: |
bash -o pipefail -c "poetry version | awk '{ print \$2 }'"

- name: Bump version for developmental release
if: "! steps.check-version.outputs.tag"
run: |
poetry version patch &&
version=$(poetry version | awk '{ print $2 }') &&
poetry version $version.dev.$(date +%s)

- name: Build package
run: |
poetry build --ansi

- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package on TestPyPI
if: "! steps.check-version.outputs.tag"
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish release notes
uses: release-drafter/release-drafter@v5.12.1
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140 changes: 140 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,140 @@
name: Tests

on:
- push
- pull_request

jobs:
tests:
name: ${{ matrix.session }} ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Commented session will be activated in the future
- { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" }
- { python-version: 3.9, os: ubuntu-latest, session: "safety" }
# - { python-version: 3.9, os: ubuntu-latest, session: "mypy" }
# - { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
# - { python-version: 3.7, os: ubuntu-latest, session: "mypy" }
- { python-version: 3.9, os: ubuntu-latest, session: "tests" }
- { python-version: 3.8, os: ubuntu-latest, session: "tests" }
- { python-version: 3.7, os: ubuntu-latest, session: "tests" }
- { python-version: 3.9, os: windows-latest, session: "tests" }
- { python-version: 3.9, os: macos-latest, session: "tests" }
# - { python-version: 3.9, os: ubuntu-latest, session: "typeguard" }
# - { python-version: 3.9, os: ubuntu-latest, session: "xdoctest" }
# - { python-version: 3.8, os: ubuntu-latest, session: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}

steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version

- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version

- name: Install Nox
run: |
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
nox --version

- name: Compute pre-commit cache key
if: matrix.session == 'pre-commit'
id: pre-commit-cache
shell: python
run: |
import hashlib
import sys

python = "py{}.{}".format(*sys.version_info[:2])
payload = sys.version.encode() + sys.executable.encode()
digest = hashlib.sha256(payload).hexdigest()
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8])

print("::set-output name=result::{}".format(result))

- name: Restore pre-commit cache
uses: actions/cache@v2.1.3
if: matrix.session == 'pre-commit'
with:
path: ~/.cache/pre-commit
key: ${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ steps.pre-commit-cache.outputs.result }}-

- name: Run Nox
run: |
nox --force-color --python=${{ matrix.python-version }}

- name: Upload coverage data
if: always() && matrix.session == 'tests'
uses: "actions/upload-artifact@v2.2.1"
with:
name: coverage-data
path: ".coverage.*"

- name: Upload documentation
if: matrix.session == 'docs-build'
uses: actions/upload-artifact@v2.2.1
with:
name: docs
path: docs/_build

coverage:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4

- name: Set up Python 3.9
uses: actions/setup-python@v2.1.4
with:
python-version: 3.9

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version

- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version

- name: Install Nox
run: |
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
nox --version

- name: Download coverage data
uses: actions/download-artifact@v2.0.6
with:
name: coverage-data

- name: Combine coverage data and display human readable report
run: |
nox --force-color --session=coverage

- name: Create coverage report
run: |
nox --force-color --session=coverage -- xml

- name: Upload coverage report
uses: codecov/codecov-action@v1.0.15
14 changes: 14 additions & 0 deletions .gitignore
@@ -1,3 +1,17 @@
# From cookiecutter-hypermodern-python
.mypy_cache/
/.coverage
/.nox/
/.python-version
/.pytype/
/dist/
/docs/_build/
/src/*.egg-info/
__pycache__/

# Following are kept for not anoying current developers. Could be remove in
# a future package release.

# Python
*.py[cod]

Expand Down
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,51 @@
repos:
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
require_serial: true
- id: check-added-large-files
name: Check for added large files
entry: check-added-large-files
language: system
- id: check-toml
name: Check Toml
entry: check-toml
language: system
types: [toml]
- id: check-yaml
name: Check Yaml
entry: check-yaml
language: system
types: [yaml]
- id: end-of-file-fixer
name: Fix End of Files
entry: end-of-file-fixer
language: system
types: [text]
stages: [commit, push, manual]
- id: flake8
name: flake8
entry: flake8
language: system
types: [python]
require_serial: true
- id: reorder-python-imports
name: Reorder python imports
entry: reorder-python-imports
language: system
types: [python]
args: [--application-directories=src]
- id: trailing-whitespace
name: Trim Trailing Whitespace
entry: trailing-whitespace-fixer
language: system
types: [text]
stages: [commit, push, manual]
- repo: https://github.com/prettier/prettier
rev: 2.1.2
hooks:
- id: prettier