Skip to content

Commit

Permalink
Is1884/using integration library (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov authored Oct 14, 2022
1 parent eb7589b commit 2991408
Show file tree
Hide file tree
Showing 36 changed files with 320 additions and 1,317 deletions.
4 changes: 0 additions & 4 deletions .github/CODEOWNERS

This file was deleted.

41 changes: 37 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
<!-- **WIP-** prefix in title if still work in progress -->
<!--
WIP: work in progress
Consider prefix your PR message with an emoticon
🐛 bugfix
✨ new feature
🔨 refactoring
🏗️ maintenance
📚 documentation
and append (⚠️ devops) if changes in devops configuration required before deploying
SEE https://github.com/dannyfritz/commit-message-emoji
SEE https://emojipedia.org
-->

## What do these changes do?

<!-- Please give a short brief about these changes. -->
<!-- Explain reviewers what is this PR about -->


## Related issue/s

<!-- Enumerate other issues
e.g.
- ITISFoundation/osparc-issues#26 : support onboarding of SPARC computational mode, S-D1, Y3M1-12
- ITISFoundation/osparc-issues#304: (Part 2) Prep2Go: creating features to support complex S4L scripts
-->


## How to test

<!-- Give reviewers some hits or code snippets on how could this be tested -->

## Related issue number

## Checklist

- [ ] I think the code is well written
<!-- This is YOUR section [OPTIONAL]
Add here YOUR checklist/notes her and SEE the progress of the case!
- [ ] Unit tests for the changes exist
- [ ] Documentation reflects the changes
- [ ] If you design a new module, add your user to .github/CODEOWNERS
-->
4 changes: 2 additions & 2 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.8]
python: [3.9]
os: [ubuntu-20.04]
docker_buildx: [v0.5.1]
docker_buildx: [v0.8.2]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ tmp/
*ignore*
.tmp*

# vscode configuration
.vscode

TODO.md
# IDEs config
.vscode/launch.json
.vscode/settings.json
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"eamodio.gitlens",
"ms-python.python",
"samuelcolvin.jinjahtml",
]
}
23 changes: 23 additions & 0 deletions .vscode/launch.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Run Test",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"--ff",
"--log-cli-level=INFO",
"--pdb",
"--setup-show",
"-sx",
"-vv",
"${file}"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"justMyCode": false
}
]
}
39 changes: 39 additions & 0 deletions .vscode/settings.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// This is a template. Clone and replace extension ".template.json" by ".json"
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"eslint.alwaysShowStatus": true,
"files.associations": {
".*rc": "ini",
".env*": "ini",
"Dockerfile*": "dockerfile",
"**/requirements/*.txt": "pip-requirements",
"**/requirements/*.in": "pip-requirements",
"*Makefile": "makefile",
"*.cwl": "yaml"
},
"files.eol": "\n",
"files.exclude": {
"**/__pycache__": true
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"python.formatting.autopep8Args": [
"--max-line-length 140"
],
"python.analysis.extraPaths": [
"./tests"
],
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"[python]": {
"editor.detectIndentation": false,
"editor.tabSize": 4
},
"[makefile]": {
"editor.insertSpaces": false
},
"python.testing.pytestEnabled": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright 2019 Sylvain Anderegg <[email protected]>.
Copyright 2019 IT'IS Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ TEMPLATE = $(CURDIR)
wheel \
setuptools

requirements.txt: requirements.in
# freezes requirements
.venv/bin/pip-compile --upgrade --build-isolation --output-file $@ $(word2, $^)

devenv: .venv ## create a python virtual environment with tools to dev, run and tests cookie-cutter
# installing extra tools
Expand Down Expand Up @@ -84,7 +87,7 @@ help: ## this colorful help
@awk --posix 'BEGIN {FS = ":.*?## "} /^[[:alpha:][:space:]_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@echo ""

git_clean_args = -dxf --exclude=.vscode/
git_clean_args = -dxf --exclude=.vscode/ --exclude=.venv/ --exclude=.python

.PHONY: clean clean-force
clean: ## cleans all unversioned files in project and temp files create by this makefile
Expand All @@ -98,3 +101,11 @@ clean: ## cleans all unversioned files in project and temp files create by this
clean-force: clean
# removing .venv
-@rm -rf .venv


.PHONY: info
info: ## displays info about the scope
# python
@echo $(shell which python)
@python --version
@echo $(shell which pip)
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
cookiecutter-osparc-service
==========================================
# cookiecutter-osparc-service

Cookicutter to generate an oSparc compatible service for the oSparc simcore platform.
Status: ![Build Status](https://github.com/ITISFoundation/cookiecutter-osparc-service/workflows/Github-CI%20Push/PR/badge.svg)

Status:

-------
Currently only for **computational services**.
Cookiecutter to generate an oSparc compatible service for the oSparc simcore platform. Currently only for **computational services**.

![Build Status](https://github.com/ITISFoundation/cookiecutter-osparc-service/workflows/Github-CI%20Push/PR/badge.svg)

Requirements
------------
## Requirements


GNU Make
Python3
Python3-venv
cookiecutter python package
```console
sudo apt-get update
sudo apt-get update
sudo apt-get install -y make python3-venv # install GNU Make, python3-venv (python3 is usually already installed)
python3 -m venv .venv # create a python virtual environment
source .venv/bin/activate # activate the python virtual environment
pip install cookiecutter # install the cookicutter package
```

Usage
-----
## Usage

Generate a new Cookiecutter template layout:
Generate a new Cookiecutter template layout:
```console
python3 -m venv .venv # create a python virtual environment
source .venv/bin/activate # activate the python virtual environment
Expand All @@ -38,8 +33,7 @@ cookiecutter gh:ITISFoundation/cookiecutter-osparc-service # generate a cook



Development
------------
## Development

```console
git clone https://github.com/ITISFoundation/cookiecutter-osparc-service.git
Expand All @@ -49,8 +43,7 @@ source .venv/bin/activate
make play
```

Testing
------------
## Testing

```console
git clone https://github.com/ITISFoundation/cookiecutter-osparc-service.git
Expand All @@ -63,7 +56,13 @@ make tests



License
-------
## License

This project is licensed under the terms of the [MIT License](/LICENSE)


---

<p align="center">
<img src="https://forthebadge.com/images/badges/built-with-love.svg" width="150">
</p>
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.4.0
70 changes: 35 additions & 35 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{
"author_name": "Your full name",
"author_email": "Your address email (eq. [email protected])",
"author_affiliation": "University of Anywhere, Department of something",
"contact_email": "{{ cookiecutter.author_email }}",
"project_name": "Name of the project",
"project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '-') }}",
"project_package_name": "{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}",
"project_short_description": "{{ cookiecutter.project_name }}",
"project_type": [
"computational"
],
"docker_base": [
"alpine:3.7",
"alpine:3.8",
"centos:7",
"custom:special-image",
"python:3.6",
"python:3.7",
"python:3.8",
"python:3.6-slim",
"python:3.7-slim",
"python:3.8-slim",
"ubuntu:18.04"
],
"number_of_inputs": 2,
"number_of_outputs": 1,
"project_git_repo": "https://github.com/ITISFoundation/{{ cookiecutter.project_slug }}",
"git_username": "Yourusername",
"default_docker_registry": "itisfoundation",
"release_date": "{% now 'utc', '%Y' %}",
"version": "0.1.0",
"_extensions": [
"jinja2_time.TimeExtension"
]
}
"author_name": "Your full name",
"author_email": "Your address email (eq. [email protected])",
"author_affiliation": "University of Anywhere, Department of something",
"contact_email": "{{ cookiecutter.author_email }}",
"project_name": "Name of the project",
"project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '-') }}",
"project_package_name": "{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}",
"project_short_description": "{{ cookiecutter.project_name }}",
"project_type": [
"computational"
],
"docker_base": [
"alpine:3.7",
"alpine:3.8",
"centos:7",
"custom:special-image",
"python:3.6",
"python:3.7",
"python:3.8",
"python:3.6-slim",
"python:3.7-slim",
"python:3.8-slim",
"ubuntu:18.04"
],
"number_of_inputs": 2,
"number_of_outputs": 1,
"project_git_repo": "https://github.com/ITISFoundation/{{ cookiecutter.project_slug }}",
"git_username": "Yourusername",
"default_docker_registry": "itisfoundation",
"release_date": "{% now 'utc', '%Y' %}",
"version": "0.1.0",
"_extensions": [
"jinja2_time.TimeExtension"
]
}
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.4.0
commit = True
message = cookiecutter version: {current_version} → {new_version}
tag = False
Expand All @@ -8,4 +8,3 @@ tag = False

[tool:pytest]
testpaths = tests/

Loading

0 comments on commit 2991408

Please sign in to comment.