diff --git a/.github_template/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml similarity index 100% rename from .github_template/workflows/static_analysis.yml rename to .github/workflows/static_analysis.yml diff --git a/.github_template/workflows/tests.yml b/.github/workflows/tests.yml similarity index 100% rename from .github_template/workflows/tests.yml rename to .github/workflows/tests.yml diff --git a/Makefile b/Makefile index 835f147..dafa8b3 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,6 @@ SHELL = /bin/bash PACKAGE_VERSION:=$(shell git describe --tags --abbrev=0) -DOCKER_REGISTRY=europe-docker.pkg.dev/$(PROJECT_ID)/$(ARTIFACT_REGISTRY) -IMAGE_NAME=ai--server clean_dist: rm -rf dist *.egg-info @@ -24,7 +22,7 @@ test: poetry run pytest -v -p no:cacheprovider tests test_w_coverage: - poetry run pytest -v --junitxml=unit_test_report.xml --cov-report html --cov= tests/ + poetry run pytest -v --junitxml=unit_test_report.xml --cov-report html --cov=photo_export tests/ package: clean_dist poetry build diff --git a/README.md b/README.md index 2fab78a..94fd339 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ -# python-template -[![GitHub license](https://img.shields.io/github/license/SamuelNLP/pyhon-template)](https://github.com/SamuelNLP/pyhon-template/blob/master/LICENSE) -[![codecov](https://codecov.io/gh/SamuelNLP/pyhon-template/branch/master/graph/badge.svg?token=5CGG6XOCIW)](https://codecov.io/gh/SamuelNLP/pyhon-template) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9a6c9cdfe8c94c7584b84da80f97ccc8)](https://app.codacy.com/gh/SamuelNLP/pyhon-template?utm_source=github.com&utm_medium=referral&utm_content=SamuelNLP/pyhon-template&utm_campaign=Badge_Grade_Settings) +# child-diary-photo-export -This is a skeleton repo to be used as a python template for future projects. - -**PRO TIP**: Install Ubuntu or whatever Linux-based system you like! +Tool to export photos from the child diary app. We are using Python 3.10 and [Poetry](https://python-poetry.org/docs/basic-usage/) as the Python dependency management tool. All the currently required dependencies are in the `pyproject.toml` file. diff --git a/configure.sh b/configure.sh deleted file mode 100755 index 3fbd4c6..0000000 --- a/configure.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -# project configuration script - -usage() { - echo "Usage: $0 --name --description " - exit 1 -} - -if [ "$#" -lt 4 ]; then - usage -fi - -while [ "$#" -gt 0 ]; do - case "$1" in - --name) - project_name="$2" - shift 2 - ;; - --description) - project_description="$2" - shift 2 - ;; - *) - usage - ;; - esac -done - -if [ -z "$project_name" ] || [ -z "$project_description" ]; then - usage -fi - -# turn the project name - into _ for pythons sake -project_name_underscore=$(echo "$project_name" | sed 's/-/_/g') - -# 1. rename the module and actions folders -mv module "${project_name_underscore}_server" -mv .github_template .github - -# 2. Define the files to be modified -files_to_replace=( - "Makefile" - "pyproject.toml" -) - -# 3. Replace the placeholders in each file -for file in "${files_to_replace[@]}"; do - sed -i "s//$project_name/g" "$file" - sed -i "s//$project_name_underscore/g" "$file" - sed -i "s//$project_description/g" "$file" -done - -# 4. Remove the instructions_file and configure.sh -rm instructions_after_clone.txt -rm configure.sh diff --git a/git_config.sh b/git_config.sh deleted file mode 100644 index aa1d6a5..0000000 --- a/git_config.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -git config --local user.name "SamuelNLP" -git config --local user.email samuelnlpedro@gmail.com diff --git a/module/__init__.py b/photo_export/__init__.py similarity index 100% rename from module/__init__.py rename to photo_export/__init__.py diff --git a/pyproject.toml b/pyproject.toml index 5012468..acbaa1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] -name = "-server" +name = "photo_export" version = "0.0.0" -description = "" +description = "Tool to export photos from the child diary app." authors = ["Samuel Pedro"] readme = "README.md" license = "LICENSE" diff --git a/setup.py b/setup.py deleted file mode 100644 index b6af203..0000000 --- a/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -import ast -import re -from os import environ -from pathlib import Path - -from setuptools import find_packages, setup - -_PACKAGE_NAME = "module" - -BASE_DIR = Path(__file__).resolve().parent / _PACKAGE_NAME -_VERSION_RE = re.compile(r"__version__\s+=\s+(?P.*)") - - -version = environ.get("CURRENT_VERSION", "SNAPSHOT") - - -def get_version(): - with open(str(BASE_DIR / "__init__.py")) as file: - match = _VERSION_RE.search(file.read()) - version = match.group("version") if match else '"unknown"' - return str(ast.literal_eval(version)) - - -setup( - name=_PACKAGE_NAME.replace("_", "-"), - version=get_version(), - author="Samuel Pedro", - description="Python Template", - include_package_data=True, - install_requires=[], - data_files=[], - packages=find_packages(), -)