Skip to content

Commit 5e8de58

Browse files
authored
Initial commit
0 parents  commit 5e8de58

27 files changed

+2039
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.224.2/containers/docker-existing-docker-compose
3+
{
4+
"name": "iris-embedded-python-template devcontainer",
5+
6+
// Use the same recipe as creates the container we use when working locally.
7+
"dockerComposeFile": [
8+
"../docker-compose.yml"
9+
],
10+
11+
"service": "iris",
12+
13+
"workspaceFolder": "/home/irisowner/dev",
14+
15+
// This provides the elements of the connection object which require different values when connecting to the workspace within the container,
16+
// versus those in .vscode/settings.json which apply when operating locally on the workspace files.
17+
// We define and use a `server` so that (a) a user-level `objectscript.conn.server` properly doesn't override us, and (b) so InterSystems
18+
// Server Manager can also be used.
19+
"settings": {
20+
"objectscript.conn" :{
21+
"server": "devcontainer",
22+
"active": true,
23+
},
24+
"intersystems.servers": {
25+
"devcontainer": {
26+
"username": "SuperUser",
27+
"password": "SYS",
28+
"webServer": {
29+
"scheme": "http",
30+
"host": "127.0.0.1",
31+
"port": 52773
32+
},
33+
},
34+
},
35+
"python.defaultInterpreterPath":"/usr/irissys/bin/irispython"
36+
},
37+
38+
// Add the IDs of extensions we want installed when the container is created.
39+
// Currently (March 2022) `intersystems.language-server` fails to run within the container (alpine platform).
40+
// Issue is probably https://github.com/intersystems/language-server/issues/185 and/or https://github.com/intersystems/language-server/issues/32
41+
// Crash gets reported to the user, after which `intersystems-community.vscode-objectscript` falls back to
42+
// using its TextMate grammar for code coloring.
43+
"extensions": [
44+
"ms-python.python",
45+
"ms-python.vscode-pylance",
46+
"intersystems-community.vscode-objectscript",
47+
"intersystems.language-server",
48+
"intersystems-community.servermanager",
49+
"ms-vscode.docker"
50+
],
51+
}

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/.DS_Store
2+
.git
3+
.venv

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.cls linguist-language=ObjectScript
2+
*.mac linguist-language=ObjectScript
3+
*.int linguist-language=ObjectScript
4+
*.inc linguist-language=ObjectScript
5+
*.csp linguist-language=Html
6+
7+
*.sh text eol=lf
8+
*.cls text eol=lf
9+
*.mac text eol=lf
10+
*.int text eol=lf
11+
Dockerfil* text eol=lf
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: versionbump
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
release:
13+
types:
14+
- released
15+
permissions:
16+
contents: write
17+
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Bump version
25+
run: |
26+
git config --global user.name 'ProjectBot'
27+
git config --global user.email 'bot@users.noreply.github.com'
28+
VERSION=$(sed -n '0,/.*<Version>\(.*\)<\/Version>.*/s//\1/p' module.xml)
29+
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
30+
sed -i "0,/<Version>\(.*\)<\/Version>/s//<Version>$VERSION<\/Version>/" module.xml
31+
git add module.xml
32+
git commit -m 'auto bump version'
33+
git push
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build and publish a Docker image to ghcr.io
2+
on:
3+
4+
# publish on pushes to the main branch (image tagged as "latest")
5+
# image name: will be: ghcr.io/${{ github.repository }}:latest
6+
# e.g.: ghcr.io/intersystems-community/intersystems-iris-dev-template:latest
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
docker_publish:
13+
runs-on: "ubuntu-20.04"
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
# https://github.com/marketplace/actions/push-to-ghcr
19+
- name: Build and publish a Docker image for ${{ github.repository }}
20+
uses: macbre/push-to-ghcr@master
21+
with:
22+
image_name: ${{ github.repository }}
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
# optionally push to the Docker Hub (docker.io)
25+
# docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} # see https://hub.docker.com/settings/security
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: objectscriptquality
2+
on: push
3+
4+
jobs:
5+
linux:
6+
name: Linux build
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Execute ObjectScript Quality Analysis
11+
run: wget https://raw.githubusercontent.com/litesolutions/objectscriptquality-jenkins-integration/master/iris-community-hook.sh && sh ./iris-community-hook.sh
12+

.github/workflows/runtests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: unittest
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
release:
13+
types:
14+
- released
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Build and Test
22+
uses: docker/build-push-action@v2
23+
with:
24+
context: .
25+
push: false
26+
load: true
27+
tags: ${{ github.repository }}:${{ github.sha }}
28+
build-args: TESTS=1

.gitignore

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

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "objectscript",
6+
"request": "launch",
7+
"name": "ObjectScript Debug Class",
8+
"program": "##class(PackageSample.ObjectScript).Test()",
9+
},
10+
{
11+
"type": "objectscript",
12+
"request": "attach",
13+
"name": "ObjectScript Attach",
14+
"processId": "${command:PickProcess}",
15+
"system": true
16+
}
17+
]
18+
}

.vscode/settings.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"files.associations": {
3+
4+
"Dockerfile*": "dockerfile",
5+
"iris.script": "objectscript"
6+
},
7+
"objectscript.conn" :{
8+
"ns": "IRISAPP",
9+
"username": "SUPERUSER",
10+
"password": "SYS",
11+
"docker-compose": {
12+
"service": "iris",
13+
"internalPort": 52773
14+
},
15+
"active": true,
16+
"links": {
17+
"FlaskTest": "http://localhost:55030/"
18+
}
19+
},
20+
"sqltools.connections": [
21+
{
22+
"namespace": "IRISAPP",
23+
"connectionMethod": "Server and Port",
24+
"showSystem": false,
25+
"previewLimit": 50,
26+
"server": "localhost",
27+
"port": 55038,
28+
"askForPassword": false,
29+
"driver": "InterSystems IRIS",
30+
"name": "objectscript-docker",
31+
"username": "SuperUser",
32+
"password": "SYS"
33+
}
34+
],
35+
"python.pythonPath": "/usr/local/bin/python3",
36+
"python.testing.pytestArgs": [
37+
"src/python"
38+
],
39+
"python.testing.unittestEnabled": false,
40+
"python.testing.pytestEnabled": true
41+
42+
}

0 commit comments

Comments
 (0)