From 69815e401773d3e02c2a1d91fc2e0ffd22dbc4a4 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Wed, 20 Jan 2021 15:03:10 +0100 Subject: [PATCH] Start migration to Poetry. --- .bandit | 2 +- .pre-commit-config.yaml | 2 +- README.adoc | 6 +++--- pyproject.toml | 23 +++++++++++++++++++++++ {test => tests}/__init__.py | 0 {test => tests}/hid/__init__.py | 0 {test => tests}/hid/test_base.py | 0 {test => tests}/test_attestation.py | 0 {test => tests}/test_cbor.py | 0 {test => tests}/test_client.py | 0 {test => tests}/test_cose.py | 0 {test => tests}/test_ctap1.py | 0 {test => tests}/test_ctap2.py | 0 {test => tests}/test_hid.py | 0 {test => tests}/test_pcsc.py | 0 {test => tests}/test_rpid.py | 0 {test => tests}/test_server.py | 0 {test => tests}/test_tpm.py | 0 {test => tests}/test_utils.py | 0 {test => tests}/test_webauthn.py | 0 {test => tests}/utils.py | 0 21 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 pyproject.toml rename {test => tests}/__init__.py (100%) rename {test => tests}/hid/__init__.py (100%) rename {test => tests}/hid/test_base.py (100%) rename {test => tests}/test_attestation.py (100%) rename {test => tests}/test_cbor.py (100%) rename {test => tests}/test_client.py (100%) rename {test => tests}/test_cose.py (100%) rename {test => tests}/test_ctap1.py (100%) rename {test => tests}/test_ctap2.py (100%) rename {test => tests}/test_hid.py (100%) rename {test => tests}/test_pcsc.py (100%) rename {test => tests}/test_rpid.py (100%) rename {test => tests}/test_server.py (100%) rename {test => tests}/test_tpm.py (100%) rename {test => tests}/test_utils.py (100%) rename {test => tests}/test_webauthn.py (100%) rename {test => tests}/utils.py (100%) diff --git a/.bandit b/.bandit index ddc4ceb4..6e4e7d26 100644 --- a/.bandit +++ b/.bandit @@ -1,2 +1,2 @@ [bandit] -exclude: /test +exclude: /tests diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b52e498d..7c6eee6e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,4 +11,4 @@ repos: rev: 1.7.0 hooks: - id: bandit - exclude: ^test/ + exclude: ^tests/ diff --git a/README.adoc b/README.adoc index bc14e376..6b21bdda 100644 --- a/README.adoc +++ b/README.adoc @@ -94,15 +94,15 @@ https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md. === Development -For development of the library, we recommend using `pipenv`. To set up the dev +For development of the library, we recommend using `poetry`. To set up the dev environment, run this command in the root directory of the repository: - pipenv install --dev + poetry install ==== Running tests While many tests can run on their own, some require a connected U2F or FIDO2 device to run. - pipenv run test + poetry run pytest diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..54344989 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[tool.poetry] +name = "fido2" +version = "1.0.0-dev0" +description = "" +authors = ["Dain Nilsson "] + +[tool.poetry.dependencies] +python = "^3.6" +cryptography = "^2.1 || ^3.0" +dataclasses = {version = "^0.8", python = "<3.7"} +uhid-freebsd = {version = "^1.2.1", platform = "FreeBSD"} +pyscard = {version = "^1.9 || ^2.0.0", optional = true} + +[tool.poetry.dev-dependencies] +pytest = "^6.0" +mock = "^4.0.3" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + +[tool.pytest.ini_options] +testpaths = ["tests"] diff --git a/test/__init__.py b/tests/__init__.py similarity index 100% rename from test/__init__.py rename to tests/__init__.py diff --git a/test/hid/__init__.py b/tests/hid/__init__.py similarity index 100% rename from test/hid/__init__.py rename to tests/hid/__init__.py diff --git a/test/hid/test_base.py b/tests/hid/test_base.py similarity index 100% rename from test/hid/test_base.py rename to tests/hid/test_base.py diff --git a/test/test_attestation.py b/tests/test_attestation.py similarity index 100% rename from test/test_attestation.py rename to tests/test_attestation.py diff --git a/test/test_cbor.py b/tests/test_cbor.py similarity index 100% rename from test/test_cbor.py rename to tests/test_cbor.py diff --git a/test/test_client.py b/tests/test_client.py similarity index 100% rename from test/test_client.py rename to tests/test_client.py diff --git a/test/test_cose.py b/tests/test_cose.py similarity index 100% rename from test/test_cose.py rename to tests/test_cose.py diff --git a/test/test_ctap1.py b/tests/test_ctap1.py similarity index 100% rename from test/test_ctap1.py rename to tests/test_ctap1.py diff --git a/test/test_ctap2.py b/tests/test_ctap2.py similarity index 100% rename from test/test_ctap2.py rename to tests/test_ctap2.py diff --git a/test/test_hid.py b/tests/test_hid.py similarity index 100% rename from test/test_hid.py rename to tests/test_hid.py diff --git a/test/test_pcsc.py b/tests/test_pcsc.py similarity index 100% rename from test/test_pcsc.py rename to tests/test_pcsc.py diff --git a/test/test_rpid.py b/tests/test_rpid.py similarity index 100% rename from test/test_rpid.py rename to tests/test_rpid.py diff --git a/test/test_server.py b/tests/test_server.py similarity index 100% rename from test/test_server.py rename to tests/test_server.py diff --git a/test/test_tpm.py b/tests/test_tpm.py similarity index 100% rename from test/test_tpm.py rename to tests/test_tpm.py diff --git a/test/test_utils.py b/tests/test_utils.py similarity index 100% rename from test/test_utils.py rename to tests/test_utils.py diff --git a/test/test_webauthn.py b/tests/test_webauthn.py similarity index 100% rename from test/test_webauthn.py rename to tests/test_webauthn.py diff --git a/test/utils.py b/tests/utils.py similarity index 100% rename from test/utils.py rename to tests/utils.py