Skip to content

Commit 2736c23

Browse files
author
Javier Garcia Ordonez
committed
reboot w new cookiecutter version ++ lots of fixes
0 parents  commit 2736c23

23 files changed

+1172
-0
lines changed

.cookiecutterrc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This file exists so you can easily regenerate your project.
2+
#
3+
# `cookiepatcher` is a convenient shim around `cookiecutter`
4+
# for regenerating projects (it will generate a .cookiecutterrc
5+
# automatically for any template). To use it:
6+
#
7+
# pip install cookiepatcher
8+
# cookiepatcher gh:itisfoundation/cookiecutter-osparc-service project-path
9+
#
10+
# See:
11+
# https://pypi.python.org/pypi/cookiepatcher
12+
#
13+
# Alternatively, you can run:
14+
#
15+
# cookiecutter --overwrite-if-exists --config-file=project-path/.cookiecutterrc gh:itisfoundation/cookiecutter-osparc-service
16+
#
17+
18+
default_context:
19+
20+
_checkout: 'work/jgo/new-service-integration-library'
21+
_output_dir: '/home/ordonez/osparc-services'
22+
_repo_dir: '/home/ordonez/.cookiecutters/cookiecutter-osparc-service'
23+
_template: 'gh:ITISFoundation/cookiecutter-osparc-service'
24+
author_affiliation: 'ITIS Foundation'
25+
author_email: '[email protected]'
26+
author_name: 'Lucia Moya Sans'
27+
contact_email: '[email protected]'
28+
default_docker_registry: 'itisfoundation'
29+
docker_base: 'python:3.11'
30+
git_repo: 'github'
31+
git_username: 'lmoyasans'
32+
number_of_inputs: '1'
33+
number_of_outputs: '1'
34+
project_name: 'pymorphosonic'
35+
project_package_name: 'pymorphosonic'
36+
project_short_description: 'pymorphosonic'
37+
project_slug: 'pymorphosonic'
38+
project_type: 'computational'
39+
release_date: '2025'
40+
version: '0.1.0'
41+
version_display: '0.1.0'

.dockerignore

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
## Common.dockerignore
2+
3+
*
4+
!src/
5+
!service.cli/
6+
!docker/
7+
!.osparc/
8+
9+
# Common
10+
README.md
11+
CHANGELOG.md
12+
docker-compose.yml
13+
Dockerfile
14+
15+
# git
16+
.git
17+
.gitattributes
18+
.gitignore
19+
.git*
20+
21+
## Common.gitignore
22+
23+
# output folders
24+
build/
25+
output/
26+
out/
27+
28+
# temporary folders
29+
tmp/
30+
31+
# explicit mark
32+
*ignore*
33+
.tmp*
34+
35+
# vscode configuration
36+
.vscode
37+
38+
# make outputs
39+
pytest_*.xml
40+
.compose*
41+
42+
# validation folder
43+
!validation/**/*
44+
# docker ignore
45+
!.dockerignore
46+
# git ignore
47+
!.gitignore
48+
49+
## Python.gitignore
50+
# FROM https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
51+
52+
# Byte-compiled / optimized / DLL files
53+
__pycache__/
54+
*.py[cod]
55+
*$py.class
56+
57+
# C extensions
58+
*.so
59+
60+
# Distribution / packaging
61+
.Python
62+
build/
63+
develop-eggs/
64+
dist/
65+
downloads/
66+
eggs/
67+
.eggs/
68+
lib/
69+
lib64/
70+
parts/
71+
sdist/
72+
var/
73+
wheels/
74+
share/python-wheels/
75+
*.egg-info/
76+
.installed.cfg
77+
*.egg
78+
MANIFEST
79+
80+
# PyInstaller
81+
# Usually these files are written by a python script from a template
82+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
83+
*.manifest
84+
*.spec
85+
86+
# Installer logs
87+
pip-log.txt
88+
pip-delete-this-directory.txt
89+
90+
# Unit test / coverage reports
91+
htmlcov/
92+
.tox/
93+
.nox/
94+
.coverage
95+
.coverage.*
96+
.cache
97+
nosetests.xml
98+
coverage.xml
99+
*.cover
100+
*.py,cover
101+
.hypothesis/
102+
.pytest_cache/
103+
cover/
104+
105+
# Translations
106+
*.mo
107+
*.pot
108+
109+
# Django stuff:
110+
*.log
111+
local_settings.py
112+
db.sqlite3
113+
db.sqlite3-journal
114+
115+
# Flask stuff:
116+
instance/
117+
.webassets-cache
118+
119+
# Scrapy stuff:
120+
.scrapy
121+
122+
# Sphinx documentation
123+
docs/_build/
124+
125+
# PyBuilder
126+
.pybuilder/
127+
target/
128+
129+
# Jupyter Notebook
130+
.ipynb_checkpoints
131+
132+
# IPython
133+
profile_default/
134+
ipython_config.py
135+
136+
# pyenv
137+
# For a library or package, you might want to ignore these files since the code is
138+
# intended to run in multiple environments; otherwise, check them in:
139+
# .python-version
140+
141+
# pipenv
142+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
143+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
144+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
145+
# install all needed dependencies.
146+
#Pipfile.lock
147+
148+
# poetry
149+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
150+
# This is especially recommended for binary packages to ensure reproducibility, and is more
151+
# commonly ignored for libraries.
152+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
153+
#poetry.lock
154+
155+
# pdm
156+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
157+
#pdm.lock
158+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
159+
# in version control.
160+
# https://pdm.fming.dev/#use-with-ide
161+
.pdm.toml
162+
163+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
164+
__pypackages__/
165+
166+
# Celery stuff
167+
celerybeat-schedule
168+
celerybeat.pid
169+
170+
# SageMath parsed files
171+
*.sage.py
172+
173+
# Environments
174+
.env
175+
.venv
176+
env/
177+
venv/
178+
ENV/
179+
env.bak/
180+
venv.bak/
181+
182+
# Spyder project settings
183+
.spyderproject
184+
.spyproject
185+
186+
# Rope project settings
187+
.ropeproject
188+
189+
# mkdocs documentation
190+
/site
191+
192+
# mypy
193+
.mypy_cache/
194+
.dmypy.json
195+
dmypy.json
196+
197+
# Pyre type checker
198+
.pyre/
199+
200+
# pytype static type analyzer
201+
.pytype/
202+
203+
# Cython debug symbols
204+
cython_debug/
205+
206+
# PyCharm
207+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
208+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
209+
# and can be added to the global gitignore or merged into this file. For a more nuclear
210+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
211+
#.idea/

.github/dockerhub_login.bash

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
3+
set -euo pipefail
4+
IFS=$'\n\t'
5+
6+
# check needed variables are defined
7+
if [ ! -v DOCKER_USERNAME ] ||\
8+
[ ! -v DOCKER_PASSWORD ] ||\
9+
[ ! -v DOCKER_REGISTRY ]; then
10+
echo "## ERROR: Please define the environs (DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_REGISTRY) in your CI settings!"
11+
exit 1
12+
fi
13+
14+
# check script needed variables
15+
if [ ! -v OWNER ]; then
16+
echo "## ERROR: incorrect usage of CI. OWNER (e.g. dockerhub organization like itisfoundation or user private name) not defined!"
17+
exit 1
18+
fi
19+
20+
# only upstream is allowed to push to itisfoundation repo
21+
if [ "${OWNER,,}" != "itisfoundation" ] &&\
22+
{ [ ! -v DOCKER_REGISTRY ] || [ -z "${DOCKER_REGISTRY}" ] || [ "$DOCKER_REGISTRY" = "itisfoundation" ]; }; then
23+
echo "## ERROR: it is not allowed to push to the main dockerhub repository from a fork!"
24+
echo "## Please adapt your CI-defined environs (DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_REGISTRY)"
25+
exit 1
26+
fi
27+
28+
# these variable must be available securely from the CI
29+
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
30+
31+
echo "logged into dockerhub successfully, ready to push"
32+
exit 0

.github/show_system_versions.bash

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
3+
set -euo pipefail
4+
IFS=$'\n\t'
5+
6+
echo "------------------------------ environs -----------------------------------"
7+
env
8+
9+
echo "------------------------------ uname -----------------------------------"
10+
uname -a
11+
lsb_release -a
12+
13+
echo "------------------------------ python -----------------------------------"
14+
if command -v python; then
15+
python --version
16+
fi
17+
18+
echo "------------------------------ python3 -----------------------------------"
19+
if command -v python3; then
20+
python3 --version
21+
fi
22+
23+
echo "------------------------------ docker -----------------------------------"
24+
if command -v docker; then
25+
docker version
26+
fi
27+
28+
echo "------------------------------ docker-compose -----------------------------------"
29+
if command -v docker-compose; then
30+
docker-compose version
31+
fi

.github/workflows/check-image.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build and check image
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
verify-image-build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repo content
10+
uses: actions/checkout@v2
11+
- name: ooil version
12+
uses: docker://itisfoundation/ci-service-integration-library:latest
13+
with:
14+
args: ooil --version
15+
- name: Assemble docker compose spec
16+
uses: docker://itisfoundation/ci-service-integration-library:latest
17+
with:
18+
args: ooil compose
19+
- name: Build all images if multiple
20+
uses: docker://itisfoundation/ci-service-integration-library:latest
21+
with:
22+
args: docker compose build

0 commit comments

Comments
 (0)