From d1cd80950e96e5328ab05c631f7949d3a963018d Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 27 Nov 2022 18:06:17 +0100 Subject: [PATCH] Move more files to src --- .flake8 | 4 ++-- Makefile | 6 +++--- flake.nix | 3 --- conftest.py => src/conftest.py | 0 manage.py => src/manage.py | 0 network_inventory.yaml => src/network_inventory.yaml | 0 6 files changed, 5 insertions(+), 8 deletions(-) rename conftest.py => src/conftest.py (100%) rename manage.py => src/manage.py (100%) mode change 100755 => 100644 rename network_inventory.yaml => src/network_inventory.yaml (100%) diff --git a/.flake8 b/.flake8 index 8a89f61..ea5280d 100644 --- a/.flake8 +++ b/.flake8 @@ -4,5 +4,5 @@ exclude = __init__.py, *cache*, venv/, - manage.py, - network_inventory/settings/* + src/manage.py, + src/network_inventory/settings/* diff --git a/Makefile b/Makefile index cdee043..d07f2f0 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ run: setup ( \ find . -name __pycache__ -o -name "*.pyc" -delete; \ sudo iptables -I INPUT -p tcp --dport 8000 -j ACCEPT; \ - cd src/ + cd src/; \ python manage.py runserver 0.0.0.0:8000; \ ) @@ -15,7 +15,7 @@ run: setup setup: ( \ docker-compose -f docker-compose-development.yml up -d; \ - cd src/ + cd src/; \ if [ -f .second_run ]; then \ sleep 2; \ python manage.py collectstatic --noinput; \ @@ -72,7 +72,7 @@ init: .PHONY: test test: ( \ - pytest --ds=network_inventory.settings.ram_test -nauto --nomigrations --cov=. --cov-report=html; \ + pytest --ds=network_inventory.settings.ram_test -nauto --nomigrations --cov=./src --cov-report=html ./src; \ ) .PHONY: debug diff --git a/flake.nix b/flake.nix index 4582f0e..bf15169 100644 --- a/flake.nix +++ b/flake.nix @@ -16,9 +16,6 @@ (final: prev: { inventoryEnv = prev.poetry2nix.mkPoetryEnv { projectDir = ./.; - editablePackageSources = { - inventory = ./src; - }; }; inventoryPackage = prev.poetry2nix.mkPoetryApplication { projectDir = ./.; diff --git a/conftest.py b/src/conftest.py similarity index 100% rename from conftest.py rename to src/conftest.py diff --git a/manage.py b/src/manage.py old mode 100755 new mode 100644 similarity index 100% rename from manage.py rename to src/manage.py diff --git a/network_inventory.yaml b/src/network_inventory.yaml similarity index 100% rename from network_inventory.yaml rename to src/network_inventory.yaml