From ef892573536996e13442bdae11cb65f1db53f470 Mon Sep 17 00:00:00 2001 From: LizardAPN Date: Wed, 24 Sep 2025 21:01:30 +0300 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3?= =?UTF-8?q?=D1=83=D1=80=D0=B0=D1=86=D0=B8=D1=8F=20CI/CD=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=20=D1=81=D0=BB=D0=B8=D1=8F=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=D0=BC=20=D0=B2=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-checks.yml | 31 ++ .../1_1_download_data.ipynb | 308 +++++++++++++++++- 2 files changed, 335 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci-checks.yml diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml new file mode 100644 index 0000000..6588d80 --- /dev/null +++ b/.github/workflows/ci-checks.yml @@ -0,0 +1,31 @@ +name: CI Checks +on: + pull_request: + branches: [ main ] +jobs: + lint-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install uv + run: | + pip install uv + + - name: Install dependencies + run: | + uv pip install -e .[dev] + + - name: Run linters + run: | + make lint + + - name: Run tests + run: | + make test + \ No newline at end of file diff --git a/notebooks/1_data_exploration/1_1_download_data.ipynb b/notebooks/1_data_exploration/1_1_download_data.ipynb index 430accf..86b053e 100644 --- a/notebooks/1_data_exploration/1_1_download_data.ipynb +++ b/notebooks/1_data_exploration/1_1_download_data.ipynb @@ -513,10 +513,155 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 37, "id": "64b78726", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(11239, 3)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.microsoft.datawrangler.viewer.v0+json": { + "columns": [ + { + "name": "index", + "rawType": "int64", + "type": "integer" + }, + { + "name": "Имя файла", + "rawType": "object", + "type": "string" + }, + { + "name": "latitude", + "rawType": "float64", + "type": "float" + }, + { + "name": "longitude", + "rawType": "float64", + "type": "float" + } + ], + "ref": "826141ea-c655-4a9e-84d2-7effd846bf7e", + "rows": [ + [ + "0", + "7ea94089-38cf-4ca7-affc-def9398282c6.jpg", + "55.6970112365885", + "37.7401609411382" + ], + [ + "1", + "3d08a02f-6761-4f7a-a444-a18dd7891b3d.jpg", + "55.77514021977135", + "37.58310181845392" + ], + [ + "2", + "95cdfd71-26c5-49a7-ad72-d1a02e315947.jpg", + "55.8221777683838", + "37.6015759447731" + ], + [ + "3", + "33bf5a5e-8132-4e52-ae46-041efe3aba4f.jpg", + "55.55282344216123", + "37.55222953869151" + ], + [ + "4", + "654c8dd6-f024-436c-b306-ef70cf7749ef.jpg", + "55.80718778878835", + "37.8041668981476" + ] + ], + "shape": { + "columns": 3, + "rows": 5 + } + }, + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Имя файлаlatitudelongitude
07ea94089-38cf-4ca7-affc-def9398282c6.jpg55.69701137.740161
13d08a02f-6761-4f7a-a444-a18dd7891b3d.jpg55.77514037.583102
295cdfd71-26c5-49a7-ad72-d1a02e315947.jpg55.82217837.601576
333bf5a5e-8132-4e52-ae46-041efe3aba4f.jpg55.55282337.552230
4654c8dd6-f024-436c-b306-ef70cf7749ef.jpg55.80718837.804167
\n", + "
" + ], + "text/plain": [ + " Имя файла latitude longitude\n", + "0 7ea94089-38cf-4ca7-affc-def9398282c6.jpg 55.697011 37.740161\n", + "1 3d08a02f-6761-4f7a-a444-a18dd7891b3d.jpg 55.775140 37.583102\n", + "2 95cdfd71-26c5-49a7-ad72-d1a02e315947.jpg 55.822178 37.601576\n", + "3 33bf5a5e-8132-4e52-ae46-041efe3aba4f.jpg 55.552823 37.552230\n", + "4 654c8dd6-f024-436c-b306-ef70cf7749ef.jpg 55.807188 37.804167" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Называю real так как это данные которые передали нам орги \n", "real_data = pd.concat([garbage_echd, builging_echd], axis=0)\n", @@ -526,10 +671,155 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 38, "id": "9f1566ff", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(138171, 3)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.microsoft.datawrangler.viewer.v0+json": { + "columns": [ + { + "name": "index", + "rawType": "int64", + "type": "integer" + }, + { + "name": "ID", + "rawType": "object", + "type": "string" + }, + { + "name": "longitude", + "rawType": "float64", + "type": "float" + }, + { + "name": "latitude", + "rawType": "float64", + "type": "float" + } + ], + "ref": "6e301975-35a8-4485-8504-a322cf023d18", + "rows": [ + [ + "1", + "DVN_UZAO_985_3", + "37.589965064", + "55.684061132" + ], + [ + "2", + "DVN_UZAO_920_2", + "37.562047516", + "55.683930012" + ], + [ + "3", + "DVN_UZAO_912_2", + "37.560536155", + "55.686372499" + ], + [ + "4", + "DVN_SVAO_2090_0", + "37.653519456", + "55.815467984" + ], + [ + "5", + "DVN_SVAO_2061_2", + "37.654268193", + "55.823073453" + ] + ], + "shape": { + "columns": 3, + "rows": 5 + } + }, + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
IDlongitudelatitude
1DVN_UZAO_985_337.58996555.684061
2DVN_UZAO_920_237.56204855.683930
3DVN_UZAO_912_237.56053655.686372
4DVN_SVAO_2090_037.65351955.815468
5DVN_SVAO_2061_237.65426855.823073
\n", + "
" + ], + "text/plain": [ + " ID longitude latitude\n", + "1 DVN_UZAO_985_3 37.589965 55.684061\n", + "2 DVN_UZAO_920_2 37.562048 55.683930\n", + "3 DVN_UZAO_912_2 37.560536 55.686372\n", + "4 DVN_SVAO_2090_0 37.653519 55.815468\n", + "5 DVN_SVAO_2061_2 37.654268 55.823073" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Называю target так как это данные которые мы выгрузили из открытых источников\n", "# На них id камеры (нам нужно это для оптимизации алгоритма)\n", @@ -548,6 +838,16 @@ "data = merge_tables_with_tolerance(target_data, real_data, max_distance_meters=100).drop_duplicates()" ] }, + { + "cell_type": "code", + "execution_count": 36, + "id": "822fd77e", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd" + ] + }, { "cell_type": "code", "execution_count": null, From ca18e3562dae5a84bbd94e8009dca6e6c9c919cf Mon Sep 17 00:00:00 2001 From: LizardAPN Date: Wed, 24 Sep 2025 21:02:13 +0300 Subject: [PATCH 2/2] fix: delete useless code --- .../1_1_download_data.ipynb | 308 +----------------- 1 file changed, 4 insertions(+), 304 deletions(-) diff --git a/notebooks/1_data_exploration/1_1_download_data.ipynb b/notebooks/1_data_exploration/1_1_download_data.ipynb index 86b053e..430accf 100644 --- a/notebooks/1_data_exploration/1_1_download_data.ipynb +++ b/notebooks/1_data_exploration/1_1_download_data.ipynb @@ -513,155 +513,10 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": null, "id": "64b78726", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(11239, 3)" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.microsoft.datawrangler.viewer.v0+json": { - "columns": [ - { - "name": "index", - "rawType": "int64", - "type": "integer" - }, - { - "name": "Имя файла", - "rawType": "object", - "type": "string" - }, - { - "name": "latitude", - "rawType": "float64", - "type": "float" - }, - { - "name": "longitude", - "rawType": "float64", - "type": "float" - } - ], - "ref": "826141ea-c655-4a9e-84d2-7effd846bf7e", - "rows": [ - [ - "0", - "7ea94089-38cf-4ca7-affc-def9398282c6.jpg", - "55.6970112365885", - "37.7401609411382" - ], - [ - "1", - "3d08a02f-6761-4f7a-a444-a18dd7891b3d.jpg", - "55.77514021977135", - "37.58310181845392" - ], - [ - "2", - "95cdfd71-26c5-49a7-ad72-d1a02e315947.jpg", - "55.8221777683838", - "37.6015759447731" - ], - [ - "3", - "33bf5a5e-8132-4e52-ae46-041efe3aba4f.jpg", - "55.55282344216123", - "37.55222953869151" - ], - [ - "4", - "654c8dd6-f024-436c-b306-ef70cf7749ef.jpg", - "55.80718778878835", - "37.8041668981476" - ] - ], - "shape": { - "columns": 3, - "rows": 5 - } - }, - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Имя файлаlatitudelongitude
07ea94089-38cf-4ca7-affc-def9398282c6.jpg55.69701137.740161
13d08a02f-6761-4f7a-a444-a18dd7891b3d.jpg55.77514037.583102
295cdfd71-26c5-49a7-ad72-d1a02e315947.jpg55.82217837.601576
333bf5a5e-8132-4e52-ae46-041efe3aba4f.jpg55.55282337.552230
4654c8dd6-f024-436c-b306-ef70cf7749ef.jpg55.80718837.804167
\n", - "
" - ], - "text/plain": [ - " Имя файла latitude longitude\n", - "0 7ea94089-38cf-4ca7-affc-def9398282c6.jpg 55.697011 37.740161\n", - "1 3d08a02f-6761-4f7a-a444-a18dd7891b3d.jpg 55.775140 37.583102\n", - "2 95cdfd71-26c5-49a7-ad72-d1a02e315947.jpg 55.822178 37.601576\n", - "3 33bf5a5e-8132-4e52-ae46-041efe3aba4f.jpg 55.552823 37.552230\n", - "4 654c8dd6-f024-436c-b306-ef70cf7749ef.jpg 55.807188 37.804167" - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Называю real так как это данные которые передали нам орги \n", "real_data = pd.concat([garbage_echd, builging_echd], axis=0)\n", @@ -671,155 +526,10 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": null, "id": "9f1566ff", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(138171, 3)" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.microsoft.datawrangler.viewer.v0+json": { - "columns": [ - { - "name": "index", - "rawType": "int64", - "type": "integer" - }, - { - "name": "ID", - "rawType": "object", - "type": "string" - }, - { - "name": "longitude", - "rawType": "float64", - "type": "float" - }, - { - "name": "latitude", - "rawType": "float64", - "type": "float" - } - ], - "ref": "6e301975-35a8-4485-8504-a322cf023d18", - "rows": [ - [ - "1", - "DVN_UZAO_985_3", - "37.589965064", - "55.684061132" - ], - [ - "2", - "DVN_UZAO_920_2", - "37.562047516", - "55.683930012" - ], - [ - "3", - "DVN_UZAO_912_2", - "37.560536155", - "55.686372499" - ], - [ - "4", - "DVN_SVAO_2090_0", - "37.653519456", - "55.815467984" - ], - [ - "5", - "DVN_SVAO_2061_2", - "37.654268193", - "55.823073453" - ] - ], - "shape": { - "columns": 3, - "rows": 5 - } - }, - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
IDlongitudelatitude
1DVN_UZAO_985_337.58996555.684061
2DVN_UZAO_920_237.56204855.683930
3DVN_UZAO_912_237.56053655.686372
4DVN_SVAO_2090_037.65351955.815468
5DVN_SVAO_2061_237.65426855.823073
\n", - "
" - ], - "text/plain": [ - " ID longitude latitude\n", - "1 DVN_UZAO_985_3 37.589965 55.684061\n", - "2 DVN_UZAO_920_2 37.562048 55.683930\n", - "3 DVN_UZAO_912_2 37.560536 55.686372\n", - "4 DVN_SVAO_2090_0 37.653519 55.815468\n", - "5 DVN_SVAO_2061_2 37.654268 55.823073" - ] - }, - "execution_count": 38, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Называю target так как это данные которые мы выгрузили из открытых источников\n", "# На них id камеры (нам нужно это для оптимизации алгоритма)\n", @@ -838,16 +548,6 @@ "data = merge_tables_with_tolerance(target_data, real_data, max_distance_meters=100).drop_duplicates()" ] }, - { - "cell_type": "code", - "execution_count": 36, - "id": "822fd77e", - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd" - ] - }, { "cell_type": "code", "execution_count": null,