diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index f85c010..0000000 --- a/.coveragerc +++ /dev/null @@ -1,3 +0,0 @@ -[report] -omit = - */site-packages/* diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 871fff4..0000000 --- a/.editorconfig +++ /dev/null @@ -1,11 +0,0 @@ -root = true - -[*] -end_of_line = LF -charset = utf-8 - -[*.py] -indent_style = space -indent_size = 4 -trim_traling_whitespace = true -max_linewidth = 80 diff --git a/.flake8 b/.flake8 index e4ea1be..44b01a3 100644 --- a/.flake8 +++ b/.flake8 @@ -1,11 +1,12 @@ [flake8] -inline-quotes = double application_import_names = crabpy,tests -exclude = - .venv, - ./venv, - __pycache__ import-order-style = pycharm -max-line-length = 90 -select = C,E,F,W,B,B950 -extend-ignore = E203, E501, W503 + +extend-exclude = + .pytest_cache +filename = + ./tests/**.py + ./crabpy/**.py +max-line-length = 80 +extend-select = B950 +extend-ignore = E203,E501,E701 \ No newline at end of file diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 0000000..8888cd4 --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,3 @@ +feature: ['feature/*', 'feat/*'] +fix: ['bugfix/*', 'fix/*'] +test: test/* diff --git a/.github/workflows/backend.yaml b/.github/workflows/backend.yaml new file mode 100644 index 0000000..b466a2f --- /dev/null +++ b/.github/workflows/backend.yaml @@ -0,0 +1,45 @@ +name: crabpy tests + +on: + push: + paths: + - crabpy/** + - tests/** + - .github/workflows/backend.yaml + - pyproject.toml + - requirements*.txt + +env: + CRABPY_INTEGRATION_TESTS: "true" + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.10", "3.11", "3.12" ] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install python requirements + run: | + pip install pip-tools + pip-sync requirements-dev.txt + pip install -e . + + - name: Python tests + run: | + flake8 + coverage run --source=crabpy -m pytest tests --crab-integration --capakey-integration + + - name: Coveralls + uses: coverallsapp/github-action@v2 diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000..6d41fc2 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,22 @@ +name: PR Labeler +on: + pull_request: + types: [opened] + branches: + - 'develop' + - 'epic' + +permissions: + contents: read + +jobs: + pr-labeler: + permissions: + contents: read # for TimonVS/pr-labeler-action to read config file + pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@v4 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/pr-labeler.yml diff --git a/.gitignore b/.gitignore index a79f6ad..91495bb 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ pip-log.txt .coverage .tox nosetests.xml +.pytest_cache/ # Cache files @@ -39,3 +40,6 @@ dogpile_data # Pycharm .idea/ + +# Environments +.venv/ \ No newline at end of file diff --git a/.noseids b/.noseids deleted file mode 100644 index f151dc1..0000000 --- a/.noseids +++ /dev/null @@ -1,1019 +0,0 @@ -(dp1 -S'failed' -p2 -(lp3 -S'200' -p4 -asS'source_names' -p5 -(lp6 -S'.' -aS'200' -p7 -asS'ids' -p8 -(dp9 -I1 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -S'crabpy.tests.gateway.test_capakey' -p10 -S'AfdelingTests.test_check_gateway_not_set' -tp11 -sI2 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'AfdelingTests.test_fully_initialised' -tp12 -sI3 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'AfdelingTests.test_lazy_load' -tp13 -sI4 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'AfdelingTests.test_secties' -tp14 -sI5 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'AfdelingTests.test_to_string_not_fully_initialised' -tp15 -sI6 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_cache_is_configured' -tp16 -sI7 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_get_gemeente_by_id' -tp17 -sI8 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_get_kadastrale_afdeling_by_id' -tp18 -sI9 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_get_perceel_by_capakey' -tp19 -sI10 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_get_perceel_by_id_and_sectie' -tp20 -sI11 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_get_perceel_by_percid' -tp21 -sI12 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_get_sectie_by_id_and_afdeling' -tp22 -sI13 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_list_afdelingen' -tp23 -sI14 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_list_afdelingen_by_gemeente' -tp24 -sI15 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_list_gemeenten' -tp25 -sI16 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_list_gemeenten_different_sort' -tp26 -sI17 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_list_percelen_by_sectie' -tp27 -sI18 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyCachedGatewayTests.test_list_secties_by_afdeling_id' -tp28 -sI19 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_get_gemeente_by_id' -tp29 -sI20 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_get_gemeente_by_invalid_id' -tp30 -sI21 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_get_kadastrale_afdeling_by_id' -tp31 -sI22 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_get_perceel_by_capakey' -tp32 -sI23 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_get_perceel_by_id_and_sectie' -tp33 -sI24 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_get_perceel_by_percid' -tp34 -sI25 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_get_sectie_by_id_and_afdeling' -tp35 -sI26 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_afdelingen' -tp36 -sI27 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_afdelingen_by_gemeente' -tp37 -sI28 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_afdelingen_by_gemeente_id' -tp38 -sI29 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_gemeenten' -tp39 -sI30 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_gemeenten_invalid_auth' -tp40 -sI31 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_percelen_by_sectie' -tp41 -sI32 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_secties_by_afdeling' -tp42 -sI33 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'CapakeyGatewayTests.test_list_secties_by_afdeling_id' -tp43 -sI34 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'GemeenteTests.test_afdelingen' -tp44 -sI35 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'GemeenteTests.test_check_gateway_not_set' -tp45 -sI36 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'GemeenteTests.test_fully_initialised' -tp46 -sI37 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'GemeenteTests.test_lazy_load' -tp47 -sI38 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'GemeenteTests.test_str_and_repr_dont_lazy_load' -tp48 -sI39 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'PerceelTests.test_check_gateway_not_set' -tp49 -sI40 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'PerceelTests.test_fully_initialised' -tp50 -sI41 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'PerceelTests.test_lazy_load' -tp51 -sI42 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'PerceelTests.test_parse_capakey' -tp52 -sI43 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'PerceelTests.test_parse_capakey_other_sectie' -tp53 -sI44 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'PerceelTests.test_parse_invalid_capakey' -tp54 -sI45 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'SectieTests.test_check_gateway_not_set' -tp55 -sI46 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'SectieTests.test_fully_initialised' -tp56 -sI47 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'SectieTests.test_lazy_load' -tp57 -sI48 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_capakey.py' -g10 -S'SectieTests.test_percelen' -tp58 -sI49 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -S'crabpy.tests.gateway.test_crab' -p59 -S'CrabCachedGatewayTests.test_cache_is_configured' -tp60 -sI50 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_gemeente_by_id' -tp61 -sI51 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_gemeente_by_niscode' -tp62 -sI52 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_huisnummer_by_id' -tp63 -sI53 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_huisnummer_by_nummer_and_straat' -tp64 -sI54 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_postkanton_by_huisnummer' -tp65 -sI55 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_straat_by_id' -tp66 -sI56 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_wegobject_by_id' -tp67 -sI57 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_get_wegsegment_by_id' -tp68 -sI58 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardadressen' -tp69 -sI59 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardadressen_different_sort' -tp70 -sI60 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardgebouwen' -tp71 -sI61 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardgebouwen_different_sort' -tp72 -sI62 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardterreinobjecten' -tp73 -sI63 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardterreinobjecten_different_sort' -tp74 -sI64 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardwegobjecten' -tp75 -sI65 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_aardwegobjecten_different_sort' -tp76 -sI66 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_bewerkingen' -tp77 -sI67 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_bewerkingen_different_sort' -tp78 -sI68 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_gemeenten' -tp79 -sI69 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_gemeenten_different_sort' -tp80 -sI70 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_geometriemethodegebouwen' -tp81 -sI71 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_geometriemethodegebouwen_different_sort' -tp82 -sI72 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_geometriemethodewegsegmenten' -tp83 -sI73 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_geometriemethodewegsegmenten_different_sort' -tp84 -sI74 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_gewesten' -tp85 -sI75 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_gewesten_different_sort' -tp86 -sI76 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_herkomstadrespositie' -tp87 -sI77 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_herkomstadrespositie_different_sort' -tp88 -sI78 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_huisnummers_by_straat' -tp89 -sI79 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_huisnummers_by_straat_different_sort' -tp90 -sI80 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_organisaties' -tp91 -sI81 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_organisaties_different_sort' -tp92 -sI82 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_postkantons_by_gemeente' -tp93 -sI83 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statusgebouwen' -tp94 -sI84 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statusgebouwen_different_sort' -tp95 -sI85 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statushuisnummers' -tp96 -sI86 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statushuisnummers_different_sort' -tp97 -sI87 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statusstraatnamen' -tp98 -sI88 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statusstraatnamen_different_sort' -tp99 -sI89 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statussubadressen' -tp100 -sI90 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statussubadressen_different_sort' -tp101 -sI91 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statuswegsegmenten' -tp102 -sI92 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_statuswegsegmenten_different_sort' -tp103 -sI93 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_straten' -tp104 -sI94 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_straten_different_sort' -tp105 -sI95 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_talen' -tp106 -sI96 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_talen_different_sort' -tp107 -sI97 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_wegobjecten_by_straat' -tp108 -sI98 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabCachedGatewayTests.test_list_wegsegmenten_by_straat' -tp109 -sI99 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_gemeente_by_id' -tp110 -sI100 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_gemeente_by_niscode' -tp111 -sI101 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_huisnummer_by_id' -tp112 -sI102 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_huisnummer_by_nummer_and_straat' -tp113 -sI103 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_postkanton_by_huisnummer' -tp114 -sI104 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_straat_by_id' -tp115 -sI105 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_wegobject_by_id' -tp116 -sI106 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_get_wegsegment_by_id' -tp117 -sI107 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_aardadressen' -tp118 -sI108 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_aardgebouwen' -tp119 -sI109 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_aardsubadressen' -tp120 -sI110 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_aardterreinobjecten' -tp121 -sI111 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_aarwegobjecten' -tp122 -sI112 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_bewerkingen' -tp123 -sI113 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_gemeenten' -tp124 -sI114 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_gemetriemethodegebouwen' -tp125 -sI115 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_geometriemethodewegsegmenten' -tp126 -sI116 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_gewesten' -tp127 -sI117 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_herkomstadrespositie' -tp128 -sI118 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_huisnummers_by_straat' -tp129 -sI119 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_organisaties' -tp130 -sI120 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_postkantons_by_gemeente' -tp131 -sI121 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_statusgebouwen' -tp132 -sI122 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_statushuisnummers' -tp133 -sI123 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_statusstraatnamen' -tp134 -sI124 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_statussubadressen' -tp135 -sI125 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_statuswegsegmenten' -tp136 -sI126 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_straten' -tp137 -sI127 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_talen' -tp138 -sI128 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_wegobjecten_by_straat' -tp139 -sI129 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'CrabGatewayTests.test_list_wegsegmenten_by_straat' -tp140 -sI130 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GemeenteTests.test_check_gateway_not_set' -tp141 -sI131 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GemeenteTests.test_fully_initialised' -tp142 -sI132 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GemeenteTests.test_lazy_load' -tp143 -sI133 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GemeenteTests.test_postkantons' -tp144 -sI134 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GemeenteTests.test_str_and_repr_dont_lazy_load' -tp145 -sI135 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GemeenteTests.test_straten' -tp146 -sI136 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GewestTests.test_check_gateway_not_set' -tp147 -sI137 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GewestTests.test_fully_initialised' -tp148 -sI138 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GewestTests.test_gemeenten' -tp149 -sI139 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'GewestTests.test_str_and_repr_dont_lazy_load' -tp150 -sI140 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'HuisnummerTests.test_check_gateway_not_set' -tp151 -sI141 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'HuisnummerTests.test_fully_initialised' -tp152 -sI142 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'HuisnummerTests.test_postkanton' -tp153 -sI143 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'HuisnummerTests.test_status' -tp154 -sI144 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'PostkantonTests.test_fully_initialised' -tp155 -sI145 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_check_gateway_not_set' -tp156 -sI146 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_fully_initialised' -tp157 -sI147 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_gemeente' -tp158 -sI148 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_huisnummers' -tp159 -sI149 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_lazy_load' -tp160 -sI150 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_status' -tp161 -sI151 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_str_and_repr_dont_lazy_load' -tp162 -sI152 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'StraatTests.test_taal_id' -tp163 -sI153 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'TaalTests.test_fully_initialised' -tp164 -sI154 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegobjectTests.test_aard' -tp165 -sI155 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegobjectTests.test_check_gateway_not_set' -tp166 -sI156 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegobjectTests.test_fully_initialised' -tp167 -sI157 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegobjectTests.test_lazy_load' -tp168 -sI158 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegsegmentTests.test_check_gateway_not_set' -tp169 -sI159 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegsegmentTests.test_fully_initialised' -tp170 -sI160 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegsegmentTests.test_lazy_load' -tp171 -sI161 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegsegmentTests.test_methode' -tp172 -sI162 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g59 -S'WegsegmentTests.test_status' -tp173 -sI163 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_exception.py' -S'crabpy.tests.gateway.test_exception' -S'ExceptionTests.test_inheritance' -tp174 -sI164 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_client.py' -S'crabpy.tests.test_client' -p175 -S'CapakeyClientTests.test_list_gemeenten' -tp176 -sI165 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_client.py' -g175 -S'CapakeyClientTests.test_override_wsdl' -tp177 -sI166 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_client.py' -g175 -S'CapakeyClientTests.test_user_and_password_must_be_set' -tp178 -sI167 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_client.py' -g175 -S'CrabClientTests.test_list_gemeenten' -tp179 -sI168 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_client.py' -g175 -S'CrabClientTests.test_override_wsdl' -tp180 -sI169 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_wsa.py' -S'crabpy.tests.test_wsa' -p181 -S'ElementTests.testAction' -tp182 -sI170 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_wsa.py' -g181 -S'ElementTests.testMessageId' -tp183 -sI171 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_wsa.py' -g181 -S'ElementTests.testTo' -tp184 -sI172 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_wsse.py' -S'crabpy.tests.test_wsse' -p185 -S'UsernameDigestTokenTests.test_set_custom_nonce' -tp186 -sI173 -(S'/home/talissa/repos/crabpy/crabpy/tests/test_wsse.py' -g185 -S'UsernameDigestTokenTests.test_simple' -tp187 -sI174 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -S'crabpy.tests.gateway.test_crab' -p188 -S'CrabCachedGatewayTests.test_get_perceel_by_id' -tp189 -sI175 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'CrabCachedGatewayTests.test_get_terreinobject_by_id' -tp190 -sI176 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'CrabCachedGatewayTests.test_list_percelen_by_huisnummer' -tp191 -sI177 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'CrabCachedGatewayTests.test_list_terreinobjecten_by_huisnummer' -tp192 -sI178 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'CrabGatewayTests.test_get_perceel_by_id' -tp193 -sI179 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'CrabGatewayTests.test_get_terreinobject_by_id' -tp194 -sI180 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'CrabGatewayTests.test_list_percelen_by_huisnummer' -tp195 -sI181 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'CrabGatewayTests.test_list_terreinobjecten_by_huisnummer' -tp196 -sI182 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'PerceelTests.test_fully_initialised' -tp197 -sI183 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'PerceelTests.test_lazy_load' -tp198 -sI184 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'TerreinobjectTests.test_aard' -tp199 -sI185 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'TerreinobjectTests.test_fully_initialised' -tp200 -sI186 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g188 -S'TerreinobjectTests.test_lazy_load' -tp201 -sI187 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -S'crabpy.tests.gateway.test_crab' -p202 -S'CrabCachedGatewayTests.test_get_gebouw_by_id' -tp203 -sI188 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'CrabCachedGatewayTests.test_list_gebouwen_by_huisnummer' -tp204 -sI189 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'CrabGatewayTests.test_get_gebouw_by_id' -tp205 -sI190 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'CrabGatewayTests.test_list_gebouwen_by_huisnummer' -tp206 -sI191 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'GebouwTests.test_aard' -tp207 -sI192 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'GebouwTests.test_fully_initialised' -tp208 -sI193 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'GebouwTests.test_lazy_load' -tp209 -sI194 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'GebouwTests.test_methode' -tp210 -sI195 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g202 -S'GebouwTests.test_status' -tp211 -sI196 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -S'crabpy.tests.gateway.test_crab' -p212 -S'HuisnummerTests.test_gebouwen' -tp213 -sI197 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g212 -S'HuisnummerTests.test_lazy_load' -tp214 -sI198 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g212 -S'HuisnummerTests.test_percelen' -tp215 -sI199 -(S'/home/talissa/repos/crabpy/crabpy/tests/gateway/test_crab.py' -g212 -S'HuisnummerTests.test_terreinobjecten' -tp216 -ss. \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 90bb56c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: false -language: python -python: - - 3.8 -install: - - pip install -r requirements-dev.txt - - python setup.py install -script: - - flake8 || travis_terminate 1 - - py.test --cov crabpy --cov-report term-missing -c pytest_travis.ini tests/ -after_success: - coveralls diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 33066b3..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include README.rst CHANGES.rst LICENSE -recursive-include crabpy/data *.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..08b367c --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# CRABpy + +This library provides access to the CRAB and CAPAKEY webservices operated by +the AGIV. Because connecting to these SOAP services from python can be somewhat +complicated, this library makes it easier. + +[![docs](https://readthedocs.org/projects/crabpy/badge/?version=latest)](https://readthedocs.org/projects/crabpy/?badge=latest) +[![pypi](https://badge.fury.io/py/crabpy.png)](http://badge.fury.io/py/crabpy) +[![CI](https://github.com/OnroerendErfgoed/crabpy/actions/workflows/backend.yaml/badge.svg)](https://github.com/OnroerendErfgoed/crabpy/actions/workflows/backend.yaml) +[![Coverage](https://coveralls.io/repos/OnroerendErfgoed/crabpy/badge.png?branch=master)](https://coveralls.io/r/OnroerendErfgoed/crabpy?branch=master) + + +## Build wheel or sdist + +```sh +pip install hatch +hatch build +hatch build -t wheel +hatch build -t sdist +``` + + +## Work with pip-compile / pip-sync + +full docs: https://pip-tools.readthedocs.io/en/latest/ + +To start, first install pip-tools: +```sh +pip install pip-tools +``` + +### uv (optional) + +You can also use `uv` and for the remainder of the readme replace `pip`, `pip-compile` or +`pip-sync` by `uv pip`, `uv pip compile` and `uv pip sync`. + +`uv` is a very fast replacement for pip-toools. It's optional, but can save a lot of time. +```sh +pip install uv +``` + +### Install requirements: pip-sync + +Note, `pip-sync` also uninstalls everything from the virtualenv which does not belong +there according to the requirements file. This includes the project itself. You will +have to install `crabpy` again after `pip-sync`. +Since the requirements file of pip-sync is still a normal requirements file you can also +use `pip install -r` to install all libraries defined in it. This will not cleanup your +virtualenv and uninstall other libraries. + +The compiled requirements files are made in a 3.11 environment. +```sh +pip-sync requirements-dev.txt +pip install -e . +``` +`requirements-dev.txt` contains all libraries uncluding those for testing and development. + +`requirements.txt` contains only the necessary libraries for running the library. + +### Update requirements: pip-compile + +```sh +echo -e "\nStarting" +PIP_COMPILE_ARGS="-q --strip-extras --no-header --resolver=backtracking --no-emit-options pyproject.toml" +pip-compile $PIP_COMPILE_ARGS -o requirements.txt; +echo "requirements.txt done" +pip-compile $PIP_COMPILE_ARGS --extra dev -o requirements-dev.txt; +echo "requirements-dev.txt done" +echo "Finished" +``` diff --git a/README.rst b/README.rst deleted file mode 100644 index 03405d2..0000000 --- a/README.rst +++ /dev/null @@ -1,18 +0,0 @@ -CRABpy -====== - -This library provides access to the CRAB and CAPAKEY webservices operated by -the AGIV. Because connecting to these SOAP services from python can be somewhat -complicated, this library makes it easier. - -.. image:: https://readthedocs.org/projects/crabpy/badge/?version=latest - :target: https://readthedocs.org/projects/crabpy/?badge=latest -.. image:: https://badge.fury.io/py/crabpy.png - :target: http://badge.fury.io/py/crabpy - -.. image:: https://travis-ci.org/OnroerendErfgoed/crabpy.png?branch=master - :target: https://travis-ci.org/OnroerendErfgoed/crabpy -.. image:: https://coveralls.io/repos/OnroerendErfgoed/crabpy/badge.png?branch=master - :target: https://coveralls.io/r/OnroerendErfgoed/crabpy?branch=master -.. image:: https://scrutinizer-ci.com/g/OnroerendErfgoed/crabpy/badges/quality-score.png?b=master - :target: https://scrutinizer-ci.com/g/OnroerendErfgoed/crabpy/?branch=master diff --git a/docs/development.rst b/docs/development.rst index 11e5ff1..9451a43 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -3,36 +3,14 @@ Development =========== Crabpy is still in development, but the general API is stable and we are already -using it in production. Generally we're also just happy to have gotten a SOAP -service working in python. +using it in production. -We try to cover as much code as we can with unit tests. You can run them using -tox_ or directly through py.test. +We try to cover as much code as we can with tests. You can run them using pytest. +Use `coverage` for coverage results. .. code-block:: bash - - $ tox # No coverage - $ py.test + $ pytest tests # Coverage - $ py.test --cov crabpy --cov-report term-missing tests/ - -If you have access to the capakey service, you can enter your credentials in -the `pytest_dist.ini` file and use that as a test config. It's actually best to -copy this file and edit the copy instead of the original. - -.. code-block:: ini - - [pytest] - addopts = --crab-integration --capakey-integration --capakey-soap-integration --capakey-soap-user= --capakey-soap-password= - -.. code-block:: bash - - # Integration tests but no coverage - $ py.test -c pytest_.ini - # Integration tests with coverage - $ py.test -c pytest_.ini --cov crabpy --cov-report term-missing tests/ - # Running just the CRAB integration tests without using a config file - $ py.test --crab-integration --cov crabpy --cov-report term-missing tests/ - -.. _tox: http://tox.testrun.org + $ coverage --source crabpy crabpy -m pytest tests +.. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ec19509 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,59 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +version = "1.3.2" +name = "crabpy" +readme = "README.md" +authors = [ + { name = "Flanders Heritage Agency", email = "ict@onroerenderfgoed.be" }, +] +license = {file = "LICENSE"} +description = "Interact with geographical webservices by Informatie Vlaanderen." +requires-python = ">=3.10,<3.13" +keywords = ["web", "pyramid", "wsgi", "crabpy", "CAPAKEY", "AGIV"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Natural Language :: English", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +dependencies = [ + "suds-py3>=1.4.4.1", + "dogpile.cache", + "requests", +] + +[project.optional-dependencies] +dev = [ + "pytest==8.3.3", + "responses==0.25.3", + "flake8==7.1.1", + "flake8-bugbear==24.8.19", + "flake8-import-order==0.18.2", + "black==24.10.0", + "uv==0.4.20", + "coveralls==4.0.1", + "pre-commit==4.0.1", +] + +[project.urls] +Repository = "https://github.com/OnroerendErfgoed/crabpy.git" +Issues = "https://github.com/OnroerendErfgoed/crabpy/issues" +Changelog = "https://github.com/OnroerendErfgoed/crabpy/blob/master/CHANGES.rst" + +[project.entry-points."paste.app_factory"] +main = "crabpy:main" + +[tool.hatch.build.targets.wheel] +# In the wheel we want to have crabpy in the root as +# python modules. +packages = [ + "/crabpy", +] diff --git a/pytest_dist.ini b/pytest_dist.ini deleted file mode 100644 index 3ff85e9..0000000 --- a/pytest_dist.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -addopts = --crab-integration --capakey-integration diff --git a/pytest_travis.ini b/pytest_travis.ini deleted file mode 100644 index 3ff85e9..0000000 --- a/pytest_travis.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -addopts = --crab-integration --capakey-integration diff --git a/requirements-dev.txt b/requirements-dev.txt index 935985a..1e9ff19 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,10 +1,96 @@ -# Runtime requirements ---requirement requirements.txt +attrs==24.2.0 + # via flake8-bugbear +black==24.10.0 + # via crabpy (pyproject.toml) +certifi==2024.8.30 + # via requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.0 + # via requests +click==8.1.7 + # via black +coverage==7.6.3 + # via coveralls +coveralls==4.0.1 + # via crabpy (pyproject.toml) +decorator==5.1.1 + # via dogpile-cache +distlib==0.3.9 + # via virtualenv +docopt==0.6.2 + # via coveralls +dogpile-cache==1.3.3 + # via crabpy (pyproject.toml) +filelock==3.16.1 + # via virtualenv +flake8==7.1.1 + # via + # crabpy (pyproject.toml) + # flake8-bugbear +flake8-bugbear==24.8.19 + # via crabpy (pyproject.toml) +flake8-import-order==0.18.2 + # via crabpy (pyproject.toml) +identify==2.6.1 + # via pre-commit +idna==3.10 + # via requests +iniconfig==2.0.0 + # via pytest +mccabe==0.7.0 + # via flake8 +mypy-extensions==1.0.0 + # via black +nodeenv==1.9.1 + # via pre-commit +packaging==24.1 + # via + # black + # pytest +pathspec==0.12.1 + # via black +pbr==6.1.0 + # via stevedore +platformdirs==4.3.6 + # via + # black + # virtualenv +pluggy==1.5.0 + # via pytest +pre-commit==4.0.1 + # via crabpy (pyproject.toml) +pycodestyle==2.12.1 + # via + # flake8 + # flake8-import-order +pyflakes==3.2.0 + # via flake8 +pytest==8.3.3 + # via crabpy (pyproject.toml) +pyyaml==6.0.2 + # via + # pre-commit + # responses +requests==2.32.3 + # via + # coveralls + # crabpy (pyproject.toml) + # responses +responses==0.25.3 + # via crabpy (pyproject.toml) +stevedore==5.3.0 + # via dogpile-cache +suds-py3==1.4.5.0 + # via crabpy (pyproject.toml) +urllib3==2.2.3 + # via + # requests + # responses +uv==0.4.20 + # via crabpy (pyproject.toml) +virtualenv==20.26.6 + # via pre-commit -# Testing -pytest==3.6.3 -pytest-cov==2.5.1 -coveralls==1.3.0 -flake8==6.0.0 -responses==0.10.6 -pre-commit==2.17.0 +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements.txt b/requirements.txt index 4f5b67b..5ccd334 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,20 @@ -requests==2.27.1 +certifi==2024.8.30 + # via requests +charset-normalizer==3.4.0 + # via requests +decorator==5.1.1 + # via dogpile-cache +dogpile-cache==1.3.3 + # via crabpy (pyproject.toml) +idna==3.10 + # via requests +pbr==6.1.0 + # via stevedore +requests==2.32.3 + # via crabpy (pyproject.toml) +stevedore==5.3.0 + # via dogpile-cache suds-py3==1.4.5.0 -dogpile.cache==1.1.5 + # via crabpy (pyproject.toml) +urllib3==2.2.3 + # via requests diff --git a/setup.py b/setup.py deleted file mode 100755 index b060f9d..0000000 --- a/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -from setuptools import find_packages -from setuptools import setup - -packages = [ - "crabpy", -] - -requires = ["suds-py3>=1.4.4.1", "dogpile.cache", "requests"] - -setup( - name="crabpy", - version="1.3.2", - description="Interact with geographical webservices by Informatie Vlaanderen.", - long_description=open("README.rst").read() + "\n\n" + open("CHANGES.rst").read(), - author="Onroerend Erfgoed", - author_email="ict@onroerenderfgoed.be", - url="http://github.com/onroerenderfgoed/crabpy", - packages=find_packages(exclude=["tests*"]), - package_data={"": ["LICENSE"]}, - package_dir={"crabpy": "crabpy"}, - include_package_data=True, - install_requires=requires, - entry_points="""\ - [paste.app_factory] - main = crabpy:main""", - license="MIT", - zip_safe=False, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - ], -) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index eb63a34..0000000 --- a/tox.ini +++ /dev/null @@ -1,16 +0,0 @@ -[tox] -envlist = py36, py38, cover - -[testenv] -commands = - pip install -r requirements-dev.txt - python setup.py develop - py.test tests/ - -[testenv:cover] -basepython = - python3.8 -commands = - pip install -r requirements-dev.txt - python setup.py develop - py.test --cov crabpy --cov-report term-missing tests/