Skip to content
Snippets Groups Projects
Commit 5dc73b82 authored by Dmitrii Novikov (EPAM)'s avatar Dmitrii Novikov (EPAM)
Browse files

Merge branch 'remove-python-project' into 'main'

Remove python project

See merge request !7
parents 63b33513 4aefbc50
No related branches found
No related tags found
1 merge request!7Remove python project
Pipeline #243843 passed
.env/
.venv/
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
pip-log.txt
pip-delete-this-directory.txt
.tox
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
*.log
.git*
**/*.md
**/*.yml
**/*.yaml
**/Dockerfile*
.*
\ No newline at end of file
......@@ -3,9 +3,3 @@ root = true
[*]
insert_final_newline = true
end_of_line = lf
[*.toml]
charset = utf-8
[*.py]
profile = black
[flake8]
format = pylint
count = true
exclude =
.git,
__pycache__,
build,
dist
max-complexity = 10
max-line-length = 120
max-imports = 10
max-arguments = 10
max-local-variables = 10
max-methods = 15
max-module-expressions = 20
max-line-complexity = 20
max-jones-score = 20
max-awaits = 7
max-expressions = 20
max-function-length = 70
max-parameters-amount = 9
max-cognitive-complexity = 8
* text=auto eol=lf
\ No newline at end of file
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
HELP.md
target/
bin/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml
# ruff
.ruff_cache/
# LSP config files
pyrightconfig.json
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
### VS Code ###
.vscode/
.gradle/
# Recycle Bin used on file shares
$RECYCLE.BIN/
### macOS ###
*.DS_Store
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
### Integration tests ###
.gradle
# Windows shortcuts
*.lnk
### Environment Configuration ###
*.env
.envrc
/DocumentDB.Spatial.Sql.dll
/Microsoft.Azure.Documents.ServiceInterop.dll
\ No newline at end of file
<settings>
<profiles>
<!-- This profile uses the CI-Token to authenticate with the server,
and is the default case -->
<profile>
<id>GitLab-Authenticate-With-Job-Token</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<repo.releases.id>community-maven-repo</repo.releases.id>
<publish.snapshots.id>community-maven-via-job-token</publish.snapshots.id>
<publish.releases.id>community-maven-via-job-token</publish.releases.id>
<repo.releases.url>
https://community.opengroup.org/api/v4/groups/17/-/packages/maven
</repo.releases.url>
<publish.snapshots.url>
https://community.opengroup.org/api/v4/projects/44/packages/maven
</publish.snapshots.url>
<publish.releases.url>
https://community.opengroup.org/api/v4/projects/44/packages/maven
</publish.releases.url>
</properties>
</profile>
<!-- This profile uses a personal token to authenticate,
which is useful for local or manual runs.
The presence of the COMMUNITY_MAVEN_TOKEN variable triggers this and overrides
the CI Token based authentication-->
<profile>
<id>GitLab-Authenticate-With-Private-Token</id>
<activation>
<property>
<name>env.COMMUNITY_MAVEN_TOKEN</name>
</property>
</activation>
<properties>
<repo.releases.id>community-maven-repo</repo.releases.id>
<publish.snapshots.id>community-maven-via-private-token</publish.snapshots.id>
<publish.releases.id>community-maven-via-private-token</publish.releases.id>
<repo.releases.url>
https://community.opengroup.org/api/v4/groups/17/-/packages/maven
</repo.releases.url>
<publish.snapshots.url>
https://community.opengroup.org/api/v4/projects/44/packages/maven
</publish.snapshots.url>
<publish.releases.url>
https://community.opengroup.org/api/v4/projects/44/packages/maven
</publish.releases.url>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>community-maven-via-job-token</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${env.CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
<server>
<id>community-maven-via-private-token</id>
<configuration>
<httpHeaders>
<property>
<name>Private-Token</name>
<value>${env.COMMUNITY_MAVEN_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
\ No newline at end of file
repos:
- repo: https://github.com/floatingpurr/sync_with_poetry
rev: 1.1.0 # the revision or tag to clone at
hooks:
- id: sync_with_poetry
args: [] # optional args
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: detect-private-key
- id: debug-statements
- id: trailing-whitespace
files: "(app)|(tests)"
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
# Formatters
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
require_serial: true
args: [
"--diff",
"--check"
]
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: local
hooks:
- id: isort
name: isort
entry: isort
language: system
types: [python]
require_serial: true
args: [
"--diff",
"--check-only"
]
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id: autoflake
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: https://github.com/myint/unify
rev: v0.5
hooks:
- id: unify
args: [
-r,
--in-place,
--quote="
]
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
# Linters
- repo: local
hooks:
- id: flake8
name: flake8
entry: flake8
language: system
types: [python]
require_serial: true
args: [--config=.flake8]
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
require_serial: true
args: [
--rcfile=.pylintrc.toml
]
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
exclude: "(app/models/domain)|(app/models/data_schemas)|(devops/aws)"
This diff is collapsed.
{
"isort.args": [
"--profile",
"black"
],
"mypy-type-checker.args": [
"--config-file=${workspaceFolder}/pyproject.toml"
],
"pylint.args": [
"--rcfile=${workspaceFolder}/.pylintrc.toml"
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
}
}
# The builder image, used to build the virtual environment
FROM python:3.11-bullseye as builder
# Install package manager
RUN pip install poetry==1.7.1
# Define environment
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache
# Set work directory
WORKDIR /app
# Copy project dependencies
COPY pyproject.toml poetry.lock ./
# Install production dependencies only and remove poetry cache directory
RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR
# The runtime image, used to run the service
FROM python:3.11-slim-bullseye as runtime
# Set virtual environment path and add it to the system Path
ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin:$PATH"
# Copy project dependencies from builder stage
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
# Copy project code
COPY app/ /app/
# Set work directory
WORKDIR /app
# Run service
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
"""Docstring."""
"""Docstring."""
"""Docstring."""
"""Docstring."""
"""Docstring."""
"""This is the PWS application initializer."""
from fastapi import FastAPI
def create_app() -> FastAPI:
"""Initialize and configure the FastAPI application.
Returns:
FastAPI: The configured and initialized FastAPI application.
"""
app = FastAPI()
print("hello")
return app
app = create_app()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
services:
api:
image: community.opengroup.org:5555/osdu/platform/system/project-and-workflow
build:
context: .
dockerfile: Dockerfile
container_name: pws
environment:
- WATCHFILES_FORCE_POLLING=true
restart: on-failure
ports:
- "80:80"
develop:
watch:
- action: sync
path: ./app/
target: /app/
ignore:
- .venv/
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80", "--reload"]
This diff is collapsed.
pom.xml 0 → 100644
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opengroup.osdu</groupId>
<artifactId>pws-service</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>pws-service</name>
<description>Project and Workflow service</description>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<modules>
<module>pws-core</module>
<module>provider/pws-aws</module>
</modules>
<distributionManagement>
<repository>
<id>${publish.releases.id}</id>
<url>${publish.releases.url}</url>
</repository>
<snapshotRepository>
<id>${publish.snapshots.id}</id>
<url>${publish.snapshots.url}</url>
</snapshotRepository>
</distributionManagement>
<properties>
<java.version>17</java.version>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<docker.image.prefix>opendes</docker.image.prefix>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<os-core-common.version>0.25.0</os-core-common.version>
<openapi.version>1.6.14</openapi.version>
<spring.version>2.17.1</spring.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>os-core-common</artifactId>
<version>${os-core-common.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${openapi.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>${repo.releases.id}</id>
<url>${repo.releases.url}</url>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.4</version>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.0.5</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>
${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>Default</id>
<activation>
<property>
<name>!repo.releases.id</name>
</property>
</activation>
<properties>
<repo.releases.id>community-maven-repo</repo.releases.id>
<publish.snapshots.id>community-maven-via-job-token</publish.snapshots.id>
<publish.releases.id>community-maven-via-job-token</publish.releases.id>
<repo.releases.url>
https://community.opengroup.org/api/v4/groups/17/-/packages/maven
</repo.releases.url>
<publish.snapshots.url>
https://community.opengroup.org/api/v4/projects/74/packages/maven
</publish.snapshots.url>
<publish.releases.url>
https://community.opengroup.org/api/v4/projects/74/packages/maven
</publish.releases.url>
</properties>
</profile>
</profiles>
</project>
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opengroup.osdu</groupId>
<artifactId>pws-service</artifactId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<!-- <parent>-->
<!-- <groupId>org.opengroup.osdu</groupId>-->
<!-- <artifactId>pws-service</artifactId>-->
<!-- <version>0.1.0-SNAPSHOT</version>-->
<!--&lt;!&ndash; <relativePath>../../pom.xml</relativePath>&ndash;&gt;-->
<!-- </parent>-->
<artifactId>pws-aws</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>pws-aws</name>
<description>Project and Workflow service AWS module</description>
<properties/>
<dependencyManagement/>
<dependencies>
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>pws-core</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.4</version>
<configuration>
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profiles.active>local</spring.profiles.active>
</properties>
</profile>
<profile>
<id>dev</id>
<properties>
<spring.profiles.active>dev</spring.profiles.active>
</properties>
</profile>
</profiles>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>spring-boot</classifier>
<mainClass>
org.opengroup.osdu.storage.provider.gcp.StorageApplicationGCP
</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment