# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'src',
 'auth_infrastructure': 'src/auth_infrastructure',
 'auth_infrastructure.queries': 'src/auth_infrastructure/queries',
 'auth_infrastructure.services': 'src/auth_infrastructure/services',
 'cliapp': 'src/cliapp',
 'cliapp.subapps': 'src/cliapp/subapps',
 'command_bus': 'src/command_bus',
 'foundation': 'src/foundation',
 'foundation.value_objects': 'src/foundation/value_objects',
 'karp_v6_api': 'src/karp_v6_api',
 'karp_v6_api.contrib': 'src/karp_v6_api/contrib',
 'karp_v6_api.dependencies': 'src/karp_v6_api/dependencies',
 'karp_v6_api.routes': 'src/karp_v6_api/routes',
 'lex': 'src/lex',
 'lex.application': 'src/lex/application',
 'lex.application.dtos': 'src/lex/application/dtos',
 'lex.application.queries': 'src/lex/application/queries',
 'lex.application.repositories': 'src/lex/application/repositories',
 'lex.application.use_cases': 'src/lex/application/use_cases',
 'lex.domain': 'src/lex/domain',
 'lex.domain.entities': 'src/lex/domain/entities',
 'lex.domain.events': 'src/lex/domain/events',
 'lex.domain.value_objects': 'src/lex/domain/value_objects',
 'lex_infrastructure': 'src/lex_infrastructure',
 'lex_infrastructure.queries': 'src/lex_infrastructure/queries',
 'lex_infrastructure.repositories': 'src/lex_infrastructure/repositories',
 'lex_infrastructure.sql': 'src/lex_infrastructure/sql',
 'main': 'src/main',
 'main.migrations': 'src/main/migrations',
 'main.migrations.versions': 'src/main/migrations/versions',
 'search': 'src/search',
 'search.application': 'src/search/application',
 'search.application.queries': 'src/search/application/queries',
 'search.application.repositories': 'src/search/application/repositories',
 'search.application.transformers': 'src/search/application/transformers',
 'search.domain': 'src/search/domain',
 'search.domain.query_dsl': 'src/search/domain/query_dsl',
 'search_infrastructure': 'src/search_infrastructure',
 'search_infrastructure.elasticsearch6': 'src/search_infrastructure/elasticsearch6',
 'search_infrastructure.queries': 'src/search_infrastructure/queries',
 'search_infrastructure.repositories': 'src/search_infrastructure/repositories',
 'search_infrastructure.transformers': 'src/search_infrastructure/transformers',
 'tests': 'src/tests',
 'tests.e2e': 'src/tests/e2e',
 'tests.factories': 'src/tests/factories',
 'tests.foundation': 'src/tests/foundation',
 'tests.foundation.unit': 'src/tests/foundation/unit',
 'tests.integration': 'src/tests/integration',
 'tests.integration.auth': 'src/tests/integration/auth',
 'tests.unit': 'src/tests/unit',
 'tests.unit.auth': 'src/tests/unit/auth',
 'tests.unit.auth_infrastructure': 'src/tests/unit/auth_infrastructure',
 'tests.unit.lex': 'src/tests/unit/lex',
 'tests.unit.lex.value_objects': 'src/tests/unit/lex/value_objects',
 'tests.unit.lex_infrastructure': 'src/tests/unit/lex_infrastructure',
 'tests.unit.search': 'src/tests/unit/search',
 'tests.unit.search_infrastructure': 'src/tests/unit/search_infrastructure',
 'utility': 'src/utility'}

packages = \
['auth',
 'auth.application',
 'auth.application.queries',
 'auth.domain',
 'auth.domain.entities',
 'auth.domain.value_objects',
 'auth_infrastructure',
 'auth_infrastructure.queries',
 'auth_infrastructure.services',
 'cliapp',
 'cliapp.subapps',
 'command_bus',
 'foundation',
 'foundation.value_objects',
 'karp_v6_api',
 'karp_v6_api.contrib',
 'karp_v6_api.dependencies',
 'karp_v6_api.routes',
 'lex',
 'lex.application',
 'lex.application.dtos',
 'lex.application.queries',
 'lex.application.repositories',
 'lex.application.use_cases',
 'lex.domain',
 'lex.domain.entities',
 'lex.domain.events',
 'lex.domain.value_objects',
 'lex_infrastructure',
 'lex_infrastructure.queries',
 'lex_infrastructure.repositories',
 'lex_infrastructure.sql',
 'main',
 'main.migrations',
 'main.migrations.versions',
 'search',
 'search.application',
 'search.application.queries',
 'search.application.repositories',
 'search.application.transformers',
 'search.domain',
 'search.domain.query_dsl',
 'search_infrastructure',
 'search_infrastructure.elasticsearch6',
 'search_infrastructure.queries',
 'search_infrastructure.repositories',
 'search_infrastructure.transformers',
 'tests',
 'tests.e2e',
 'tests.factories',
 'tests.foundation',
 'tests.foundation.unit',
 'tests.integration',
 'tests.integration.auth',
 'tests.unit',
 'tests.unit.auth',
 'tests.unit.auth_infrastructure',
 'tests.unit.lex',
 'tests.unit.lex.value_objects',
 'tests.unit.lex_infrastructure',
 'tests.unit.search',
 'tests.unit.search_infrastructure',
 'utility']

package_data = \
{'': ['*']}

install_requires = \
['Deprecated>=1.2.13,<2.0.0',
 'TatSu>=5.8.3,<6.0.0',
 'alembic>=1.8.1,<2.0.0',
 'asgi-correlation-id>=3.0.1,<4.0.0',
 'elasticsearch-dsl>=6,<7',
 'elasticsearch>=6,<7',
 'environs>=9.3.4,<10.0.0',
 'fastapi>=0.89,<0.90',
 'injector>=0.20.1,<0.21.0',
 'json-streams>=0.12.0,<0.13.0',
 'karp-lex-core>=0.5.1',
 'paradigmextract>=0.1.1,<0.2.0',
 'pydantic>=1.10.2,<2.0.0',
 'pyjwt[crypto]>=2.6.0,<3.0.0',
 'python-dotenv>=0.19.0,<0.20.0',
 'python-json-logger>=2.0.4,<3.0.0',
 'regex>=2022.8.17,<2023.0.0',
 'sb-json-tools>=0.9.1,<0.10.0',
 'sqlalchemy-json>=0.5.0,<0.6.0',
 'sqlalchemy-utils>=0.38.3,<0.39.0',
 'sqlalchemy>=1.4.44,<2.0.0',
 'tabulate>=0.9.0,<0.10.0',
 'tenacity>=8.0.1,<9.0.0',
 'tqdm>=4.64.1,<5.0.0',
 'typer>=0.7.0,<0.8.0',
 'ulid-py>=1.1.0,<2.0.0',
 'urllib3>=1.26.13,<2.0.0']

extras_require = \
{'mysql': ['PyMySQL>=1.0.2,<2.0.0',
           'aiomysql>=0.1.1,<0.2.0',
           'mysqlclient>=2.1.1,<3.0.0'],
 'sqlite': ['aiosqlite>=0.17.0,<0.18.0']}

entry_points = \
{'console_scripts': ['karp-cli = karp.cliapp.main:cliapp']}

setup_kwargs = {
    'name': 'karp-backend',
    'version': '6.2.0',
    'description': '',
    'long_description': "# Karp backend\n\n[![PyPI version](https://badge.fury.io/py/karp-backend.svg)](https://badge.fury.io/py/karp-backend)\n[![Build Status](https://github.com/spraakbanken/karp-backend/workflows/Build/badge.svg)](https://github.com/spraakbanken/karp-backend/actions)\n[![CodeScene Code Health](https://codescene.io/projects/24151/status-badges/code-health)](https://codescene.io/projects/24151)\n[![codecov](https://codecov.io/gh/spraakbanken/karp-backend/branch/main/graph/badge.svg?token=iwTQnHKOpm)](https://codecov.io/gh/spraakbanken/karp-backend)\n\nThis in the version 6 of Karp backend, [for the legacy version (v5)](https://github.com/spraakbanken/karp-backend-v5).\n\n## Setup\n\nThis project uses [poetry](https://python-poetry.org) and\n[MariaDB](https://mariadb.org/).\n\n1. Run `make install` or `make install-dev` for a develop-install\n2. Install MariaDB and create a database\n3. Setup environment variables (can be placed in a `.env` file in the root and then **?** `poetry run` sets those):\n   ```\n   export DB_DATABASE=<name of database>\n   export DB_USER=<database user>\n   export DB_PASSWORD=<user's password>\n   export DB_HOST=localhost\n   export AUTH_JWT_PUBKEY_PATH=/path/to/pubkey\n   ```\n4. Activate the virtual environment by running: `poetry shell`\n5. Run `karp-cli db up` to initialize database\n6. Run `make serve` or `make serve-w-reload` to start development server\n\n   or `poetry shell` and then `uvicorn asgi:app`\n\n7. To setup Elasticsearch, download Elasticsearch 6.x and start it\n8. Install elasticsearch python libs for the right version\n   1. If you use Elasticsearch 6.x, run `source <VENV_NAME>/bin/activate` and `pip install -e .[elasticsearch6]`\n9. Add environment variables\n\n```\nexport ES_ENABLED=true\nexport ELASTICSEARCH_HOST=localhost:9200\nexport SEARCH_CONTEXT=es6_search_service\n```\n\n## Create test resources\n\n1. `poetry shell` and then:\n2. `karp-cli entry-repo create assets/testing/config/places.json`\n3. `karp-cli resource create assets/testing/config/places.json`\n4. `karp-cli entries add places assets/testing/data/places.json`\n5. Do the same for `municipalities`\n6. `karp-cli resource publish places`\n7. `karp-cli resource publish municipalities`\n\n## Pre-processing data before publishing\n\n** TODO: review this **\nCan be used to have less downtime, because sometimes the preprocessing may\nbe faster on another machine than the machine that talks to Elasticsearch.\nDo `create` and `import` on both machines, with the same data. Use\nmachine 1 to preprocess and use result on machine 2.\n\n1. Create resource and import data as usual.\n2. Run `karp-cli preprocess --resource_id places --version 2 --filename places_preprocessed`\n\n   `places_preprocessed` will contain a pickled dataset containing everything that is needed\n\n3. Run `karp-cli publish_preprocessed --resource_id places --version 2 --data places_preprocessed`\n4. Alternatively run `karp-cli reindex_preprocessed --resource_id places --data places_preprocessed`\n   , if the resource was already published.\n\n## Technologies\n\n### Python\n\n- Poetry >= 3.10\n- FastAPI\n- SQLAlchemy\n- Typer\n- Elasticsearch\n- Elasticsearch DSL\n\n### Databases\n\n- MariaDB\n- Elasticsearch\n\n## Development\n\n### Version handling\n\nVersion can be bumped with [`bump2version`](https://pypi.org/project/bump2version/).\n\nUsage:\n\n- Increase patch number `a.b.X => a.b.(X+1)`: `make bumpversion` or `bumpversion patch`\n- Increase minor number `a.X.c => a.(X+1).0`: `make bumpversion-minor` or `bumpversion minor`\n- Increase major number `X.b.c => (X+1).0.0`: `make bumpversion-major` or `bumpversion major`\n- To custom version `a.b.c => X.Y.Z`: `bumpversion --new-version X.Y.Z`\n\n`bumpversion` is configured in [`.bumpversion.cfg`](karp-backend/.bumpversion.cfg).\n\nThe version is changed in the following files:\n\n- [`setup.py`](setup.py)\n- [`src/karp/__init__.py`](src/karp/__init__.py)\n- [`.bumpversion.cfg`](.bumpversion.cfg)\n\n# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## Latest Changes\n\n* changed: use camelCase in all api interactions. PR [#225](https://github.com/spraakbanken/karp-backend/pull/225) by [@kod-kristoff](https://github.com/kod-kristoff).\n* fix: enable cli resource update again. PR [#222](https://github.com/spraakbanken/karp-backend/pull/222) by [@kod-kristoff](https://github.com/kod-kristoff).\n",
    'author': 'Kristoffer Andersson',
    'author_email': 'kristoffer.andersson@gu.se',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'None',
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'extras_require': extras_require,
    'entry_points': entry_points,
    'python_requires': '>=3.10,<4.0',
}


setup(**setup_kwargs)
