Browse Source

Rename app dir to backend for pip installation

pull/1310/head
Hironsan 3 years ago
parent
commit
a3a054c393
301 changed files with 52 additions and 51 deletions
  1. 18
      .coveragerc
  2. 20
      .dockerignore
  3. 2
      .flake8
  4. 4
      Dockerfile
  5. 18
      MANIFEST.in
  6. 0
      backend/.dockerignore
  7. 0
      backend/Dockerfile.dev
  8. 6
      backend/Dockerfile.prod
  9. 0
      backend/__init__.py
  10. 0
      backend/api/__init__.py
  11. 0
      backend/api/admin.py
  12. 0
      backend/api/apps.py
  13. 0
      backend/api/exceptions.py
  14. 0
      backend/api/filters.py
  15. 0
      backend/api/management/__init__.py
  16. 0
      backend/api/management/commands/__init__.py
  17. 0
      backend/api/management/commands/create_admin.py
  18. 0
      backend/api/management/commands/create_role_mapping.py
  19. 0
      backend/api/management/commands/create_roles.py
  20. 0
      backend/api/management/commands/wait_for_db.py
  21. 0
      backend/api/managers.py
  22. 0
      backend/api/migrations/0001_initial.py
  23. 0
      backend/api/migrations/0002_comment.py
  24. 0
      backend/api/migrations/0002_project_single_class_classification.py
  25. 0
      backend/api/migrations/0002_speech2text.py
  26. 0
      backend/api/migrations/0003_merge_20200612_0205.py
  27. 0
      backend/api/migrations/0004_merge_20210114_1117.py
  28. 0
      backend/api/migrations/0005_auto_20210120_1730.py
  29. 0
      backend/api/migrations/0005_auto_20210201_0603.py
  30. 0
      backend/api/migrations/0006_merge_20210221_1258.py
  31. 0
      backend/api/migrations/0007_auto_20210301_0302.py
  32. 0
      backend/api/migrations/0008_auto_20210302_1013.py
  33. 0
      backend/api/migrations/0009_auto_20210411_2330.py
  34. 0
      backend/api/migrations/0009_tag.py
  35. 0
      backend/api/migrations/0010_auto_20210413_0249.py
  36. 0
      backend/api/migrations/0011_merge_0009_tag_0010_auto_20210413_0249.py
  37. 0
      backend/api/migrations/__init__.py
  38. 0
      backend/api/models.py
  39. 0
      backend/api/permissions.py
  40. 0
      backend/api/serializers.py
  41. 0
      backend/api/tasks.py
  42. 0
      backend/api/tests/__init__.py
  43. 0
      backend/api/tests/data/classification.jsonl
  44. 0
      backend/api/tests/data/example.csv
  45. 0
      backend/api/tests/data/example.invalid.2.csv
  46. 0
      backend/api/tests/data/example.invalid.2.xlsx
  47. 0
      backend/api/tests/data/example.jsonl
  48. 0
      backend/api/tests/data/example.txt
  49. 0
      backend/api/tests/data/example.utf16.csv
  50. 0
      backend/api/tests/data/example.xlsx
  51. 0
      backend/api/tests/data/example_column_and_row_not_matching.csv
  52. 0
      backend/api/tests/data/example_column_and_row_not_matching.xlsx
  53. 0
      backend/api/tests/data/example_fasttext.txt
  54. 0
      backend/api/tests/data/example_fasttext_label_tag_without_name.txt
  55. 0
      backend/api/tests/data/example_fasttext_without_text.txt
  56. 0
      backend/api/tests/data/example_one_column.csv
  57. 0
      backend/api/tests/data/example_one_column.xlsx
  58. 0
      backend/api/tests/data/example_one_column_no_header.xlsx
  59. 0
      backend/api/tests/data/example_out_of_order_columns.csv
  60. 0
      backend/api/tests/data/invalid_labels.json
  61. 0
      backend/api/tests/data/labeling.conll
  62. 0
      backend/api/tests/data/labeling.invalid.conll
  63. 0
      backend/api/tests/data/labeling.jsonl
  64. 0
      backend/api/tests/data/labeling.trailing.conll
  65. 0
      backend/api/tests/data/seq2seq.jsonl
  66. 0
      backend/api/tests/data/valid_labels.json
  67. 0
      backend/api/tests/test_api.py
  68. 0
      backend/api/tests/test_config.py
  69. 0
      backend/api/tests/test_models.py
  70. 0
      backend/api/tests/test_utils.py
  71. 0
      backend/api/tests/test_views.py
  72. 0
      backend/api/tests/upload/__init__.py
  73. 0
      backend/api/tests/upload/test_conll.py
  74. 0
      backend/api/tests/upload/test_csv.py
  75. 0
      backend/api/tests/upload/test_dataset.py
  76. 0
      backend/api/tests/upload/test_fasttext.py
  77. 0
      backend/api/tests/upload/test_utils.py
  78. 0
      backend/api/urls.py
  79. 0
      backend/api/utils.py
  80. 0
      backend/api/views/__init__.py
  81. 0
      backend/api/views/annotation.py
  82. 0
      backend/api/views/auto_labeling.py
  83. 0
      backend/api/views/comment.py
  84. 0
      backend/api/views/document.py
  85. 0
      backend/api/views/download/__init__.py
  86. 0
      backend/api/views/download/catalog.py
  87. 0
      backend/api/views/download/data.py
  88. 0
      backend/api/views/download/examples.py
  89. 0
      backend/api/views/download/factory.py
  90. 0
      backend/api/views/download/repositories.py
  91. 0
      backend/api/views/download/service.py
  92. 0
      backend/api/views/download/writer.py
  93. 0
      backend/api/views/export_dataset.py
  94. 0
      backend/api/views/health.py
  95. 0
      backend/api/views/import_dataset.py
  96. 0
      backend/api/views/import_export.py
  97. 0
      backend/api/views/label.py
  98. 0
      backend/api/views/project.py
  99. 0
      backend/api/views/role.py
  100. 0
      backend/api/views/statistics.py

18
.coveragerc

@ -1,14 +1,14 @@
[report]
omit =
app/app/wsgi.py
app/classifier/*
app/server/migrations/*
app/server/templatetags/*
app/server/tests/*
app/api/migrations/*
app/api/tests/*
app/authentification/tests/*
app/authentification/templatetags/*
backend/app/wsgi.py
backend/classifier/*
backend/server/migrations/*
backend/server/templatetags/*
backend/server/tests/*
backend/api/migrations/*
backend/api/tests/*
backend/authentification/tests/*
backend/authentification/templatetags/*
exclude_lines =
pragma: no cover

20
.dockerignore

@ -1,5 +1,5 @@
*
!app/
!backend/
!frontend/
!nginx/
!tests/
@ -10,16 +10,16 @@
!Pipfile.lock
!Pipfile
app/**/bundle/
app/**/node_modules/
app/**/webpack-stats.json
backend/**/bundle/
backend/**/node_modules/
backend/**/webpack-stats.json
app/**/*.sqlite3
app/**/.env
app/**/junitxml/
app/**/staticfiles/
app/**/venv/
app/**/__pycache__/
backend/**/*.sqlite3
backend/**/.env
backend/**/junitxml/
backend/**/staticfiles/
backend/**/venv/
backend/**/__pycache__/
tests/**/__pycache__/
frontend/.nuxt/

2
.flake8

@ -1,3 +1,3 @@
[flake8]
filename = app/*
filename = backend/*
max-line-length = 120

4
Dockerfile

@ -48,8 +48,8 @@ RUN pip install --no-cache-dir -U pip \
&& rm -rf /deps
COPY --chown=doccano:doccano . /doccano
WORKDIR /doccano/app
COPY --from=frontend-builder /frontend/dist /doccano/app/client/dist
WORKDIR /doccano/backend
COPY --from=frontend-builder /frontend/dist /doccano/backend/client/dist
RUN python manage.py collectstatic --noinput
VOLUME /data

18
MANIFEST.in

@ -1,17 +1,17 @@
include app/manage.py
include app/requirements.txt
include backend/manage.py
include backend/requirements.txt
include README.md
exclude *.yml
exclude *.yaml
graft app/staticfiles
graft app/client
graft app/doccano
graft backend/staticfiles
graft backend/client
graft backend/doccano
prune app/staticfiles/bundle
prune app/staticfiles/assets
prune app/staticfiles/components
prune app/server/static
prune backend/staticfiles/bundle
prune backend/staticfiles/assets
prune backend/staticfiles/components
prune backend/server/static
prune frontend
prune docs
prune nginx

app/.dockerignore → backend/.dockerignore

app/Dockerfile.dev → backend/Dockerfile.dev

app/Dockerfile.prod → backend/Dockerfile.prod

@ -3,13 +3,13 @@ FROM python:${PYTHON_VERSION}-slim-buster
CMD ["python3"]
WORKDIR /app
WORKDIR /backend
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY ./app/ /app/
COPY ./Pipfile* /app/
COPY ./backend/ /backend/
COPY ./Pipfile* /backend/
# hadolint ignore=DL3013
RUN apt-get update \

app/__init__.py → backend/__init__.py

app/api/__init__.py → backend/api/__init__.py

app/api/admin.py → backend/api/admin.py

app/api/apps.py → backend/api/apps.py

app/api/exceptions.py → backend/api/exceptions.py

app/api/filters.py → backend/api/filters.py

app/api/migrations/__init__.py → backend/api/management/__init__.py

app/api/tests/__init__.py → backend/api/management/commands/__init__.py

app/api/management/commands/create_admin.py → backend/api/management/commands/create_admin.py

app/api/management/commands/create_role_mapping.py → backend/api/management/commands/create_role_mapping.py

app/api/management/commands/create_roles.py → backend/api/management/commands/create_roles.py

app/api/management/commands/wait_for_db.py → backend/api/management/commands/wait_for_db.py

app/api/managers.py → backend/api/managers.py

app/api/migrations/0001_initial.py → backend/api/migrations/0001_initial.py

app/api/migrations/0002_comment.py → backend/api/migrations/0002_comment.py

app/api/migrations/0002_project_single_class_classification.py → backend/api/migrations/0002_project_single_class_classification.py

app/api/migrations/0002_speech2text.py → backend/api/migrations/0002_speech2text.py

app/api/migrations/0003_merge_20200612_0205.py → backend/api/migrations/0003_merge_20200612_0205.py

app/api/migrations/0004_merge_20210114_1117.py → backend/api/migrations/0004_merge_20210114_1117.py

app/api/migrations/0005_auto_20210120_1730.py → backend/api/migrations/0005_auto_20210120_1730.py

app/api/migrations/0005_auto_20210201_0603.py → backend/api/migrations/0005_auto_20210201_0603.py

app/api/migrations/0006_merge_20210221_1258.py → backend/api/migrations/0006_merge_20210221_1258.py

app/api/migrations/0007_auto_20210301_0302.py → backend/api/migrations/0007_auto_20210301_0302.py

app/api/migrations/0008_auto_20210302_1013.py → backend/api/migrations/0008_auto_20210302_1013.py

app/api/migrations/0009_auto_20210411_2330.py → backend/api/migrations/0009_auto_20210411_2330.py

app/api/migrations/0009_tag.py → backend/api/migrations/0009_tag.py

app/api/migrations/0010_auto_20210413_0249.py → backend/api/migrations/0010_auto_20210413_0249.py

app/api/migrations/0011_merge_0009_tag_0010_auto_20210413_0249.py → backend/api/migrations/0011_merge_0009_tag_0010_auto_20210413_0249.py

app/api/tests/upload/__init__.py → backend/api/migrations/__init__.py

app/api/models.py → backend/api/models.py

app/api/permissions.py → backend/api/permissions.py

app/api/serializers.py → backend/api/serializers.py

app/api/tasks.py → backend/api/tasks.py

app/api/views/download/__init__.py → backend/api/tests/__init__.py

app/api/tests/data/classification.jsonl → backend/api/tests/data/classification.jsonl

app/api/tests/data/example.csv → backend/api/tests/data/example.csv

app/api/tests/data/example.invalid.2.csv → backend/api/tests/data/example.invalid.2.csv

app/api/tests/data/example.invalid.2.xlsx → backend/api/tests/data/example.invalid.2.xlsx

app/api/tests/data/example.jsonl → backend/api/tests/data/example.jsonl

app/api/tests/data/example.txt → backend/api/tests/data/example.txt

app/api/tests/data/example.utf16.csv → backend/api/tests/data/example.utf16.csv

app/api/tests/data/example.xlsx → backend/api/tests/data/example.xlsx

app/api/tests/data/example_column_and_row_not_matching.csv → backend/api/tests/data/example_column_and_row_not_matching.csv

app/api/tests/data/example_column_and_row_not_matching.xlsx → backend/api/tests/data/example_column_and_row_not_matching.xlsx

app/api/tests/data/example_fasttext.txt → backend/api/tests/data/example_fasttext.txt

app/api/tests/data/example_fasttext_label_tag_without_name.txt → backend/api/tests/data/example_fasttext_label_tag_without_name.txt

app/api/tests/data/example_fasttext_without_text.txt → backend/api/tests/data/example_fasttext_without_text.txt

app/api/tests/data/example_one_column.csv → backend/api/tests/data/example_one_column.csv

app/api/tests/data/example_one_column.xlsx → backend/api/tests/data/example_one_column.xlsx

app/api/tests/data/example_one_column_no_header.xlsx → backend/api/tests/data/example_one_column_no_header.xlsx

app/api/tests/data/example_out_of_order_columns.csv → backend/api/tests/data/example_out_of_order_columns.csv

app/api/tests/data/invalid_labels.json → backend/api/tests/data/invalid_labels.json

app/api/tests/data/labeling.conll → backend/api/tests/data/labeling.conll

app/api/tests/data/labeling.invalid.conll → backend/api/tests/data/labeling.invalid.conll

app/api/tests/data/labeling.jsonl → backend/api/tests/data/labeling.jsonl

app/api/tests/data/labeling.trailing.conll → backend/api/tests/data/labeling.trailing.conll

app/api/tests/data/seq2seq.jsonl → backend/api/tests/data/seq2seq.jsonl

app/api/tests/data/valid_labels.json → backend/api/tests/data/valid_labels.json

app/api/tests/test_api.py → backend/api/tests/test_api.py

app/api/tests/test_config.py → backend/api/tests/test_config.py

app/api/tests/test_models.py → backend/api/tests/test_models.py

app/api/tests/test_utils.py → backend/api/tests/test_utils.py

app/api/tests/test_views.py → backend/api/tests/test_views.py

app/authentification/__init__.py → backend/api/tests/upload/__init__.py

app/api/tests/upload/test_conll.py → backend/api/tests/upload/test_conll.py

app/api/tests/upload/test_csv.py → backend/api/tests/upload/test_csv.py

app/api/tests/upload/test_dataset.py → backend/api/tests/upload/test_dataset.py

app/api/tests/upload/test_fasttext.py → backend/api/tests/upload/test_fasttext.py

app/api/tests/upload/test_utils.py → backend/api/tests/upload/test_utils.py

app/api/urls.py → backend/api/urls.py

app/api/utils.py → backend/api/utils.py

app/api/views/__init__.py → backend/api/views/__init__.py

app/api/views/annotation.py → backend/api/views/annotation.py

app/api/views/auto_labeling.py → backend/api/views/auto_labeling.py

app/api/views/comment.py → backend/api/views/comment.py

app/api/views/document.py → backend/api/views/document.py

app/authentification/tests/__init__.py → backend/api/views/download/__init__.py

app/api/views/download/catalog.py → backend/api/views/download/catalog.py

app/api/views/download/data.py → backend/api/views/download/data.py

app/api/views/download/examples.py → backend/api/views/download/examples.py

app/api/views/download/factory.py → backend/api/views/download/factory.py

app/api/views/download/repositories.py → backend/api/views/download/repositories.py

app/api/views/download/service.py → backend/api/views/download/service.py

app/api/views/download/writer.py → backend/api/views/download/writer.py

app/api/views/export_dataset.py → backend/api/views/export_dataset.py

app/api/views/health.py → backend/api/views/health.py

app/api/views/import_dataset.py → backend/api/views/import_dataset.py

app/api/views/import_export.py → backend/api/views/import_export.py

app/api/views/label.py → backend/api/views/label.py

app/api/views/project.py → backend/api/views/project.py

app/api/views/role.py → backend/api/views/role.py

app/api/views/statistics.py → backend/api/views/statistics.py

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save