Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Merge zclai (#147)
Browse files Browse the repository at this point in the history
* Initial commit

* Update README.md

* commit code for public release.

* adjust the ask the user for register information literal.

* updated flask version

* new survey whitepaper and home links

* new links to docs

* new links in overview

* overview link fixes

* quicklink fixes

* plugins readme link fix

* Whitepaper added

* Updated gif

Added link to downsampled gif

* Updated gif

Downsampled gif for nlc2cmd

* Updated gif

Downsampled gif for ibmcloud

* Updated howdoi README for invokation update and helpme README with warning.

* upgrade typed-ast

* remove duplicate typed-ast dependency

* version 1.4.1

* added --ignore-installed flag to pip install

* added default value of data

* fix the threading for python 3.8

* fix the keyrings update.

* fix the typo asking install process.

* Update README.md

Fix the typo

* fix string typos (#21)

* Documentation update (#22)

* update FAQ

* update FAQ

* CONTRIBUTING fix

* list of actions update in API

* list of actions update in API

* nl2bash link in nlc2cmd readme

* update whitepaper and blog links

* home link update on main readme

* update quicklinks

* updates to overview links

* Merging nlc2cmd_cloud test cases and readme updates (#23)

* KRT: Added nlc2cloud bot

* KRT: Changed Readme with Cloudbot info

* Update README.md

* KRT: Fixed import of wa_skills

* refactor into old nlc2cmd skill

* README refactor for ibmcloud cli use case

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* debug ready

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* KRT: Added tests for nlc2cloud and edited readme

* fixed function names in nlc2cmd_cloud tests

* fixed function names in nlc2cmd for travis

* fixed failing travis case

* Move emulator to docker (#14)

* Using Docker instead a local server for the emulator. It's pending obtain the command's info and make it more readable.

* add last-info command to retrieve the las command info skills

* add last-post with a offset, and modify the select and unselect values.

* show extended info.

* add the refresh possibility of the files.

* Fix stop the server.

* activate the default skill in the docker install.

* Fix linter.

* Update README.md PR - TC may add more docs changes on top of this (#24)

* Update README.md

Update to the docs to be more explanatory about the links.

* readme updates

* readme updates

Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* Initial Contributor Covenant Code of Conduct (#36)

First attempt at a code of conduct based on a standard for communities of all sizes.  :)

* enabled question based invocation for howdoi skill (#38)

* enabled question based invocation

* fix the tests

Co-authored-by: Kshitij P. Fadnis <kpfadnis@us.ibm.com>
Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>

* Emulator redesign (#37)

* Using Docker instead a local server for the emulator. It's pending obtain the command's info and make it more readable.

* add last-info command to retrieve the las command info skills

* add last-post with a offset, and modify the select and unselect values.

* show extended info.

* add the refresh possibility of the files.

* Fix stop the server.

* activate the default skill in the docker install.

* Fix linter.

* Redesign the colors and display more message info

* log without background process.

* Docker working

* add last messages

* fix clai info

* fix the bug in the starboot

* fix the select/unselect skill

* logger working correctly

* move the stop and the refresh to the conector.

* try to remove the size of the log.

* remove unnecesary log.

Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>

* Bump psutil from 5.6.2 to 5.6.6 (#39)

Bumps [psutil](https://github.com/giampaolo/psutil) from 5.6.2 to 5.6.6.
- [Release notes](https://github.com/giampaolo/psutil/releases)
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](giampaolo/psutil@release-5.6.2...release-5.6.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* increase threshold

* move the threshold to a value valid for all agents.

* 35 handling orchestrator (#40)

* move orchestrator to a json config file.

* orchestrator select working

* add help orchestrate command.

* tested with preference orchestrator

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* READMEs, manifest, installer

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* READMEs updates

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* Update README.md

* Add exclude and read the manifest in the orchestrate.

* fix linter

* Update README.md

Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* importlib-metadata version fix (#41)

Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* Spell Check (#45)

Just a friendly edit

* Highlighted user and pass (#44)

* Highlighted user and pass

* Added changes to BuildDockerImage.sh flags.

Signed-off-by: Madhavan Pallan <madhpallan@gmail.com>

* Added default docker install

Signed-off-by: Madhavan Pallan <madhpallan@gmail.com>

* Update README.md

* Changed the highlighter with the right escape sequence

* Highlighter inconjuction with Mac

Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* Add the dependencies for the emulator. (#51)

Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>

* Update CONTRIBUTING.md

* Doc update nlc2cmd (#53)

* add nlc2cmd link

* clean up nlc2cmd doc for neurips

* zos-extension to nlc2cmd (#61)

* cloudbot refactor

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* duplicate requirements purge

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* wa skills refactor

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* add remote server

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* tested without z

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* dummy config

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* merge ready

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* added try prefix in suggestion

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* Update README.md

* Update README.md

* Create README.md

Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* Bump flask from 0.12.2 to 1.0 in /clai/server/plugins/nlc2cmd/remote (#64)

* Bump flask from 0.12.2 to 1.0 in /clai/server/plugins/nlc2cmd/remote

Bumps [flask](https://github.com/pallets/flask) from 0.12.2 to 1.0.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/master/CHANGES.rst)
- [Commits](pallets/flask@0.12.2...1.0)

Signed-off-by: dependabot[bot] <support@github.com>

* new flask version

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* zosbot update (#69)

* Update zosbot.py

* Update test_skill_nlc2cmd.py

* standardize zosbot format

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* fix: nlc2cmd test pylint error

* fix: centos legacy links deprecated. replace with new links

* fix: fix build breakages

Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>

* Emulator fix (#54)

* rename file.

* using pil for icons?

* apply pillow to the other file.

* updating PR 54 (#65)

* zos-extension to nlc2cmd (#61)

* cloudbot refactor

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* duplicate requirements purge

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* wa skills refactor

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* add remote server

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* tested without z

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* dummy config

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* merge ready

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* added try prefix in suggestion

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* Update README.md

* Update README.md

* Create README.md

Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* Bump flask from 0.12.2 to 1.0 in /clai/server/plugins/nlc2cmd/remote (#64)

* Bump flask from 0.12.2 to 1.0 in /clai/server/plugins/nlc2cmd/remote

Bumps [flask](https://github.com/pallets/flask) from 0.12.2 to 1.0.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/master/CHANGES.rst)
- [Commits](pallets/flask@0.12.2...1.0)

Signed-off-by: dependabot[bot] <support@github.com>

* new flask version

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* cache imagetk change

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: build breakage (#70)

Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>

* checkin

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* gitignore config

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* tested stdout proxy

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* cache

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

* Tellina integration (#74)

* added folder and files for tellina skill

* cleaned up tellina.py

* added Try >> text to response from tellina skill

* checked in initial version of tellina test

* updated readme for tellina skill

* updated link for tellina gif

* updated paragraph error in readme

* added newline to tellina test to solve lint error in travis

* added workaround to tests for tellina 0 confidence issue

* added workaround to tests for tellina 0 confidence issue and pylint issue

* added workaround to tests for tellina 0 confidence issue and pylint issue

* added workaround to tests for tellina 0 confidence issue and pylint issue, removed todo flag

* Update README.md

* Update README.md

Co-authored-by: Kartik Talamadupula <krtalamad@us.ibm.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* DataXplore Integration (#73)

* Added dataxplore plugin

* Contents to try on dataxplore

* Added closing brackets in xkcd README.

* [ImgBot] Optimize images (#76)

*Total -- 258.94kb -> 220.97kb (14.66%)

/clai/emulator/run.gif -- 0.16kb -> 0.13kb (23.35%)
/clai/server/plugins/dataxplore/figures/dx_summarize_plot_test.png -- 105.29kb -> 85.16kb (19.12%)
/clai/server/plugins/dataxplore/figures/dx_summarize_plot_airQuality.png -- 153.38kb -> 135.58kb (11.6%)
/clai/emulator/stop.gif -- 0.12kb -> 0.11kb (5.04%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* Add bandit based orchestrator (#75)

* bandit orchestrator patterns.

* none arm for bandits

* feature: Add warm start capability to bandit orchestrator

* feature: add max orchestrator and ignore skills warm start data generators

* fix: pylint errors

* feat: add the prefer skill orchestrator behavior

* fix: pylint failures

* fix: pylint errors

* fix: ignore skill behavior datagen

* Add README to bandit orchestrator

* Fix pylint errors

* fix pylint error and finalize installation script

* change bandit config to have more skills

* Update FAQ.md

* Update README.md

* Update README.md

Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* Update dataXplore (#77)

* Update requirements.txt

* Update README.md

* Update README.md

* removed extra "dataxplore" in the invocation

* Delete dx_summarize_plot_airQuality.png

* Delete dx_summarize_plot_test.png

* Update README.md

* Fix skill test (#84)

* fix tellina test

Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>

* fix travis build failure (#86)

* fix travis log length failure

Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>

* GitHub skill  (#81)

* update gitbot branch (#80)

* Tellina integration (#74)

* added folder and files for tellina skill

* cleaned up tellina.py

* added Try >> text to response from tellina skill

* checked in initial version of tellina test

* updated readme for tellina skill

* updated link for tellina gif

* updated paragraph error in readme

* added newline to tellina test to solve lint error in travis

* added workaround to tests for tellina 0 confidence issue

* added workaround to tests for tellina 0 confidence issue and pylint issue

* added workaround to tests for tellina 0 confidence issue and pylint issue

* added workaround to tests for tellina 0 confidence issue and pylint issue, removed todo flag

* Update README.md

* Update README.md

Co-authored-by: Kartik Talamadupula <krtalamad@us.ibm.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* DataXplore Integration (#73)

* Added dataxplore plugin

* Contents to try on dataxplore

* Added closing brackets in xkcd README.

* [ImgBot] Optimize images (#76)

*Total -- 258.94kb -> 220.97kb (14.66%)

/clai/emulator/run.gif -- 0.16kb -> 0.13kb (23.35%)
/clai/server/plugins/dataxplore/figures/dx_summarize_plot_test.png -- 105.29kb -> 85.16kb (19.12%)
/clai/server/plugins/dataxplore/figures/dx_summarize_plot_airQuality.png -- 153.38kb -> 135.58kb (11.6%)
/clai/emulator/stop.gif -- 0.12kb -> 0.11kb (5.04%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* Add bandit based orchestrator (#75)

* bandit orchestrator patterns.

* none arm for bandits

* feature: Add warm start capability to bandit orchestrator

* feature: add max orchestrator and ignore skills warm start data generators

* fix: pylint errors

* feat: add the prefer skill orchestrator behavior

* fix: pylint failures

* fix: pylint errors

* fix: ignore skill behavior datagen

* Add README to bandit orchestrator

* Fix pylint errors

* fix pylint error and finalize installation script

* change bandit config to have more skills

* Update FAQ.md

* Update README.md

* Update README.md

Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* Update dataXplore (#77)

* Update requirements.txt

* Update README.md

* Update README.md

* removed extra "dataxplore" in the invocation

* Delete dx_summarize_plot_airQuality.png

* Delete dx_summarize_plot_test.png

* Update README.md

Co-authored-by: Kartik Talamadupula <ktalamad@users.noreply.github.com>
Co-authored-by: Kartik Talamadupula <krtalamad@us.ibm.com>
Co-authored-by: Madhavan Pallan <madhpallan@gmail.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Mayank Agarwal <MayankAgarwal@users.noreply.github.com>
Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>

* 11/06/2020 09:45:58

modified:   clai/server/plugins/gitbot/gitbot.py + modified:   clai/server/plugins/gitbot/service.py + modified:   clai/server/plugins/gitbot/service.py +

* Create sample_config.json

* Update sample_config.json

* Update README.md

* Update README.md

* Update configPlugins.json

* making tellina default

Signed-off-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>

Co-authored-by: Kartik Talamadupula <ktalamad@users.noreply.github.com>
Co-authored-by: Kartik Talamadupula <krtalamad@us.ibm.com>
Co-authored-by: Madhavan Pallan <madhpallan@gmail.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Mayank Agarwal <MayankAgarwal@users.noreply.github.com>
Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>

* Update and rename know-issues.md to known-issues.md (#89)

* Update and rename know-issues.md to known-issues.md


Grammar rename

* markdown fix

Co-authored-by: Mayank Agarwal <MayankAgarwal@users.noreply.github.com>

* add voice skill (#88)

* add voice skill

* Update README.md

* Update configPlugins.json

Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>

* Replace all occurances of #!/bin/env with #! /usr/bin/env

* Update requirements files

* Always check for z/OS whenever we check for OS/390

* Update .gitattributes

Encode *.json files as UTF-8

* Update .gitattributes

* Rename requirements-emulator.txt to requirements_emulator.txt to fit
requirements*.txt naming conventions

* Remove toASCII and toEBCDIC as their licensing prevents distribution

* Minor changes

* Add AUTHORS.md

* Split Makefile up

* Make GNU-style Makefile the default

* Add generic makefile, remove tmp directory during install

* Update known-issues.md and README.md

Co-authored-by: Steve Martinelli <4118756+stevemar@users.noreply.github.com>
Co-authored-by: Tathagata Chakraborti <TathagataChakraborti@users.noreply.github.com>
Co-authored-by: Jorge Juan Barroso Carmona <jorge@karumi.com>
Co-authored-by: Tathagata Chakraborti <tathagata.chakraborti1@ibm.com>
Co-authored-by: Jorge 'Jorhell' Barroso aka flipper83 <flipper83@gmail.com>
Co-authored-by: Kartik Talamadupula <ktalamad@users.noreply.github.com>
Co-authored-by: Kshitij P. Fadnis <kpfadnis@us.ibm.com>
Co-authored-by: twinstar26 <adveer_b17@it.vjti.ac.in>
Co-authored-by: Kshitij Fadnis <cool.kshij@gmail.com>
Co-authored-by: dowem <55106141+dowem@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: emishulovin <50752841+emishulovin@users.noreply.github.com>
Co-authored-by: Madhavan Pallan <madhpallan@gmail.com>
Co-authored-by: Mayank Agarwal <mayank.agarwal@ibm.com>
Co-authored-by: Mayank Agarwal <MayankAgarwal@users.noreply.github.com>
Co-authored-by: Kartik Talamadupula <krtalamad@us.ibm.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: DANFITZ <DANFITZ@ZATA.POK.STGLABS.IBM.COM>
  • Loading branch information
20 people authored and GitHub Enterprise committed Sep 17, 2020
1 parent 1249425 commit 11d8a29
Show file tree
Hide file tree
Showing 11 changed files with 253 additions and 72 deletions.
23 changes: 23 additions & 0 deletions AUTHORS.md
@@ -0,0 +1,23 @@
# Contributors

## Core Team
* [Mayank Agarwal](mailto:Mayank.Agarwal@ibm.com)
* [Jorge 'Jorhell' Barroso](mailto:Jorge.Barroso.Carmona@ibm.com) aka flipper83
* [Tathagata Chakraborti] (mailto:Tathagata.Chakraborti1@ibm.com)
* [Eli M. Dow] (mailto:emdow@us.ibm.com)
* [Kshitij Fadnis](mailto:kpfadnis@us.ibm.com)
* [Kartik Talamadupula](mailto:krtalamad@us.ibm.com)

## IBM Z Advanced Technology Team
* [Tom Conti](mailto:tconti@us.ibm.com)
* [Dan FitzGerald](mailto:danfitz@us.ibm.com)
* [Daniel Gisolfi](mailto:Daniel.Gisolfi@ibm.com)
* [Andrew C. M. Hicks](mailto:achicks@us.ibm.com)
* [Lei A. B. Wang](mailto:wlwangwl@cn.ibm.com)

## Other Contributors
* [Kristina Kolibab](mailto:kristina.kolibab@ibm.com)
* [Steve Martinelli](mailto:stevemar@ca.ibm.com)
* Eliezer Mishulovin
* [Madhavan Pallan](mailto:madhpallan@gmail.com)
* [Atharva Veer](mailto: adveer_b17@it.vjti.ac.in)
8 changes: 4 additions & 4 deletions Jenkinsfile
@@ -1,9 +1,9 @@
// Licensed Materials - Property of IBM
//
// ????-??? Copyright IBM Corp. 2020 All Rights Reserved.
// Copyright (C) 2020 IBM. All Rights Reserved.
//
// See LICENSE.txt file in the root directory
// of this source tree for licensing information.
//
// US Government Users Restricted Rights - Use, duplication or
// disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

pipeline {
agent {
Expand Down
41 changes: 41 additions & 0 deletions Makefile
@@ -0,0 +1,41 @@
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#

# Generic Makefile
#
# Author: Dan FitzGerald

repo=clai
version=TBD
makefile=$(shell utils/getMakeType.sh)

intro:
@echo "$(repo) v$(version)"

init-test:
@make -f $(makefile) init-test

clean: intro
@make -f $(makefile) clean

test: intro
@make -f $(makefile) test

dev: intro
@make -f $(makefile) dev

install: intro
@make -f $(makefile) install

uninstall: intro
@make -f $(makefile) uninstall

MAKE:
intro
install

.PHONY: intro init-test clean test dev install uninstall
68 changes: 68 additions & 0 deletions Makefile.gnu
@@ -0,0 +1,68 @@
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#

# Makefile for GNU-style make
#
# Author: Daniel Nicolas Gisolfi

repo=clai
version=TBD

about:
@echo "Processing a GNU-style Makefile"

init-test:
@python3 -m pip install -r requirements_test.txt

clean: about
-rm -f *.pyc *.pyo *.pyd *\$$py.class
# These two files will be updated by CLAI, we dont want to commit the testing data
-git checkout anonymize.json
-git checkout configPlugins.json

test: about
ifeq (, $(shell type docker-compose 2> /dev/null))
$(warning docker-compose not in $(PATH), running tests locally)
$(MAKE) init-test
@python3 -m pytest $(PWD)/test
else
@echo "running tests in a docker container"
@docker-compose run clai bash -c "cd /clai && make init-test && python3 -m pytest ./test"
endif

dev: about
ifeq (, $(shell type docker-compose 2> /dev/null))
$(warning docker-compose not in $(PATH), running development script locally)
@python3 develop.py install --path $(PWD)
else
@echo "running development script in a docker container"
@docker-compose run clai bash -c "cd /clai && python3 develop.py install --path /clai && bash"
endif

install: about
ifeq ($(shell whoami), root)
@echo "Installing CLAI as root"
./install.sh
else
@echo "You are not running as the superuser, will preform an install local to your user"
./install.sh --user
endif

uninstall: about
ifeq ($(shell whoami), root)
@echo "Uninstalling CLAI as root"
./uninstall.sh
else
@echo "You are not running as the superuser, will preform an uninstall local to your user"
./uninstall.sh --user
endif

MAKE:
intro
install

.PHONY: intro init-test clean test dev install uninstall
70 changes: 70 additions & 0 deletions Makefile.uss
@@ -0,0 +1,70 @@
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#

# Makefile for GNU-style make
#
# Author: Daniel Nicolas Gisolfi

repo=clai
version=TBD
uid=$(shell id -u)
no-docker-compose = $(shell type docker-compose 2> /dev/null)

about:
@echo "Processing a POSIX.2-style Makefile"

init-test:
@python3 -m pip install -r requirements_test.txt

clean: about
-rm -f *.pyc *.pyo *.pyd *\$$py.class
# These two files will be updated by CLAI, we dont want to commit the testing data
-git checkout anonymize.json
-git checkout configPlugins.json

test: about
.IF no-docker-compose
$(warning docker-compose not in $(PATH), running tests locally)
$(MAKE) init-test
@python3 -m pytest $(PWD)/test
.ELSE
@echo "running tests in a docker container"
@docker-compose run clai bash -c "cd /clai && make init-test && python3 -m pytest ./test"
.END

dev: about
.IF no-docker-compose
$(warning docker-compose not in $(PATH), running development script locally)
@python3 develop.py install --path $(PWD)
.ELSE
@echo "running development script in a docker container"
@docker-compose run clai bash -c "cd /clai && python3 develop.py install --path /clai && bash"
.END

install: about
.IF uid == 0
@echo "Installing CLAI with superuser privileges"
./install.sh
.ELSE
@echo "You are not running as the superuser, will preform an install local to your user"
./install.sh --user
.END

uninstall: about
.IF uid == 0
@echo "Unstalling CLAI with superuser privileges"
./uninstall.sh
.ELSE
@echo "You are not running as the superuser, will preform an uninstalling local to your user"
./uninstall.sh --user
.END

MAKE:
intro
install

.PHONY: intro init-test clean test dev install uninstall
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -59,7 +59,8 @@ $ ./install.sh --user
$ env "HOME=$HOME" ./install.sh --user
```

**In z/OS**, you need to update your [.profile](/utils/.profile) and [.bash_profile](/utils/.bash_profile):
**In z/OS**, you need to update your [.bashrc](/utils/.bashrc),
[.profile](/utils/.profile), and [.bash_profile](/utils/.bash_profile).

After the installation is complete, you will be prompted to restart the shell before CLAI becomes active.

Expand Down
4 changes: 2 additions & 2 deletions install.py
Expand Up @@ -291,7 +291,7 @@ def execute(args):

code_path = os.path.join(bin_path, 'clai')
cli_path = os.path.join(bin_path, 'bin')
temp_path = '~/tmp'
temp_path = "./tmp"
mkdir(f"{temp_path}/")

create_rc_file_if_not_exist(args.system)
Expand Down Expand Up @@ -365,7 +365,7 @@ def execute(args):

save_report_info(unassisted, agent_datasource, bin_path, demo_mode)

remove(f"{temp_path}/")
remove(f"{temp_path}")

if not user_install:
os.system(f'chmod -R 777 /var/tmp')
Expand Down
7 changes: 7 additions & 0 deletions install.sh
@@ -1,4 +1,11 @@
#!/bin/bash
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#

flags=""
# default
CLAI_PORT=8010
Expand Down
18 changes: 18 additions & 0 deletions known-issues.md
Expand Up @@ -25,3 +25,21 @@ Sometimes pip3 is redirected to other path and old version. For fixing that invo
```commandline
sudo rm -rf <path_wrong_version>
```

## z/OS

There are numerous problems with the (multiple competing) ports of Python to
z/OS. All versions of z/OS Python routinely regress, often introducing,
resolving, then later re-introducing character encoding problems. Furthermore,
an install process that worked on one level of Pip may not work with a
subsequent level of Pip. Its a mess.

One "known good" path to installing CLAI on z/OS is to use Bash 4.3, Python 3.6
from IzODA, and a backlevel version of Pip3 (such as v9.0.1). You can perform
installation using the instructions in [README.md](README.md), or you can run

```commandline
(bash-4.3)USERID@ZOSYS:~> cd clai
(bash-4.3)USERID@ZOSYS:~/clai> make clean
(bash-4.3)USERID@ZOSYS:~/clai> make install
```
65 changes: 0 additions & 65 deletions makefile

This file was deleted.

18 changes: 18 additions & 0 deletions utils/getMakeType.sh
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#

makecmd=$(ps | grep $PPID | tail -n 1 | awk '{ print $NF }')
makestr=$($makecmd -V 2> /dev/null)

if [ -n "$makestr" ]; then
echo "Makefile.uss"
else
echo "Makefile.gnu"
fi

exit 0

0 comments on commit 11d8a29

Please sign in to comment.