From dadbe24c82b21cd6869ae3475fddde741fbba374 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Fri, 8 Jul 2022 10:05:33 +0200 Subject: [PATCH] Renaming and minor improvements --- .github/workflows/docker.yaml | 2 +- .vscode/settings.json | 3 +++ Dockerfile | 2 +- README.md | 23 ++++++++++++----------- pyproject.toml | 15 ++++++++++----- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index f54641d..8ac9d06 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -28,7 +28,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: schmelczera/great_ai + images: schmelczera/great-ai - name: Build and push uses: docker/build-push-action@v3 diff --git a/.vscode/settings.json b/.vscode/settings.json index 02ae6aa..3e44f84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -69,6 +69,9 @@ "python.testing.pytestArgs": [ "tests" ], + "python.linting.flake8Enabled": false, + "python.linting.pylintEnabled": false, + "python.linting.mypyEnabled": true, "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true } diff --git a/Dockerfile b/Dockerfile index c8d5730..e99b071 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM python:3.10.4-slim-bullseye LABEL org.opencontainers.image.title="GreatAI package wrapper container" LABEL org.opencontainers.image.vendor="ScoutinScience B.V." LABEL org.opencontainers.image.authors="andras@schmelczer.dev" -LABEL org.opencontainers.image.source="https://github.com/ScoutinScience/great_ai" +LABEL org.opencontainers.image.source="https://github.com/ScoutinScience/great-ai" ENV ENVIRONMENT=production EXPOSE 6060 diff --git a/README.md b/README.md index 827d826..e02a05b 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,26 @@ **work in progress, do not use!** -[![Test](https://github.com/ScoutinScience/great_ai/actions/workflows/test.yml/badge.svg)](https://github.com/ScoutinScience/great_ai/actions/workflows/check.yml) -[![Quality Gate Status](https://sonar.scoutinscience.com/api/project_badges/measure?project=great-ai&metric=alert_status)](https://sonar.scoutinscience.com/dashboard?id=great_ai) -[![Publish on PyPI](https://github.com/ScoutinScience/great_ai/actions/workflows/publish.yaml/badge.svg)](https://github.com/ScoutinScience/great_ai/actions/workflows/publish.yaml) -[![Publish on DockerHub](https://github.com/ScoutinScience/great_ai/actions/workflows/docker.yaml/badge.svg)](https://github.com/ScoutinScience/great_ai/actions/workflows/docker.yaml) -[![Downloads](https://pepy.tech/badge/great_ai/month)](https://pepy.tech/project/great_ai) +[![Test](https://github.com/ScoutinScience/great-ai/actions/workflows/test.yml/badge.svg)](https://github.com/ScoutinScience/great-ai/actions/workflows/check.yml) +[![Quality Gate Status](https://sonar.scoutinscience.com/api/project_badges/measure?project=great-ai&metric=alert_status)](https://sonar.scoutinscience.com/dashboard?id=great-ai) +[![Publish on PyPI](https://github.com/ScoutinScience/great-ai/actions/workflows/publish.yaml/badge.svg)](https://github.com/ScoutinScience/great-ai/actions/workflows/publish.yaml) +[![Publish on DockerHub](https://github.com/ScoutinScience/great-ai/actions/workflows/docker.yaml/badge.svg)](https://github.com/ScoutinScience/great-ai/actions/workflows/docker.yaml) +[![Downloads](https://pepy.tech/badge/great-ai/month)](https://pepy.tech/project/great-ai) -## Find `great_ai` on [DockerHub](https://hub.docker.com/repository/docker/schmelczera/great_ai) +## Find `great-ai` on [DockerHub](https://hub.docker.com/repository/docker/schmelczera/great-ai) ```sh -docker run -p6060:6060 schmelczera/great_ai +docker run -p6060:6060 schmelczera/great-ai ``` Find the dashboard at [http://localhost:6060](http://localhost:6060/dashboard/). -## Find `great_ai` on [PyPI](https://pypi.org/project/great_ai/) +## Find `great-ai` on [PyPI](https://pypi.org/project/great-ai/) ```sh -pip install great_ai +pip install great-ai ``` ```python @@ -33,13 +33,14 @@ def hello_world(name: str) -> str: ``` > Create a new file called `main.py` -Deploy by executing `python3 -m great_ai main.py` +Deploy by executing `python3 -m great-ai main.py` +> Or: `python3 -m great-ai main.py` Find the dashboard at [http://localhost:6060](http://localhost:6060/dashboard/). ### Contribute ```sh -pip install 'great_ai[dev]' +pip install 'great-ai[dev]' ``` diff --git a/pyproject.toml b/pyproject.toml index a9a6939..f321ccf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,11 @@ requires = ["flit_core >=3.2,<4"] build-backend = "flit_core.buildapi" +[tool.flit.module] +name = "great_ai" # Module's import name/local folder name + [project] -name = "great_ai" +name = "great-ai" # PyPI package name dynamic = ["version", "description"] readme = "README.md" authors = [{ name = "AndrĂ¡s Schmelczer", email = "andras@schmelczer.dev" }] @@ -59,9 +62,11 @@ dev = [ ] [project.urls] -Homepage = "https://github.com/ScoutinScience/great_ai" -DockerHub = "https://hub.docker.com/repository/docker/schmelczera/great_ai" +Homepage = "https://github.com/ScoutinScience/great-ai" +DockerHub = "https://hub.docker.com/repository/docker/schmelczera/great-ai" [project.scripts] -great_ai = "great_ai:main" -large_file = "great_ai.large_file:main" +great_ai = "great_ai.__main__:main" +great-ai = "great_ai.__main__:main" +large_file = "great_ai.large_file.__main__:main" +large-file = "great_ai.large_file.__main__:main"