From fb0121b6e7f324b26f59b4d5ddf9201bc1723739 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Thu, 1 Aug 2024 14:53:42 -0400 Subject: [PATCH] [qa/ci/misc] Maintenance - Reformatted code & docs - Updated CI settings - Updated setup.py - Added Github Actions to dependabot monitoring --- .coveragerc | 10 --- .github/dependabot.yml | 6 ++ .github/workflows/ci.yml | 82 ++++++++---------- CHANGES.rst | 83 ++++++++++++------- openwisp_network_topology/api/views.py | 1 - openwisp_network_topology/base/topology.py | 1 - .../device/migrations/0001_initial.py | 1 - .../device/migrations/0002_wifimesh.py | 1 - .../migrations/0003_wifimesh_permissions.py | 1 - .../device/tests/test_integration.py | 4 +- .../device/tests/test_wifi_mesh.py | 2 +- .../integrations/device/tests/utils.py | 4 +- .../migrations/0001_initial.py | 1 - .../migrations/0002_snapshot.py | 1 - .../0003_link_status_and_openvpn_parser.py | 1 - .../migrations/0004_fixed_target_link_set.py | 1 - .../migrations/0006_reformat_addresses.py | 1 - .../0007_create_new_address_field.py | 1 - .../migrations/0008_migrate_addresses_data.py | 1 - .../migrations/0009_remove_old_addresses.py | 1 - .../migrations/0010_properties_json.py | 1 - .../0013_add_user_defined_properties_field.py | 1 - .../0014_remove_snapshot_organization.py | 1 - .../0015_shareable_topology_node_link.py | 1 - .../migrations/0016_alter_topology_parser.py | 1 - pyproject.toml | 22 +++++ setup.cfg | 10 --- setup.py | 2 +- tests/openwisp2/asgi.py | 7 +- .../migrations/0001_initial.py | 1 - .../migrations/0001_initial.py | 1 - .../migrations/0002_json_properties.py | 1 - .../0003_add_user_defined_properties_field.py | 1 - 33 files changed, 127 insertions(+), 127 deletions(-) delete mode 100644 .coveragerc create mode 100644 pyproject.toml diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index f841e0c5..00000000 --- a/.coveragerc +++ /dev/null @@ -1,10 +0,0 @@ -[run] -omit = - /*/test* - /tests - /*/__init__.py - /setup.py - /*/migrations/* -source = openwisp_network_topology -parallel = true -concurrency = multiprocessing diff --git a/.github/dependabot.yml b/.github/dependabot.yml index db958279..c893f4a8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,9 @@ updates: interval: "monthly" commit-message: prefix: "[deps] " + - package-ecosystem: "github-actions" # Check for GitHub Actions updates + directory: "/" # The root directory where the Ansible role is located + schedule: + interval: "monthly" # Check for updates weekly + commit-message: + prefix: "[ci] " diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3cbd964..b830e6b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,13 @@ on: jobs: build: name: Python==${{ matrix.python-version }} | ${{ matrix.django-version }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 + + services: + redis: + image: redis + ports: + - 6379:6379 strategy: fail-fast: false @@ -27,48 +33,35 @@ jobs: - django~=4.2.0 steps: - - name: Install system packages - run: | - sudo apt update && - sudo apt -qq install \ - sqlite3 \ - gdal-bin \ - libproj-dev \ - libgeos-dev \ - libspatialite-dev \ - spatialite-bin \ - libsqlite3-mod-spatialite - - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install system packages - run: | - sudo apt update - sudo apt-get -qq -y install sqlite3 gdal-bin libproj-dev \ - libgeos-dev libspatialite-dev spatialite-bin \ - libsqlite3-mod-spatialite - - - name: Install python system packages - run: pip install -U pip wheel setuptools - - - name: Start InfluxDB and Redis container - run: docker-compose up -d influxdb redis - - name: Install Dependencies id: deps run: | - pip install -U -r requirements-test.txt - pip install --force-reinstall https://github.com/openwisp/openwisp-controller/tarball/master + sudo apt update -qq + sudo apt -qq install \ + sqlite3 \ + gdal-bin \ + libproj-dev \ + libgeos-dev \ + libspatialite-dev \ + spatialite-bin \ + libsqlite3-mod-spatialite + pip install -U pip wheel setuptools pip install -U -e . + pip install -U -r requirements-test.txt pip install ${{ matrix.django-version }} + # start influxdb + docker compose up -d influxdb + - name: QA checks run: ./run-qa-checks @@ -76,28 +69,25 @@ jobs: if: ${{ !cancelled() && steps.deps.conclusion == 'success' }} run: | coverage run runtests.py --parallel - WIFI_MESH=1 coverage run runtests.py + WIFI_MESH=1 coverage run runtests.py --parallel + SAMPLE_APP=1 coverage run ./runtests.py --parallel coverage combine - SAMPLE_APP=1 ./runtests.py --parallel --keepdb + coverage xml - name: Upload Coverage if: ${{ success() }} - run: coveralls --service=github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: | - python-${{ matrix.python-version }}-${{ matrix.django-version }} - COVERALLS_PARALLEL: true + uses: coverallsapp/github-action@v2 + with: + parallel: true + format: cobertura + flag-name: python-${{ matrix.env.env }} + github-token: ${{ secrets.GITHUB_TOKEN }} coveralls: - name: Finish Coveralls needs: build runs-on: ubuntu-latest - container: python:3-slim steps: - - name: Finished - run: | - pip install --upgrade coveralls - coveralls --finish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true diff --git a/CHANGES.rst b/CHANGES.rst index 1b5e6b97..5d4625b7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,22 +13,23 @@ Features ~~~~~~~~ - Switched to new OpenWISP theme, registered the new menu items -- Added more REST API endpoint to manipulate details of Topology, Node and Link +- Added more REST API endpoint to manipulate details of Topology, Node and + Link Changes ~~~~~~~ Backward incompatible changes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ++++++++++++++++++++++++++++++ - Changed URL prefix of REST API from to ``/api/v1/topology/`` - ``/api/v1/network-topology/`` - for consistency with the other OpenWISP Modules -- Removed deprecated old receive topology API url; - use the new URL: ``/api/v1/network-topology/topology/{id}/receive/`` + ``/api/v1/network-topology/`` for consistency with the other OpenWISP + Modules +- Removed deprecated old receive topology API url; use the new URL: + ``/api/v1/network-topology/topology/{id}/receive/`` Dependencies -^^^^^^^^^^^^ +++++++++++++ - Dropped support for Python 3.6 - Added support for Python 3.8 and Python 3.9 @@ -38,14 +39,15 @@ Dependencies - Removed redundant django-model-utils (it's defined in openwisp-utils) Other changes -^^^^^^^^^^^^^ ++++++++++++++ - Moved uuid field of topology admin after main fields - Changed "View topology graph" button color - Added the `openwisp-utils DjangoModelPermissions `_ class to API views -- Allow nodes, link and topologies to be shared among different organizations +- Allow nodes, link and topologies to be shared among different + organizations Bugfixes ~~~~~~~~ @@ -59,11 +61,15 @@ Version 0.5.1 [2020-11-25] -------------------------- - [fix] Removed static() call from media assets -- [change] Increased `openwisp-users `__ version from 0.2.x to 0.5.x - (which brings many interesting improvements to multi-tenancy, - `see the change log of openwisp-users `_ +- [change] Increased `openwisp-users + `__ version + from 0.2.x to 0.5.x (which brings many interesting improvements to + multi-tenancy, `see the change log of openwisp-users + `_ for more information) -- Increased `openwisp-utils `__ version to 0.7.x +- Increased `openwisp-utils + `__ version + to 0.7.x Version 0.5.0 [2020-09-18] -------------------------- @@ -71,39 +77,47 @@ Version 0.5.0 [2020-09-18] Features ~~~~~~~~ -- Added `integration with OpenWISP Controller and OpenWISP Monitoring `_ -- API: added `swagger API docs `_ +- Added `integration with OpenWISP Controller and OpenWISP Monitoring + `_ +- API: added `swagger API docs + `_ - Admin: added UUID readonly field - Added user defined properties in Node and Link Changes ~~~~~~~ -- **Backward incompatible**: API and visualizer views now require authentication by default. - This can be changed through the new - `OPENWISP_NETWORK_TOPOLOGY_API_AUTH_REQUIRED `_ +- **Backward incompatible**: API and visualizer views now require + authentication by default. This can be changed through the new + `OPENWISP_NETWORK_TOPOLOGY_API_AUTH_REQUIRED + `_ setting - Upgraded openvpn nodes to netdiff 0.9 - Automatically manage organization of Node and Link -- Changed API URL: /api/v1/receive/{id}/ -> /api/v1//topology/{id}/receive/ (old URL kept for backward compatibility) +- Changed API URL: /api/v1/receive/{id}/ -> + /api/v1//topology/{id}/receive/ (old URL kept for backward + compatibility) Bugfixes ~~~~~~~~ - Fixed link status bug introduced in 0.4 - Fixed exceptions during update of data -- Do not save ``status_changed``, ``modified``, ``created`` in link properties +- Do not save ``status_changed``, ``modified``, ``created`` in link + properties - Fixed Topology admin for users who do not have delete permission Version 0.4.0 [2020-06-28] -------------------------- -- [refactoring] Merged code of django-netjsongraph in openwisp-network-topology +- [refactoring] Merged code of django-netjsongraph in + openwisp-network-topology - [**breaking change**]: URLS at ``/api/`` moved to ``/api/v1/`` - [docs] Reordered & Improved docs - [add] Requirement swapper~=1.1 - [docs] Added tutorial for extending openwisp-network-topology -- [feature] Upgrader script to upgrade from django-netjsongraph to openwisp-network-topology +- [feature] Upgrader script to upgrade from django-netjsongraph to + openwisp-network-topology - [change] Requirement netdiff~=0.8.0 Version 0.3.2 [2020-06-02] @@ -132,24 +146,28 @@ Version 0.2.2 [2020-01-13] -------------------------- - Updated dependencies -- Upgraded implementation of node addresses (via django-netjsongraph 0.5.0) +- Upgraded implementation of node addresses (via django-netjsongraph + 0.5.0) Version 0.2.1 [2018-02-24] -------------------------- - `fe9077c `_: - [models] Fixed related name of Link.target + [models] Fixed related name of Link.target Version 0.2.0 [2018-02-20] -------------------------- - `cb7366 `_: - [migrations] Added a migration file for link_status_changed and openvpn_parser + [migrations] Added a migration file for link_status_changed and + openvpn_parser - `#22 `_: Added support to django 2.0 -- `d40032 `_: +- `d40032 + `_: [qa] Fixed variable name error -- `de45b6 `_: +- `de45b6 + `_: Upgraded code according to latest django-netjsongraph 0.4.0 changes - `#17 `_: Integrated topology history feature from django-netjsongraph @@ -157,7 +175,8 @@ Version 0.2.0 [2018-02-20] Version 0.1.2 [2017-07-22] -------------------------- -- `#13 `_: +- `#13 + `_: Fixed the fetch and receive API bugs - `#15 `_: Imported admin tests from django-netjsongraph @@ -167,9 +186,13 @@ Version 0.1.2 [2017-07-22] Version 0.1.1 [2017-07-10] -------------------------- -- `95f8ade `_: [admin] Moved submit_line.html to `openwisp-utils `_ +- `95f8ade + `_: + [admin] Moved submit_line.html to `openwisp-utils + `_ Version 0.1 [2017-06-29] ------------------------ -- Added multi-tenancy and integrated `django-netjsongraph `_ +- Added multi-tenancy and integrated `django-netjsongraph + `_ diff --git a/openwisp_network_topology/api/views.py b/openwisp_network_topology/api/views.py index f353d29d..d61acbbd 100644 --- a/openwisp_network_topology/api/views.py +++ b/openwisp_network_topology/api/views.py @@ -35,7 +35,6 @@ class RequireAuthentication(APIView): - if app_settings.TOPOLOGY_API_AUTH_REQUIRED: authentication_classes = [ SessionAuthentication, diff --git a/openwisp_network_topology/base/topology.py b/openwisp_network_topology/base/topology.py index 2a540fde..65038dd2 100644 --- a/openwisp_network_topology/base/topology.py +++ b/openwisp_network_topology/base/topology.py @@ -28,7 +28,6 @@ class AbstractTopology(ShareableOrgMixin, TimeStampedEditableModel): - label = models.CharField(_('label'), max_length=64) parser = models.CharField( _('format'), diff --git a/openwisp_network_topology/integrations/device/migrations/0001_initial.py b/openwisp_network_topology/integrations/device/migrations/0001_initial.py index be3003e4..e4954792 100644 --- a/openwisp_network_topology/integrations/device/migrations/0001_initial.py +++ b/openwisp_network_topology/integrations/device/migrations/0001_initial.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/openwisp_network_topology/integrations/device/migrations/0002_wifimesh.py b/openwisp_network_topology/integrations/device/migrations/0002_wifimesh.py index 9b7a52e3..beae89d5 100644 --- a/openwisp_network_topology/integrations/device/migrations/0002_wifimesh.py +++ b/openwisp_network_topology/integrations/device/migrations/0002_wifimesh.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.TOPOLOGY_TOPOLOGY_MODEL), ('topology_device', '0001_initial'), diff --git a/openwisp_network_topology/integrations/device/migrations/0003_wifimesh_permissions.py b/openwisp_network_topology/integrations/device/migrations/0003_wifimesh_permissions.py index 8d425713..bd8a0e80 100644 --- a/openwisp_network_topology/integrations/device/migrations/0003_wifimesh_permissions.py +++ b/openwisp_network_topology/integrations/device/migrations/0003_wifimesh_permissions.py @@ -35,7 +35,6 @@ def _add_permission_to_group(group, models, operations): class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.TOPOLOGY_TOPOLOGY_MODEL), ('topology_device', '0002_wifimesh'), diff --git a/openwisp_network_topology/integrations/device/tests/test_integration.py b/openwisp_network_topology/integrations/device/tests/test_integration.py index 4b79cb0e..833c5767 100644 --- a/openwisp_network_topology/integrations/device/tests/test_integration.py +++ b/openwisp_network_topology/integrations/device/tests/test_integration.py @@ -8,14 +8,14 @@ from django.test import TransactionTestCase from django.urls import reverse from django.utils.module_loading import import_string +from openwisp_ipam.tests import CreateModelsMixin as SubnetIpamMixin + from openwisp_controller.config.tests.utils import ( CreateConfigTemplateMixin, TestVpnX509Mixin, TestWireguardVpnMixin, TestZeroTierVpnMixin, ) -from openwisp_ipam.tests import CreateModelsMixin as SubnetIpamMixin - from openwisp_network_topology.tests.utils import CreateGraphObjectsMixin from openwisp_users.tests.utils import TestOrganizationMixin from openwisp_utils.admin_theme.dashboard import DASHBOARD_CHARTS, DASHBOARD_TEMPLATES diff --git a/openwisp_network_topology/integrations/device/tests/test_wifi_mesh.py b/openwisp_network_topology/integrations/device/tests/test_wifi_mesh.py index 79693990..c0acf1d8 100644 --- a/openwisp_network_topology/integrations/device/tests/test_wifi_mesh.py +++ b/openwisp_network_topology/integrations/device/tests/test_wifi_mesh.py @@ -175,7 +175,7 @@ def test_mesh_id_changed(self): ) # Change mesh_id reported in the monitoring data mesh_data = deepcopy(SIMPLE_MESH_DATA) - for (device, interfaces) in zip(devices, mesh_data.values()): + for device, interfaces in zip(devices, mesh_data.values()): interfaces[0]['wireless']['ssid'] = 'New Mesh' response = self.client.post( '{0}?key={1}&time={2}'.format( diff --git a/openwisp_network_topology/integrations/device/tests/utils.py b/openwisp_network_topology/integrations/device/tests/utils.py index 6bab47f1..f3b19fc5 100644 --- a/openwisp_network_topology/integrations/device/tests/utils.py +++ b/openwisp_network_topology/integrations/device/tests/utils.py @@ -1,11 +1,11 @@ import swapper +from openwisp_ipam.tests import CreateModelsMixin as SubnetIpamMixin + from openwisp_controller.config.tests.utils import ( CreateConfigTemplateMixin, TestVpnX509Mixin, TestWireguardVpnMixin, ) -from openwisp_ipam.tests import CreateModelsMixin as SubnetIpamMixin - from openwisp_network_topology.tests.utils import CreateGraphObjectsMixin from openwisp_users.tests.utils import TestOrganizationMixin diff --git a/openwisp_network_topology/migrations/0001_initial.py b/openwisp_network_topology/migrations/0001_initial.py index 0b5ed023..690c64a5 100644 --- a/openwisp_network_topology/migrations/0001_initial.py +++ b/openwisp_network_topology/migrations/0001_initial.py @@ -18,7 +18,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/openwisp_network_topology/migrations/0002_snapshot.py b/openwisp_network_topology/migrations/0002_snapshot.py index 84c53e6b..0a0aa189 100644 --- a/openwisp_network_topology/migrations/0002_snapshot.py +++ b/openwisp_network_topology/migrations/0002_snapshot.py @@ -11,7 +11,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0001_initial')] operations = [ diff --git a/openwisp_network_topology/migrations/0003_link_status_and_openvpn_parser.py b/openwisp_network_topology/migrations/0003_link_status_and_openvpn_parser.py index d5dda847..02178a0f 100644 --- a/openwisp_network_topology/migrations/0003_link_status_and_openvpn_parser.py +++ b/openwisp_network_topology/migrations/0003_link_status_and_openvpn_parser.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0002_snapshot')] operations = [ diff --git a/openwisp_network_topology/migrations/0004_fixed_target_link_set.py b/openwisp_network_topology/migrations/0004_fixed_target_link_set.py index eb46ab05..6c922af9 100644 --- a/openwisp_network_topology/migrations/0004_fixed_target_link_set.py +++ b/openwisp_network_topology/migrations/0004_fixed_target_link_set.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0003_link_status_and_openvpn_parser')] operations = [ diff --git a/openwisp_network_topology/migrations/0006_reformat_addresses.py b/openwisp_network_topology/migrations/0006_reformat_addresses.py index f6ff8dd8..42524ff1 100644 --- a/openwisp_network_topology/migrations/0006_reformat_addresses.py +++ b/openwisp_network_topology/migrations/0006_reformat_addresses.py @@ -18,7 +18,6 @@ def reformat_address_backward(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [('topology', '0005_default_operator_permission')] operations = [ diff --git a/openwisp_network_topology/migrations/0007_create_new_address_field.py b/openwisp_network_topology/migrations/0007_create_new_address_field.py index f94b504f..d4a84664 100644 --- a/openwisp_network_topology/migrations/0007_create_new_address_field.py +++ b/openwisp_network_topology/migrations/0007_create_new_address_field.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0006_reformat_addresses')] operations = [ diff --git a/openwisp_network_topology/migrations/0008_migrate_addresses_data.py b/openwisp_network_topology/migrations/0008_migrate_addresses_data.py index adb1ebd7..2ecdc962 100644 --- a/openwisp_network_topology/migrations/0008_migrate_addresses_data.py +++ b/openwisp_network_topology/migrations/0008_migrate_addresses_data.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0007_create_new_address_field')] operations = [ diff --git a/openwisp_network_topology/migrations/0009_remove_old_addresses.py b/openwisp_network_topology/migrations/0009_remove_old_addresses.py index 224c7e12..24c95019 100644 --- a/openwisp_network_topology/migrations/0009_remove_old_addresses.py +++ b/openwisp_network_topology/migrations/0009_remove_old_addresses.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0008_migrate_addresses_data')] operations = [migrations.RemoveField(model_name='node', name='addresses_old')] diff --git a/openwisp_network_topology/migrations/0010_properties_json.py b/openwisp_network_topology/migrations/0010_properties_json.py index df11ddb8..7be7f396 100644 --- a/openwisp_network_topology/migrations/0010_properties_json.py +++ b/openwisp_network_topology/migrations/0010_properties_json.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0009_remove_old_addresses')] operations = [ diff --git a/openwisp_network_topology/migrations/0013_add_user_defined_properties_field.py b/openwisp_network_topology/migrations/0013_add_user_defined_properties_field.py index d1ed1bf1..8d95520a 100644 --- a/openwisp_network_topology/migrations/0013_add_user_defined_properties_field.py +++ b/openwisp_network_topology/migrations/0013_add_user_defined_properties_field.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [('topology', '0012_update_openvpn_netjson_ids')] operations = [ diff --git a/openwisp_network_topology/migrations/0014_remove_snapshot_organization.py b/openwisp_network_topology/migrations/0014_remove_snapshot_organization.py index b97586f6..98757935 100644 --- a/openwisp_network_topology/migrations/0014_remove_snapshot_organization.py +++ b/openwisp_network_topology/migrations/0014_remove_snapshot_organization.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ('topology', '0013_add_user_defined_properties_field'), ] diff --git a/openwisp_network_topology/migrations/0015_shareable_topology_node_link.py b/openwisp_network_topology/migrations/0015_shareable_topology_node_link.py index f9573096..1d4cee90 100644 --- a/openwisp_network_topology/migrations/0015_shareable_topology_node_link.py +++ b/openwisp_network_topology/migrations/0015_shareable_topology_node_link.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ('topology', '0014_remove_snapshot_organization'), ] diff --git a/openwisp_network_topology/migrations/0016_alter_topology_parser.py b/openwisp_network_topology/migrations/0016_alter_topology_parser.py index 595eddf9..b8b26eb2 100644 --- a/openwisp_network_topology/migrations/0016_alter_topology_parser.py +++ b/openwisp_network_topology/migrations/0016_alter_topology_parser.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ('topology', '0015_shareable_topology_node_link'), ] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..4d1f8ceb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[tool.coverage.run] +source = ["openwisp_network_topology"] +parallel = true +concurrency = ["multiprocessing"] +omit = [ + "openwisp_network_topology/__init__.py", + "*/tests/*", + "*/migrations/*", +] + +[tool.docstrfmt] +extend_exclude = ["**/*.py", "README.rst"] + +[tool.isort] +known_third_party = ["django", "django_x509"] +known_first_party = ["openwisp_users", "openwisp_utils", "openwisp_network_topology", "openwisp_controller", "openwisp_monitoring"] +default_section = "THIRDPARTY" +line_length = 88 +multi_line_output = 3 +use_parentheses = true +include_trailing_comma = true +force_grid_wrap = 0 diff --git a/setup.cfg b/setup.cfg index 89714b36..8e2c2598 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,13 +11,3 @@ exclude = *.egg-info, ./tests/*settings*.py, docs/* max-line-length = 110 - -[isort] -known_third_party = django -known_first_party = openwisp_users,openwisp_utils,openwisp_network_topology -default_section = THIRDPARTY -line_length=88 -multi_line_output=3 -use_parentheses=True -include_trailing_comma=True -force_grid_wrap=0 diff --git a/setup.py b/setup.py index 5e1c8722..36641cc7 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ def get_install_requires(): zip_safe=False, install_requires=get_install_requires(), classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 5 - Production/Stable ', 'Environment :: Web Environment', 'Topic :: Internet :: WWW/HTTP', 'Topic :: System :: Networking', diff --git a/tests/openwisp2/asgi.py b/tests/openwisp2/asgi.py index ffbe6713..1ab36b9f 100644 --- a/tests/openwisp2/asgi.py +++ b/tests/openwisp2/asgi.py @@ -5,13 +5,14 @@ if 'openwisp_controller.geo' in settings.INSTALLED_APPS: from openwisp_controller.routing import get_routes as get_controller_routes else: - from openwisp_controller.connection.channels.routing import ( - get_routes as get_connection_routes, - ) from openwisp_notifications.websockets.routing import ( get_routes as get_notification_routes, ) + from openwisp_controller.connection.channels.routing import ( + get_routes as get_connection_routes, + ) + def get_controller_routes(): return get_connection_routes() + get_notification_routes() diff --git a/tests/openwisp2/sample_integration_device/migrations/0001_initial.py b/tests/openwisp2/sample_integration_device/migrations/0001_initial.py index 48cdd141..e8e2b589 100644 --- a/tests/openwisp2/sample_integration_device/migrations/0001_initial.py +++ b/tests/openwisp2/sample_integration_device/migrations/0001_initial.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/tests/openwisp2/sample_network_topology/migrations/0001_initial.py b/tests/openwisp2/sample_network_topology/migrations/0001_initial.py index cc328597..ca4c422d 100644 --- a/tests/openwisp2/sample_network_topology/migrations/0001_initial.py +++ b/tests/openwisp2/sample_network_topology/migrations/0001_initial.py @@ -19,7 +19,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/tests/openwisp2/sample_network_topology/migrations/0002_json_properties.py b/tests/openwisp2/sample_network_topology/migrations/0002_json_properties.py index b2b6e2d7..8c9a9a54 100644 --- a/tests/openwisp2/sample_network_topology/migrations/0002_json_properties.py +++ b/tests/openwisp2/sample_network_topology/migrations/0002_json_properties.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [('sample_network_topology', '0001_initial')] operations = [ diff --git a/tests/openwisp2/sample_network_topology/migrations/0003_add_user_defined_properties_field.py b/tests/openwisp2/sample_network_topology/migrations/0003_add_user_defined_properties_field.py index 7a59c9fc..4665ada4 100644 --- a/tests/openwisp2/sample_network_topology/migrations/0003_add_user_defined_properties_field.py +++ b/tests/openwisp2/sample_network_topology/migrations/0003_add_user_defined_properties_field.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [('sample_network_topology', '0002_json_properties')] operations = [