Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evgeny test #5

Open
wants to merge 104 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
6c33880
export deepsee artefacts now supported
gevorg95 Mar 26, 2018
08b466b
Update README.md
gevorg95 Mar 26, 2018
4db3b48
Update README.md
evshvarov Mar 31, 2018
4dbbd12
Update README.md
evshvarov Mar 31, 2018
dc53d39
move sc to dev, add deepsee class for check source data
gevorg95 Apr 2, 2018
a05de72
move sc to dev
gevorg95 Apr 2, 2018
6d77342
bug fixed
gevorg95 Apr 2, 2018
43e0846
Update deepsee.cls
gevorg95 Apr 2, 2018
7abd1b0
set default setting git = 0, move package name sc to dev
gevorg95 Apr 13, 2018
e1a0373
Update gitLocal.cls
gevorg95 Apr 13, 2018
7d1aafb
set setting git=0
gevorg95 Apr 25, 2018
f4eb2c7
patch bug fixed
gevorg95 May 4, 2018
5f4d049
patch bug fixed
gevorg95 May 8, 2018
48de94f
Update README.md
gevorg95 Jun 10, 2018
6bbc7f8
export gbl bug fixed
gevorg95 Jul 11, 2018
09e12c5
Merge branch 'master' of https://github.com/intersystems-community/is…
gevorg95 Jul 11, 2018
9815afa
bug fixed, add version parameter
gevorg95 Jul 11, 2018
bbab3ec
"add version" fix
gevorg95 Jul 11, 2018
a0431d3
bug fixed
gevorg95 Jul 11, 2018
41384bc
The patch export occurs in the default directory
gevorg95 Jul 19, 2018
6d84057
[ADD] automatic configuration with isc.json
gevorg95 Jul 31, 2018
bd70e2f
filename bug fixed
gevorg95 Sep 11, 2018
46d217a
isc.json example was added
gevorg95 Oct 2, 2018
13ca0fb
import bug was fixed
gevorg95 Oct 2, 2018
b6a169c
Update README.md
gevorg95 Dec 13, 2018
9f80ee6
changes for the development with docker container
Feb 9, 2019
c57ea5e
version was updated
gevorg95 Mar 19, 2019
ad0bdd0
docker ignore added
evshvarov Mar 31, 2019
4155ffa
dockerisation with community edition
evshvarov Apr 13, 2019
85d8062
no need in extra docker file
evshvarov Apr 13, 2019
04950b9
zpm support
daimor Apr 24, 2019
cb4699c
export only dfi files was added
gevorg95 Apr 25, 2019
6bf6f5b
bug was fixed
gevorg95 Apr 26, 2019
a92263b
bug was fixed
gevorg95 Apr 29, 2019
0ebe36b
masks bug was fixed
gevorg95 Apr 29, 2019
4c423eb
Merge pull request #12 from daimor/master
gevorg95 May 3, 2019
ce847a9
Update README.md
gevorg95 May 3, 2019
260f20c
Changed the version in a module.xml for ZPM update
May 12, 2019
590cfe5
added zpm support
May 12, 2019
314a8a6
how to update the package
May 12, 2019
f1fbfec
possibility of exporting globals by mask was added
gevorg95 Sep 22, 2019
9064e79
Update code.cls
gevorg95 Sep 22, 2019
a8f814f
Update module.xml
evshvarov Jan 8, 2020
31ab77a
Update README.md
gevorg95 Mar 21, 2020
750e490
The project has been redesigned
gevorg95 Mar 21, 2020
5752aa3
Merge branch 'master' of https://github.com/intersystems-community/is…
gevorg95 Mar 21, 2020
fbf4f85
Update README.md
gevorg95 Mar 21, 2020
3260d52
Update README.md
gevorg95 Mar 21, 2020
f9a93c4
Update README.md
gevorg95 Mar 25, 2020
42ec756
Update README.md
gevorg95 Mar 25, 2020
b5e9f77
Рossible continuous export of files to the working directory was added
gevorg95 Mar 28, 2020
bad7b7b
Merge branch 'master' of https://github.com/intersystems-community/is…
gevorg95 Mar 28, 2020
8dd9981
Update code.cls
gevorg95 Mar 28, 2020
01c54ff
Update README.md
gevorg95 Mar 28, 2020
e1f05d9
add ignor list
gevorg95 Mar 29, 2020
dfad43a
Update module.xml
gevorg95 Apr 3, 2020
d2e0b06
Update module.xml
gevorg95 Apr 6, 2020
3cca049
Update module.xml
SergeyMi37 Oct 22, 2020
3a1c425
replace broken image
May 23, 2021
3f00f15
Update docker-compose.yml
May 23, 2021
83ab451
Merge pull request #16 from rcemper/master
evshvarov Jul 12, 2021
91775e9
Merge pull request #13 from SergeyMi37/patch-1
evshvarov Jul 12, 2021
e572da7
added cubes export
evshvarov Jul 12, 2021
9ba7573
Merge pull request #17 from evshvarov/master
evshvarov Jul 12, 2021
ec562f6
fixed code
Mar 9, 2022
35c1f69
Merge pull request #18 from SergeyMi37/master
gevorg95 Mar 14, 2022
89aadda
added objectscript-quality
SergeyMi37 Sep 21, 2022
9fa9099
Merge pull request #20 from SergeyMi37/master
evshvarov Sep 21, 2022
bcae51a
fixed mistakes
SergeyMi37 Sep 21, 2022
ba7e532
Merge pull request #21 from SergeyMi37/master
evshvarov Sep 23, 2022
dadcfd8
fix deepsee globals export
evshvarov Nov 11, 2022
79255b6
auto bump version
bot Nov 11, 2022
8dbd796
Added method to export all BI elements from the namespace available t…
Feb 9, 2023
4d4071c
auto bump version
bot Feb 9, 2023
7adc1a3
Update README.md
gevorg95 Feb 9, 2023
aedc179
auto bump version
bot Feb 9, 2023
0729882
Changing export for classes and globals
Feb 26, 2023
141c4e7
auto bump version
bot Feb 26, 2023
e5093c6
without .gbl in the file name
Feb 28, 2023
6782397
auto bump version
bot Feb 28, 2023
668bdae
Bug fixed
Apr 16, 2023
2856ddc
auto bump version
bot Apr 16, 2023
03d8c31
added checking pivots for errors
Apr 16, 2023
713d93e
auto bump version
bot Apr 16, 2023
37e9033
added checking dashboards for errors
Apr 18, 2023
af07f51
version changed
Apr 18, 2023
800c58d
auto bump version
bot Apr 18, 2023
009ea42
Add export of interoperability components
Apr 18, 2023
9937e09
Merge branch 'master' of https://github.com/intersystems-community/is…
Apr 18, 2023
6db54b3
auto bump version
bot Apr 18, 2023
6f9d1b4
contest badge removed
Apr 18, 2023
a140503
auto bump version
bot Apr 18, 2023
b8bc60e
Added final result and stop-on-error parameter
May 2, 2023
7f881e2
auto bump version
bot May 2, 2023
c93de5d
bug fix
May 2, 2023
71fed59
auto bump version
bot May 2, 2023
3f300af
Bug fix
May 3, 2023
cd7512f
auto bump version
bot May 3, 2023
5249772
Bug fix
May 4, 2023
db7f7b2
auto bump version
bot May 4, 2023
a23b9e7
improve docker setup
evshvarov May 5, 2023
20e6128
added status check and some extra logs
evshvarov May 6, 2023
85355b6
cleanup
evshvarov May 6, 2023
e0d670c
bugfix
evshvarov May 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/.DS_Store
30 changes: 30 additions & 0 deletions .github/workflows/bump-module-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: versionbump

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
release:
types:
- released

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bump version
run: |
git config --global user.name 'ProjectBot'
git config --global user.email '[email protected]'
VERSION=$(sed -n '0,/.*<Version>\(.*\)<\/Version>.*/s//\1/p' module.xml)
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
sed -i "0,/<Version>\(.*\)<\/Version>/s//<Version>$VERSION<\/Version>/" module.xml
git add module.xml
git commit -m 'auto bump version'
git push
12 changes: 12 additions & 0 deletions .github/workflows/objectscript-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: objectscriptquality
on: push

jobs:
linux:
name: Linux build
runs-on: ubuntu-latest

steps:
- name: Execute ObjectScript Quality Analysis
run: wget https://raw.githubusercontent.com/litesolutions/objectscriptquality-jenkins-integration/master/iris-community-hook.sh && sh ./iris-community-hook.sh

28 changes: 28 additions & 0 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: unittest

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
release:
types:
- released

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and Test
uses: docker/build-push-action@v2
with:
context: .
push: false
load: true
tags: ${{ github.repository }}:${{ github.sha }}
build-args: TESTS=1
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ARG IMAGE=intersystemsdc/irishealth-community:2020.3.0.200.0-zpm
ARG IMAGE=intersystemsdc/iris-community:2020.4.0.547.0-zpm
ARG IMAGE=containers.intersystems.com/intersystems/iris:2021.1.0.215.0
ARG IMAGE=intersystemsdc/iris-community
FROM $IMAGE

WORKDIR /home/irisowner/irisdev/

## install git
## USER root
##RUN apt update && apt-get -y install git
##USER ${ISC_PACKAGE_MGRUSER}

ARG TESTS=0
ARG MODULE="isc-dev"
ARG NAMESPACE="USER"

RUN --mount=type=bind,src=.,dst=. \
#pip3 install -r requirements.txt && \
iris start IRIS && \
iris session IRIS < iris.script && \
([ $TESTS -eq 0 ] || iris session iris -U $NAMESPACE "##class(%ZPM.PackageManager).Shell(\"test $MODULE -v -only\",1,1)") && \
iris stop IRIS quietly
102 changes: 86 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,88 @@
# cache-udl
Export/Import sources in UDL format for [ISC Caché 2016.2](http://www.intersystems.com/our-products/cache/cache-overview/)
# ISC-DEV

[![Gitter](https://img.shields.io/badge/chat-on%20telegram-blue.svg)](https://t.me/joinchat/FoZ4MxGETT0_VsVglVl0DA)
[![Quality Gate Status](https://community.objectscriptquality.com/api/project_badges/measure?project=intersystems_iris_community%2Fisc-dev&metric=alert_status)](https://community.objectscriptquality.com/dashboard?id=intersystems_iris_community%2Fisc-dev)

Export/Import source code (classes, macro, routines) and DeepSee artefacts(pivots, dashboards, termlists, pivot variables, shared measures) from and to InterSystems Data Platform products(Caché, Ensemble, IRIS). Support versions from 2016.2

# Installation
Download code and run
```
set dir="/dir/cache-udl
do $System.OBJ.ImportDir(dir,"*.xml;*.cls;*.mac;*.int;*.inc;*.dfi","ck",,1)
set dir="/your_download_dir/isc-dev
do $System.OBJ.ImportDir(dir,"*.xml;*.cls;*.mac;*.int;*.inc;*.dfi","cuk",,1)
```
or
import the [release](https://github.com/intersystems-ru/cache-udl/releases) to the namespace.

Map sc package to %All namespace to make it visible in any namespace.
Map dev package to %All namespace to make it visible in any namespace.

## Docker

To install using Docker. Follow this instructions:

Open terminal and clone the repo into any local directory

```
$ git clone https://github.com/intersystems-community/isc-dev.git
```

Open the terminal in this directory and run:

```
$ docker-compose build
```

Run the IRIS container with your project:
```
$ docker-compose up -d
```

# Usage

## Setup working directory ( optional )
```
NS> w ##class(sc.code).workdir("/path/to/your/working/directory/")
NS> w ##class(dev.code).workdir("/path/to/your/working/directory/")
```

## Import:
```
NS> d ##class(dev.code).import()
```

## Export to working directory:
```
NS> d ##class(sc.code).export()
NS> d ##class(dev.code).export()
```
## Import:

#### Method to export all cubes, source classes, dashboards, pivots and globals from the namespace available to the current user:
```
NS> d ##class(sc.code).import()
NS> d ##class(dev.code).exportBI()
```

## Рossible continuous export of files to the working directory
Now the Classes/Rutines/DeepSee files will be automatically exported to the working directory after saving or compiling.

How to enable this feature:

- Go to Management Portal -> System Administration -> Configuration -> Additional Settings -> Source Control
- Select the target namespace and set the `dev.FileManExtension` class as the main one and save it
- Try to create a new class in the studio and save/compile it
- Enjoy!

## Compile, Release and Patch:

Introduce isc.json file in the source root directory with settings for the code mask, for the name of the project and for get the patch form local git or GitHub. e.g.
```
"git": 0 - files diff from local git
"git": 0 - files diff from local git (default)
"git": 1 - files diff from GitHub
use below params in case of "git" : 1
"owner": - name of the github e.g. intersystems-community
"repository": - name of the repo e.g. dc-analytics
"user": - user and password for private github repo
"password":
```


```
isc.json
"compileList": "Classes*.INC,classes*.CLS,*.DFI",
Expand All @@ -47,25 +95,47 @@ isc.json
```
Run init method to initialize project settings:
```
NS> d ##class(sc.code).init()
NS> d ##class(dev.code).init()
```
Then run release to export all the classes in comileList into one "myproject.xml" release file. It will export it into the default for current Namespace directory.
Then run release to export all the classes in compileList into one "myproject.xml" release file. It will export it into the default for current Namespace directory.
```
NS> d ##class(sc.code).release()
NS> d ##class(dev.code).release()
```
Or compile it whenever you want to compile all the proejct related resources.
```
NS> d ##class(sc.code).compile()
NS> d ##class(dev.code).compile()
```
Get last changes from github or local git. Run patch to export the classes in comileList into one "patch.xml" patch file. It will export it into the default for current Namespace directory or you can choose where export. By default, makes a patch from the last commit if you do not specify `commitFrom` and `commitTo` e.g.
Get last changes from github or local git. Run patch to export the classes in compileList into one "patch.xml" patch file. It will export it into the default for current Namespace directory or you can choose where export. By default, makes a patch from the last commit if you do not specify `commitFrom` and `commitTo` e.g.
```
NS> s filename = "c:\patch.xml"
NS> s commitFrom = 1
NS> s commitTo = 5
NS> d ##class(sc.code).patch(filename,commitFrom,commitTo)
NS> d ##class(dev.code).patch(filename,commitFrom,commitTo)
```

## Known issues
Be careful with import termlists, pivot variables and shared measures. In current implementation imported artefacts replace those you have in the target namespace. It happens because the utility uses standard global import for globals in XML with $System.OBJ.Import which kills the global first and imports the new one.

#### If after using the export command, git treats unaltered files as modified, the problem may be in the following:
- When moving sources from one OS to another (f.e. from win to mac), the end of the line character was not taken into account. To fix this, you need to specify git to make the end of line character look the same.

solution: ```git config --global core.autocrlf input```
- File access rights have been changed. In this case, you will need to specify that you do not want to track these changes.

solution: ```git config core.filemode false```

## Development

To update the module in ZPM do the following:
USER> zpm
zpm: USER>load /opt
zpm: USER>repo -n registry -user USER -pass PASSWORD
1) Filesystem
2) Local Cache
3) Remote Repository

Which sort of repository do you wish to configure? 3
zpm: USER>module-action isc-dev publish



Expand Down
Loading