-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6efb87
commit 308dddc
Showing
28 changed files
with
18,055 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This file exists so you can easily regenerate your project. | ||
# | ||
# `cookiepatcher` is a convenient shim around `cookiecutter` | ||
# for regenerating projects (it will generate a .cookiecutterrc | ||
# automatically for any template). To use it: | ||
# | ||
# pip install cookiepatcher | ||
# cookiepatcher gh:itisfoundation/cookiecutter-osparc-service project-path | ||
# | ||
# See: | ||
# https://pypi.python.org/pypi/cookiepatcher | ||
# | ||
# Alternatively, you can run: | ||
# | ||
# cookiecutter --overwrite-if-exists --config-file=project-path/.cookiecutterrc gh:itisfoundation/cookiecutter-osparc-service | ||
# | ||
|
||
default_context: | ||
|
||
_checkout: None | ||
_output_dir: '/home/shailesh' | ||
_repo_dir: '/home/shailesh/.cookiecutters/cookiecutter-osparc-service' | ||
_template: 'gh:ITISFoundation/cookiecutter-osparc-service' | ||
author_affiliation: 'INT, Aix-Marseille University, France' | ||
author_email: '[email protected]' | ||
author_name: 'Shailesh Appukuttan' | ||
contact_email: '[email protected]' | ||
default_docker_registry: 'itisfoundation' | ||
docker_base: 'python:3.11' | ||
git_repo: 'github' | ||
git_username: 'appukuttan-shailesh' | ||
number_of_inputs: '1' | ||
number_of_outputs: '2' | ||
project_name: 'VTK Converter' | ||
project_package_name: 'vtk_converter' | ||
project_short_description: 'Module to convert .vtk files to their .stl and .oents' | ||
project_slug: 'vtk-converter' | ||
project_type: 'computational' | ||
release_date: '2024' | ||
version: '0.1.0' | ||
version_display: '0.1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
## Common.dockerignore | ||
|
||
* | ||
!src/ | ||
!service.cli/ | ||
!docker/ | ||
!.osparc/ | ||
|
||
# Common | ||
README.md | ||
CHANGELOG.md | ||
docker-compose.yml | ||
Dockerfile | ||
|
||
# git | ||
.git | ||
.gitattributes | ||
.gitignore | ||
.git* | ||
|
||
## Common.gitignore | ||
|
||
# output folders | ||
build/ | ||
output/ | ||
out/ | ||
|
||
# temporary folders | ||
tmp/ | ||
|
||
# explicit mark | ||
*ignore* | ||
.tmp* | ||
|
||
# vscode configuration | ||
.vscode | ||
|
||
# make outputs | ||
pytest_*.xml | ||
.compose* | ||
|
||
# validation folder | ||
!validation/**/* | ||
# docker ignore | ||
!.dockerignore | ||
# git ignore | ||
!.gitignore | ||
|
||
## Python.gitignore | ||
# FROM https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore | ||
|
||
# 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/ | ||
target/ | ||
|
||
# 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
# check needed variables are defined | ||
if [ ! -v DOCKER_USERNAME ] ||\ | ||
[ ! -v DOCKER_PASSWORD ] ||\ | ||
[ ! -v DOCKER_REGISTRY ]; then | ||
echo "## ERROR: Please define the environs (DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_REGISTRY) in your CI settings!" | ||
exit 1 | ||
fi | ||
|
||
# check script needed variables | ||
if [ ! -v OWNER ]; then | ||
echo "## ERROR: incorrect usage of CI. OWNER (e.g. dockerhub organization like itisfoundation or user private name) not defined!" | ||
exit 1 | ||
fi | ||
|
||
# only upstream is allowed to push to itisfoundation repo | ||
if [ "${OWNER,,}" != "itisfoundation" ] &&\ | ||
{ [ ! -v DOCKER_REGISTRY ] || [ -z "${DOCKER_REGISTRY}" ] || [ "$DOCKER_REGISTRY" = "itisfoundation" ]; }; then | ||
echo "## ERROR: it is not allowed to push to the main dockerhub repository from a fork!" | ||
echo "## Please adapt your CI-defined environs (DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_REGISTRY)" | ||
exit 1 | ||
fi | ||
|
||
# these variable must be available securely from the CI | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
|
||
echo "logged into dockerhub successfully, ready to push" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
echo "------------------------------ environs -----------------------------------" | ||
env | ||
|
||
echo "------------------------------ uname -----------------------------------" | ||
uname -a | ||
lsb_release -a | ||
|
||
echo "------------------------------ python -----------------------------------" | ||
if command -v python; then | ||
python --version | ||
fi | ||
|
||
echo "------------------------------ python3 -----------------------------------" | ||
if command -v python3; then | ||
python3 --version | ||
fi | ||
|
||
echo "------------------------------ docker -----------------------------------" | ||
if command -v docker; then | ||
docker version | ||
fi | ||
|
||
echo "------------------------------ docker-compose -----------------------------------" | ||
if command -v docker-compose; then | ||
docker-compose version | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Github-CI Push/PR vtk-converter | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
# secrets can be set in settings/secrets on github | ||
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
jobs: | ||
build: | ||
name: building vtk-converter | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python: [3.9] | ||
os: [ubuntu-22.04] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: show versions | ||
run: ./.github/show_system_versions.bash | ||
- name: set owner variable | ||
run: echo "OWNER=${GITHUB_REPOSITORY%/*}" >> $GITHUB_ENV | ||
- name: set docker image tag | ||
if: github.ref != 'refs/heads/master' | ||
run: echo "DOCKER_IMAGE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- name: get current image if available | ||
run: make pull-latest || true | ||
- name: build | ||
run: | | ||
make VERSION | ||
make build | ||
make info-build | ||
- name: test | ||
run: make tests | ||
- if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
name: push | ||
run: | | ||
./.github/dockerhub_login.bash | ||
make push | ||
- if: github.event_name == 'push' && github.ref != 'refs/heads/master' | ||
name: push | ||
run: | | ||
./.github/dockerhub_login.bash | ||
make push-version |
Oops, something went wrong.