From 07c591a1133affbff41a2332e058689437bcdbc3 Mon Sep 17 00:00:00 2001 From: bzorn Date: Sat, 23 Dec 2023 16:49:36 +0300 Subject: [PATCH 1/4] feat: added user to django admin --- datanar/users/admin.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 datanar/users/admin.py diff --git a/datanar/users/admin.py b/datanar/users/admin.py new file mode 100644 index 0000000..30e75c2 --- /dev/null +++ b/datanar/users/admin.py @@ -0,0 +1,9 @@ +from django.contrib import admin +from django.contrib.auth import get_user_model +from django.contrib.auth.admin import UserAdmin + + +admin.site.register(get_user_model(), UserAdmin) + + +__all__ = [] From f9f43a0f1e3e8426b68ac8234af57243a4d96c0e Mon Sep 17 00:00:00 2001 From: bzorn Date: Sun, 28 Jan 2024 18:01:36 +0300 Subject: [PATCH 2/4] feat: added GitHub ci --- .github/workflows/python-app.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..7781494 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,36 @@ +name: Python application + +on: + push: + branches: [ "master", "develop", "artem", "sergey", "vladimir", "for_merge"] + pull_request: + branches: [ "master", "develop", "artem", "sergey", "vladimir", "for_merge"] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements/dev.txt + cd ./datanar + - name: Lint with flake8 + run: | + flake8 . --config=.flake8 + - name: Lint with black + run: | + black . --check --verbose --diff --line-length 79 + - name: Django testing + run: | + python manage.py test From edb834d1926d0cea5dfdd2bae2fb1bbc6da996ce Mon Sep 17 00:00:00 2001 From: bzorn Date: Sun, 28 Jan 2024 18:03:18 +0300 Subject: [PATCH 3/4] test: updated ci config --- .github/workflows/python-app.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 7781494..bf1bfe0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -24,13 +24,15 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements/dev.txt - cd ./datanar - name: Lint with flake8 run: | + cd ./datanar flake8 . --config=.flake8 - name: Lint with black run: | + cd ./datanar black . --check --verbose --diff --line-length 79 - name: Django testing run: | + cd ./datanar python manage.py test From c7e9cae16fce09ef37e5c975a684a8abd6af0950 Mon Sep 17 00:00:00 2001 From: bzorn Date: Sun, 28 Jan 2024 18:05:10 +0300 Subject: [PATCH 4/4] test: updated ci config --- .github/workflows/python-app.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index bf1bfe0..199e4fc 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -26,12 +26,10 @@ jobs: pip install -r requirements/dev.txt - name: Lint with flake8 run: | - cd ./datanar - flake8 . --config=.flake8 + flake8 ./datanar/ --config=.flake8 - name: Lint with black run: | - cd ./datanar - black . --check --verbose --diff --line-length 79 + black ./datanar/ --check --verbose --diff --line-length 79 - name: Django testing run: | cd ./datanar