New post

Find

Announcement
· Sep 2, 2024

InterSystems デベロッパーツールコンテスト 2024(USコミュニティ)

開発者の皆さん、こんにちは!

USコミュニティのコンテスト情報が更新されました。今回は、コミュニティメンバーの開発の手助けになるような便利ツールの作成がテーマです。

🏆 InterSystemsデベロッパーツールコンテスト 🏆

※ 日本のコミュニティの 第2回 InterSystems Japan 技術文書ライティングコンテスト 開催!とは異なるコンテストです。ご注意ください!

InterSystems IRIS を使用して、より迅速な開発、より質的なコードの貢献、ソリューションのテスト、デプロイ、サポート、または監視に役立つアプリケーションをご応募ください。

期間:2024年9月9日~29日

賞品総額: $14,000


コンテストのテーマ

💡  InterSystems IRIS デベロッパーツール 💡

コンテストでは、IRISを使用する開発者のエクスペリエンスを向上させ、開発の迅速化、より質的なコードへの貢献、InterSystems IRISを使用したソリューションのテスト、デプロイ、サポート、または監視に役立つアプリケーションを期待しています。

 

応募要件

  1. アプリケーションやライブラリは完全に機能するものでなければなりません。他の言語ですでに存在するライブラリのインポートや直接のインターフェイスであってはなりません(C++を除きます)。既存のアプリケーションやライブラリのコピーペーストでの応募もできません。
  2. 応募可能なアプリケーション
    • Open Exchange アプリケーションの新規作成、または既存アプリケーションであっても大幅に改善されているものであればご応募いただけます。
    • コミュニティの担当チームは、コンテストへの応募を承認する前に申請された全アプリケーションをレビューします。
  3. 全てのアプリケーションは、IRIS Community Edition 、IRIS for Health Community Edition または、IRIS Cloud SQLで動作する必要があります。MacやWindowsのホスト版をご利用いただく場合は、インストールキットをダウンロードしてください。コンテナを利用する場合は InterSystems Container Registryから pull、または、最新バージョンのイメージ(intersystemsdc/iris-community:latest または intersystemsdc/irishealth-community:latest)をご利用ください。
  4. アプリケーションはオープンソースであり、GitHubで公開されている必要があります。
  5. アプリケーションの README ファイルは、英語で記述してください(日本語で記述したものがあればそのまま掲載いただき、英文の追記をお願いします。翻訳アプリを使用しますが翻訳をお手伝いすることもできますのでお気軽にお知らせください!)。また、インストール手順や、アプリケーションがどのように動作するかの説明、またはビデオデモを含めてください。
  6. 1人の開発者は最大3つのアプリケーションを応募できます。
  7. 記事はUSコミュニティに投稿してください。

注意:インターシステムズの審査員は、複雑さと有用性の基準に基づきコンテストに応募が承認されるかどうかの最終決定権を持ちます。その決定は最終的なものであり、不服申し立ての対象にはなりません。

 

入賞特典:

1. Experts Nomination -  審査員から多く票を集めたアプリケーションには、以下の賞金が贈られます。 

🥇 1位 - $5,000 

🥈 2位 - $3,000 

🥉 3位 - $1,500

🏅 4位 - $750

🏅 5位 - $500

🌟 6-10位 - $100

2. Community winners - 開発者コミュニティで多く票を集めたソリューションには、以下の賞金が贈られます。

🥇 1位 - $1000 

🥈 2位 - $750 

🥉 3位 - $500

🏅 4位 - $300

🏅 5位 - $200

複数の参加者が同数の票を獲得した場合、全参加者が勝者となり賞金は勝者間で分配されます

 

参加資格:

どなたでもご参加いただけます!(InterSystems 開発者コミュニティのアカウントを作成するだけでご応募いただけます)

開発者がチームを組んで共同でアプリケーションを作成し、応募することもできます! 1チーム 2~5名 までご参加いただけます。

チームでご応募いただく場合は、アプリケーションの README にチームメンバー名の記載をお忘れなく!!(開発者コミュニティのプロファイルのリンクもお願いします)

スケジュール:

🛠 アプリケーション開発と応募期間:

  • 2024年9月9日 (00:00 EST): コンテスト開始!
  • 2024年9月22日 (23:59 EST): 応募締切日

 投票期間:

  • 2024年9月23日 (00:00 EST): 投票開始!
  • 2024年9月29日 (23:59 EST): 投票終了日

応募、投票期間中、アップロードしたアプリケーションは改良できます。

Helpful resources

✓ アプリケーション例

✓ 開発環境テンプレート:

✓ IRISとPython初心者向け

✓ IRISとObjectScript初心者向け

✓ ObjectScript Package Manager (ZPM)初心者向け:

✓ コンテストへの応募方法

 

Need Help?

ご質問がある場合は、この投稿へコメントいただくか、InterSystems の Discord server チャンネルにご参加ください!

皆様からのアプリケーションのご応募、お待ちしております!👍


❗️ コンテストに参加された場合、こちらに記載されているコンテスト規約に同意したものとみなされます。ご応募の際、ご一読いただきますよう、お願い申し上げます❗️

 

ご応募方法について

以下の応募方法ビデオをご参照ください。

以下、コンテストに応募する迄の手順をご説明します。

コンテスト応募までの流れは以下の通りです(※ビデオでは、3番以降の内容をご紹介しています)。

1、IRISプログラミングコンテスト用テンプレートを使用して、開発環境を準備します。

2、コンテスト用アプリケーションを作成します。

3、コンテストの準備が完了したら、ソースコードをローカルのGitリポジトリへコミットします。

初回コミット時に、Gitの初期設定がないためコミットが失敗することがあります。
その場合は、以下のコマンドでGitユーザ名とEmailを設定します。

git config --global user.name "ここにユーザ名"
git config --global user.email "ここにメールアドレス"

4、ローカルのGitリポジトリのコミットが完了したら、リモートのGitリポジトリを作成します。

リポジトリ作成後、リモートリポジトリのURLをコピーします。

5、リモートのGitリポジトリへPushします。

git push ここにリモートのリポジトリのURL

6、OpenExchangeにログインし、アプリケーションを追加します。

※事前にDeveloper communityでユーザアカウントを作成する必要があります。
ログイン後、Profile→Applications から Application をクリックし、4 でコピーしたリモートのGitリポジトリのURLを設定します。

アプリケーションを登録すると、画面右上に「Send Approval」のボタンが表示されるので、クリックします。

再度作成したアプリケーションを開くと、「Apply for Contest」ボタンが表示されるので、クリックすると応募が完了します。

 
Discussion (0)1
Log in or sign up to continue
Question
· Sep 2, 2024

Allocation of Disk Space - Splitting of IRIS.dat into 2 different files

Currently we are exploring how we can allocate additional disk space to our current environment as we have seen a significant increase in growth of our Database files. Currently we have 3 namespaces, all with 1 IRIS.dat each that contains both the Global and Routines.

Since we have started down the route of everything within a single IRIS.dat file for each namespace, is it logical as we see growth to be able to split the current IRIS.dat for each namespace into a separate IRIS.dat for global and a IRIS.dat with for routines for each namespace in a Mirror environment?

I assume that we would have to take each one of the nodes down at a single time to do this. Is this even logical to do? 

Or do we add a LUN and move everything over to that new LUN as is still maintaining the single IRIS.dat per namespace?

Thanks

Scott

4 Comments
Discussion (4)2
Log in or sign up to continue
Article
· Sep 2, 2024 4m read

IRIS Native Python Part-2

In the preceding section, we explored the installation process and initiated the writing of the IRIS in native Python. We will now proceed to examine global traversal and engage with IRIS class objects.

 get: this function is used to get values from the traversal node.

def traversal_firstlevel_subscript():
    """
    ^mygbl(235)="test66,62" and ^mygbl(912)="test118,78"
    """
    for  i in irispy.node('^mygbl'):
        print(i, gbl_node.get(i,''))

 

node and items: single level traversal with node and get the values same as $Order(^mygbl(subscript), direction, data)

#single level traversal
def traversal_dollar_order_single_level():
    for  sub,val in irispy.node('^mygbl').items():
         print('subscript:',sub,' value:', val)
# multi level traversal
def traversal_dollar_order_multi_level():
    for  sub,val in irispy.node('^mygbl').items():
         print(f'sub type is: {type(sub)} {sub} and val type is {type(val)}')
         for sub1,val1 in irispy.node('^mygbl',sub).items():
            print('subscript:',sub1,' value:', val1)
        

 

nextsubscript: unlike above code you can use nextsubscript to get the next subscript easily

def traversal_dollar_order_use_nextsubscript():
      direction = 0
      next_sub = ''
      while next_sub != None:
            next_sub = irispy.nextSubscript(direction,'^mygbl', next_sub)
            print(f'next subscript = {next_sub}' )
            next_sub1=''
            if next_sub == None:return
            while next_sub1 != None:
                next_sub1 = irispy.nextSubscript(direction,'^mygbl',next_sub,next_sub1)
                print(f'1st subscript = {next_sub} next subscript {next_sub1}' )

 

Classes and Objects

You can call the classmethods, methods from the class definition by using the specific function. As  I mentioned earlier Typecast Methods are crucial to get the proper response from IRIS

Prior to this, it is important to note that, Unlike IRIS datatypes, which we can treat everything as strings, Python data types such as int, str, bool, and list are classified as objects. Each of these types possesses its own attributes and methods; for instance, the Python string type includes functions such as .upper() and .lower(), which are not applicable to other data types. Consequently, IRIS is equipped with the ability to convert IRIS string values into Python-supported datatype objects through the use of Typecast Methods. This functionality is similarly applicable to class methods, user-defined functions, and procedures. Alternatively, one must utilize Python's type conversion functions to achieve the desired data type.

 

classMethodValue: Call the Classmethod from python without initiate the object same as ( ex: Do ##Class(Test.MYTest).FirstNameGetStored(1) ) and get "string" default value in python. There are different typecast method available for expected return value instead of string. Please refer below.

def get_clsmethod_value():
    print(irispy.classMethodValue('Test.MYTest','FirstNameGetStored',1)) #return string 
    date_horolog = irispy.classMethodInteger('Test.MYTest','GetHorolog') #return +$H value
    print(irispy.classMethodVoid('Test.MYTest','SetTestGlobal','test')) # no return resposne

classMethodObject: Important function to Instantiate a new IRIS object or open the existing object. Set the properties and invoke instance methods etc...

New IRIS object: Initiate the class object for Test.MYTest and set the properties.

def cls_object_new():
    """
    initiate new object and store
    """
    iris_proxy_obj = irispy.classMethodObject('Test.MYTest','%New','ashok','kumar')

    birthdate_horolog = irispy.classMethodInteger('Test.MYTest','GetHorolog','12/12/1990')
    horolog = irispy.classMethodInteger('Test.MYTest','GetHorolog')
    iris_proxy_obj.set('BirthDate',birthdate_horolog) #set birthdate property
    iris_proxy_obj.set('RegisteredDate',horolog) #set the RegisteredDate property
    status = iris_proxy_obj.invoke('%Save') #call instance method
    return status


Open IRIS Object: In the below code. Open Test.MyTest class object and get both Birthdate and RegisteredDate values from the objectid "2" and convert RegisteredDate as python list 

def cls_object_open():
    iris_proxy_obj = irispy.classMethodObject('Test.MYTest','%OpenId',2)
    birth_date = iris_proxy_obj.get('BirthDate')
    full_name iris_proxy_obj.InvokeString("GetFullName")
    data = [birth_date, iris_proxy_obj.get('RegisteredDate')]
    return data

IRIS Class definition which I used for the class and object python code demo

 
Spoiler

 

Typecast methods:

these are few type cast method for retrieve proper return values from IRIS

classMethodValue()   - for call general classmethods

classMethodInteger - Return integer value
classMethodVoid - No return value
classMethodValue - default string
classMethodFloat - float return value

invoke() - is used to call the instance methods. You have to initiate the object for call this invoke functions

invokeString  - default string
invokeFloat - float return value
invokeInteger  -  return integer value

 

Will cover the functions, procedure calls in routines and other functionality in the upcoming article.

Discussion (0)1
Log in or sign up to continue
Question
· Sep 2, 2024

How to convert date in "YYYY-MM-DDTHH:MM:SSZ" format to "yyyymmddhhmmss" format?

I'm trying to convert date - 2023-09-28T20:35:41Z to BST/GMT format. I tried with $ZDT($ZDTH("2023-09-28T20:35:41Z",-2),8,1) but it's giving the output as '19700101 01:33:43' and looks link the date format in $ZDTH specified is wrong. Any inputs or solution would be appreciated.   

4 Comments
Discussion (4)2
Log in or sign up to continue
Article
· Sep 2, 2024 2m read

configuration of Flexible Python Runtime Feature in IRIS 2024.2

Hello Community,

This article aims to walk you through the process of setting up and utilizing the Flexible Python Runtime Feature for embedded Python. Prior to version 2024.2, Intersystems IRIS installer included a preinstalled version of Python, You can find the Python libraries and application files located in the \lib\python directory within your IRIS installation folder (for example, C:\InterSystems\IRIS20242\lib\python).

However, starting with version 2024.2, the IRIS installer no longer includes Python installation by default. Consequently, you will not find these files in the aforementioned directory. It is necessary for you to install the required version of Python to effectively work with embedded Python in IRIS.

Let's proceed to configure the flexible runtime feature within my IRIS environment.

I've installed the community version 2024.2 on my machine and I tried to connect the python shell immediately in IRIS terminal.

USER>Write $ZV
IRIS for Windows (x86-64) 2024.2 (Build 247U) Tue Jul 16 2024 09:57:03 EDT
USER>Do $SYSTEM.Python.Shell()
ERROR #5002: ObjectScript error: <OBJECT DISPATCH>Shell+16^%SYS.Python.1 *Failed to Load Python: Check documentation and messages.log, Check CPF parameters:[PythonRuntimeLibrary,PythonRuntimeLibraryVersion], Check sys.path setup in: $INSTANCE/lib/python/iris_site.py.

It throws an error because of missing configuration of PythonRuntimeLibrary and PythonRuntimeLibraryVersion values are empty( note: I already set the PythonRuntimeLibraryVersion version )

Now. I’ve already installed the python 3.12.5 in my system and configure the values in the settings.

PythonRuntimeLibrary  - “C:\Program Files\Python312\python3.dll”
PythonRuntimeLibraryVersion - 3.12

Once it’s configured. I executed the Do $SYSTEM.Python.Shell() again and it successfully get in to the python shell

 

Note: Flexible python runtime feature documentation and as per the documentation. This feature is not supported for all operating system

5 Comments
Discussion (5)4
Log in or sign up to continue