Skip to content

Commit

Permalink
Merge pull request #136 from terry-norbraten/master
Browse files Browse the repository at this point in the history
2 bug fixes
  • Loading branch information
apease authored Nov 3, 2024
2 parents 5566091 + 366940e commit 8e378fa
Show file tree
Hide file tree
Showing 14 changed files with 527 additions and 461 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'ontologyportal/TPTP-ANTLR'
# repository: 'terry-norbraten/TPTP-ANTLR'
path: TPTP-ANTLR

- name: checkout SigmaUtils
uses: actions/checkout@v4
with:
repository: 'ontologyportal/SigmaUtils'
# repository: 'terry-norbraten/SigmaUtils'
path: SigmaUtils

- name: checkout sumo
Expand Down Expand Up @@ -177,12 +175,12 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.7
with:
name: artifact

- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.7
with:
name: sigma-webapp

Expand Down
30 changes: 15 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ By participating in this project, you agree to abide by the [code of conduct](#c

## Issues

One of the easiest ways to contribute is to solve an issue https://github.com/ontologyportal/sigmakee/issues
One of the easiest ways to contribute is to solve an issue https://github.com/ontologyportal/sigmakee/issues

## Additions

* We use jUnit for testing. When making any addition of functionality, please add some jUnit tests to
show that it works and prevent regressions.
* adhere to the Java style guide for Sigma - https://github.com/ontologyportal/sigmakee/blob/master/CodeFormat.pdf
* if the functionality requires a GUI, add a .jsp interface copying and modifying and existing JSP in Sigma
* if the functionality requires a GUI, add a .jsp interface copying and modifying an existing JSP in Sigma
* if the functionality can be meaningfully executed on the command line, add
to the main() for the class, following the style of an existing class like com.articulate.sigma.KB
with its showHelp() method so it functions like a standard Unix command with a man page
Expand All @@ -36,39 +36,39 @@ in the README https://github.com/ontologyportal/sigmakee/blob/master/README.txt)

## Code of conduct

In order to foster an inclusive, kind, harassment-free, and cooperative community,
In order to foster an inclusive, kind, harassment-free, and cooperative community,
we enforce this code of conduct on our open source projects.

### Summary

Harassment in code and discussion or violation of physical boundaries is completely
unacceptable anywhere in our project. Violators will be warned by the core team.
Repeat violations will result in being blocked or banned by the core team at or
Harassment in code and discussion or violation of physical boundaries is completely
unacceptable anywhere in our project. Violators will be warned by the core team.
Repeat violations will result in being blocked or banned by the core team at or
before the 3rd violation.

### In detail

Harassment includes offensive verbal comments related to gender identity,
gender expression, sexual orientation, disability, physical appearance, body size,
race, religion, sexual images, deliberate intimidation, stalking, sustained
Harassment includes offensive verbal comments related to gender identity,
gender expression, sexual orientation, disability, physical appearance, body size,
race, religion, sexual images, deliberate intimidation, stalking, sustained
disruption, and unwelcome sexual attention.

Individuals asked to stop any harassing behavior are expected to comply immediately.

Maintainers are also subject to the anti-harassment policy.

If anyone engages in harassing behavior, including maintainers, we may take
appropriate action, up to and including warning the offender, deletion of
comments, removal from the project’s codebase and communication systems,
If anyone engages in harassing behavior, including maintainers, we may take
appropriate action, up to and including warning the offender, deletion of
comments, removal from the project’s codebase and communication systems,
and escalation to GitHub support.

If you are being harassed, notice that someone else is being harassed, or
If you are being harassed, notice that someone else is being harassed, or
have any other concerns, please contact us immediately

We expect everyone to follow these rules anywhere in our project.

Finally, don't forget that it is human to make mistakes! We all do. Let’s
work together to help each other, resolve issues, and learn from the mistakes
Finally, don't forget that it is human to make mistakes! We all do. Let’s
work together to help each other, resolve issues, and learn from the mistakes
that we will all inevitably make from time to time.

### Thanks
Expand Down
18 changes: 11 additions & 7 deletions INSTALL.MacOS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Running the SigmaKEE docker image on macOS
==========================================

With homebrew:
With Homebrew:
brew install --cask docker <- will install the latest Docker Desktop for macOS

then:
Expand All @@ -24,7 +24,7 @@ macOS install notes
Homebrew.
- java will be installed in /usr/libexec/java_home
- get git from the xcode tools with "xcode-select --install”
- instead of .bashrc edit .bash_profile
- instead of ~/.bash_profile edit ~/.zshrc
- install Homebrew from http://brew.sh and the packages:

brew install make
Expand All @@ -33,14 +33,15 @@ brew install git
brew install graphviz
brew install ant

Add the following lines in your .profile and make sure to have all
these variables created before the next step, and replace /Users/user with your home directory:
Add the following lines in your ~/.zshrc and make sure to have all
these variables created before the next step, and replace
/Users/user with your home directory:

## SUMO/SIGMAKEE
export SIGMA_HOME=/Users/user/.sigmakee
export ONTOLOGYPORTAL_GIT=/Users/user/workspace
export SIGMA_SRC=$ONTOLOGYPORTAL_GIT/sigmakee
export CATALINA_OPTS="-Xmx10g"
export CATALINA_OPTS="-Xmx10g -Xss1m"
export CATALINA_HOME=/Users/user/Programs/apache-tomcat-9.0.96
export PATH=$CATALINA_HOME/bin:$PATH
export SIGMA_CP=$SIGMA_SRC/build/sigmakee.jar:$SIGMA_SRC/lib/*
Expand All @@ -56,11 +57,11 @@ You will need at least Java 11+ to compile SigmaKee and to run Apache Tomcat.

/usr/libexec/java_home --verbose

# Find your JDK (arm64) path and copy it (choose the one with the /JavaVirtualMachines/ instead of /Internet Plug-Ins/)
# Find your JDK (arm64 or x64) path and copy it (choose the one with the /JavaVirtualMachines/ instead of /Internet Plug-Ins/)

export JAVA_HOME= 'path from before', then make sure "bin" is on our PATH

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH

cd ~
Expand Down Expand Up @@ -110,6 +111,9 @@ May have to precede the last command with "sudo"
cp ~/workspace/sigmakee/config.xml ~/.sigmakee/KBs
(SOS) edit the config.xml changing all `wrong paths` to the value of `$HOME` and adapting all variables)

For Homebrew installations of GraphViz, change the path in config.xml for
graphVizDir to: /usr/local/bin

cd ~/workspace/sigmakee
source ~/.zshrc or ~/.bash_profile
ant
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ differ, then you may need to edit your config.xml manually. If you are running
tomcat on vagrant or another VM, you may need to change the port value from 8080.
If you are running on a server, rather than your localhost you'll need to set
the hostname parameter in your config.xml file. E will only work if your $TMPDIR
is set correctly. Tomcat V9 or later is required. Be sure to change `$CATALINA_HOME` and your paths to
conform to the version. If you use a different mirror or version you'll need to
change the wget commend below. Change "theuser" below to your user name.
is set correctly. Tomcat V9 is required. Later versions of Tomcat are not yet
supported. Be sure to change `$CATALINA_HOME` and your paths to conform to the
version. If you use a different mirror or version you'll need to change the wget
commend below. Change "theuser" below to your user name.

If your installation isn't working and you're getting funny "null"s in your paths
try opening permissions on your `$SIGMA_HOME`, `$CATALINA_HOME` and `$SIGMA_SRC` directories.
Expand Down Expand Up @@ -163,7 +164,7 @@ handy to add stuff to .bashrc
```sh
echo "alias dir='ls --color=auto --format=vertical -la'" >> .bashrc
echo "export HISTSIZE=10000 HISTFILESIZE=100000" >> .bashrc
echo "export JAVA_HOME=/home/theuser/Programs/jdk-11.0.2" >> .bashrc
echo "export JAVA_HOME=/home/theuser/Programs/jdk-23" >> .bashrc
```

load the definitions into your environment
Expand Down Expand Up @@ -272,7 +273,7 @@ sudo apt-get install graphviz
echo "export SIGMA_HOME=~/.sigmakee" >> .bashrc
echo "export ONTOLOGYPORTAL_GIT=~/workspace" >> .bashrc
echo "export SIGMA_SRC=$ONTOLOGYPORTAL_GIT/sigmakee" >> .bashrc
echo "export CATALINA_OPTS=\"-Xmx10g\"" >> .bashrc
echo "export CATALINA_OPTS=\"-Xmx10g -Xss1m\"" >> .bashrc
echo "export CATALINA_HOME=~/Programs/apache-tomcat-9.0.96" >> .bashrc
echo "export PATH=$CATALINA_HOME/bin:$PATH" >> .bashrc
echo "export SIGMA_CP=$SIGMA_SRC/build/sigmakee.jar:$SIGMA_SRC/lib/*" >> .bashrc
Expand Down Expand Up @@ -368,7 +369,7 @@ Open up CMD prompt
mkdir /home/theuser/Programs
cd Programs
sudo apt-get install openjdk-23-jdk
(This step might not be necessary, I'd try without it first) echo "export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/jre" >> .bashrc
(This step might not be necessary, I'd try without it first) echo "export JAVA_HOME=/usr/lib/jvm/java-23-openjdk-amd64/jre" >> .bashrc
```

Follow Linux install instructions on:
Expand Down Expand Up @@ -481,9 +482,6 @@ than just com.articulate.sigma.KB
## Account Management
> **Warning**
> Please note this is not working as of Apr, 2020.
Create the account database with
```sh
Expand All @@ -493,7 +491,7 @@ java -Xmx4g -cp $SIGMA_CP com.articulate.sigma.PasswordService -c
Then create the administrator account and password
```sh
java -Xmx4g -Xss1m -cp $SIGMA_CP com.articulate.sigma.PasswordService -a
java -Xmx4g -cp $SIGMA_CP com.articulate.sigma.PasswordService -a
```
You can use Sigma without being administrator, but you'll have limited use of its functionality.
Expand Down
5 changes: 2 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<property name="build.test.classes.dir" value="${build.home}/test/classes"/>
<property name="dist.dir" value="dist"/>
<property name="dist.jar" value="${dist.dir}/${app.name}.jar"/>
<property name="dist.javadoc.dir" value="${dist.dir}/doc/api"/>
<property name="dist.javadoc.dir" value="doc"/>
<property name="web.dir" value="web"/>
<property name="reports.dir" value="${build.home}/reports"/>
<property name="unit.test.suite" value="com.articulate.sigma.UnitTestSuite"/>
Expand Down Expand Up @@ -242,6 +242,7 @@
<lib dir="${basedir}/lib">
<exclude name="junit*"/>
<exclude name="hamcrest*"/>
<exclude name="tomcat-servlet-api*"/>
</lib>
<classes dir="${build.classes.dir}"/>
</war>
Expand Down Expand Up @@ -364,8 +365,6 @@
</target>

<target name="api_doc" depends="init" description="Build the JavaDocs and place in ${build.javadoc}.">
<delete dir="${dist.javadoc.dir}"/>
<mkdir dir="${dist.javadoc.dir}"/>
<javadoc sourcepath="${src.dir}" destdir="${dist.javadoc.dir}" author="true" version="true" use="true"
windowtitle="Sigma API Specification" splitindex="true" packagenames="com.articulate.sigma.*">
<classpath path="${run.classpath}"/>
Expand Down
2 changes: 2 additions & 0 deletions ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<dependency org="com.servlets" name="cos" rev="09May2002" transitive="false" conf="api->default"/>
<dependency org="edu.stanford.nlp" name="stanford-corenlp" rev="4.5.4" transitive="false" conf="api->default"/>
<dependency org="javax.mail" name="mail" rev="1.4" transitive="false" conf="api->default"/>
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-servlet-api -->
<dependency org="org.apache.tomcat" name="tomcat-servlet-api" rev="9.0.96" transitive="false" conf="api->default"/>
<dependency org="net.sf.py4j" name="py4j" rev="0.10.6" transitive="false" conf="api->default"/>
<dependency org="org.antlr" name="antlr4-runtime" rev="4.9.3" transitive="false" conf="api->default"/>
<dependency org="org.apache.commons" name="commons-lang3" rev="3.12.0" transitive="false" conf="api->default"/>
Expand Down
5 changes: 3 additions & 2 deletions nbproject/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ file.reference.integration-java=test/integration/java
file.reference.unit-java=test/unit/java
includes=**
jar.compress=false
lib.dir=lib
javac.classpath=\
lib/commons-lang3-3.12.0.jar:\
lib/cos-09May2002.jar:\
Expand Down Expand Up @@ -124,10 +125,10 @@ kbs_home=../sumo
project.license=LICENSE

# Various runtime arguments here
run.args=
run.args=-g Transitway subclass

# Tomcat Manager properties
catalina.ops=-Xmx10g
catalina.ops=-Xmx10g -Xss1m
catalina.base=${catalina.home}
catalina.logs.dir=${catalina.base}/logs
catalina.out=${catalina.logs.dir}/catalina.out
Expand Down
10 changes: 9 additions & 1 deletion nbproject/ide-targets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@
<copy todir="${basedir}/lib" file="${sigma.utils.home}/sigmaUtils.jar"/>
<!-- Create WEB-INF/lib/ and copy over the needed jar files. -->
<copy todir="${build.home}/WEB-INF/lib" flatten="true">
<path refid="compile.classpath"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
<exclude name="junit*"/>
<exclude name="hamcrest*"/>
<exclude name="tomcat-servlet-api*"/>
</fileset>
</copy>
</target>

Expand Down Expand Up @@ -550,6 +555,9 @@
<include name="*.tptp"/>
<include name="*.ser"/>
</fileset>
<fileset dir="${sigma_home}/KBs/WordNetMappings">
<include name="*.ser"/>
</fileset>
</delete>
<delete>
<fileset dir="${catalina.logs.dir}">
Expand Down
4 changes: 2 additions & 2 deletions nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ auxiliary.show.customizer.message=<message>
</compilation-unit>
<compilation-unit>
<package-root>src/java</package-root>
<classpath mode="compile">lib/commons-lang3-3.12.0.jar:lib/cos-09May2002.jar:lib/guava-19.0.jar:lib/h2-2.3.232.jar:lib/java-prolog-parser-2.0.2.jar:lib/json-simple-1.1.1.jar:lib/kryo-5.6.2.jar:lib/mail-1.4.jar:lib/py4j-0.10.6.jar:lib/sigmaUtils.jar:lib/stanford-corenlp-4.5.4.jar:lib/tptp.jar</classpath>
<classpath mode="compile">lib/commons-lang3-3.12.0.jar:lib/cos-09May2002.jar:lib/guava-19.0.jar:lib/h2-2.3.232.jar:lib/java-prolog-parser-2.0.2.jar:lib/json-simple-1.1.1.jar:lib/kryo-5.6.2.jar:lib/mail-1.4.jar:lib/py4j-0.10.6.jar:lib/sigmaUtils.jar:lib/stanford-corenlp-4.5.4.jar:lib/tomcat-servlet-api-9.0.96.jar:lib/tptp.jar</classpath>
<built-to>build/WEB-INF/classes</built-to>
<javadoc-built-to>dist/doc/api</javadoc-built-to>
<javadoc-built-to>doc</javadoc-built-to>
<source-level>11</source-level>
</compilation-unit>
</java-data>
Expand Down
Loading

0 comments on commit 8e378fa

Please sign in to comment.