This would make it easier to get an overview over the role of the various files and folders in the project - especially if we add e.g. top-level docs, node (already added), docker or similar folders in the future, which would currently be difficult to spot among all the Django app folders. It would consequently also separate the Django code from other code.
Also, all files containing tests could optionally simultaneously be moved to a top-level tests folder. This will likely not bring much value, as this project is an "end product" and not expected to be published for usage by other projects - which would be one reason for moving the tests out of the src folder. Also, we would have to get rid of most relative imports in the tests - which are useful for grouping imports from the containing app separately from other imports (using e.g. code formatter tools).
Additional changes after simply moving the folders, would include: (this is not an exhaustive list)
Update the Django setting for the location of the SQLite database, to make it remain placed in the top-level repo folder, for ease of access
Update the MEDIA_ROOT and STATIC_ROOT settings
Append the src folder to sys.path in manage.py, since the latter file and the rest of the Python code is no longer in the same folder, and to avoid having to prefix all imports and references to our existing Python files with src.
Set source=src in .coveragerc
Prefix the ignore paths (except "manage.py") in codecov.yml with src/
Add a section in README.md explaining the necessary settings to set in PyCharm to accommodate this new setup
This would make it easier to get an overview over the role of the various files and folders in the project - especially if we add e.g. top-level
docs
,node
(already added),docker
or similar folders in the future, which would currently be difficult to spot among all the Django app folders. It would consequently also separate the Django code from other code.This would mainly just comprise moving all the top-level folders in the repo (at the time of writing), except the
.github
folder.Also, all files containing tests could optionally simultaneously be moved to a top-levelThis will likely not bring much value, as this project is an "end product" and not expected to be published for usage by other projects - which would be one reason for moving the tests out of thetests
folder.src
folder. Also, we would have to get rid of most relative imports in the tests - which are useful for grouping imports from the containing app separately from other imports (using e.g. code formatter tools).Additional changes after simply moving the folders, would include: (this is not an exhaustive list)
MEDIA_ROOT
andSTATIC_ROOT
settingssrc
folder tosys.path
inmanage.py
, since the latter file and the rest of the Python code is no longer in the same folder, and to avoid having to prefix all imports and references to our existing Python files withsrc.
source=src
in.coveragerc
ignore
paths (except"manage.py"
) incodecov.yml
withsrc/
README.md
explaining the necessary settings to set in PyCharm to accommodate this new setup