Rel 1.12.1 alpha (#249)

* Update issue templates

* Run unit tests in alphabetical order (#244)

* fix: unit tests VIVO-2003 (#245)

* updates to outdated urls

Co-authored-by: Dragan Ivanovic <chenejac@uns.ac.rs>
Co-authored-by: Brian Lowe <brian@ontocale.com>
Co-authored-by: Georgy Litvinov <git@litvinovg.pro>
This commit is contained in:
Ralph O'Flinn 2021-10-12 10:40:25 -05:00 committed by GitHub
parent 028af518f9
commit fc8b92fcf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 138 additions and 22 deletions

34
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Windows, Linux]
- Browser [e.g. chrome, safari]
- Tomcat version [e.g. 8, 9]
- VIVO version [e.g. 1.11.0, 1.12.0]
- Apache Solr or ElasticSearch version
**Additional context**
Add any other context about the problem here.

View file

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View file

@ -1,7 +1,7 @@
**Thank you for submitting a pull request! Title this pull request with a brief description of what the pull request fixes/improves/changes. Please describe the pull request in detail using the template below.**
* * *
**[JIRA Issue](https://jira.duraspace.org/projects/VIVO)**: (please link to issue)
**[JIRA Issue](https://jira.lyrasis.org/projects/VIVO)**: (please link to issue)
* Other Relevant Links (Mailing list discussion, related pull requests, etc.)

3
.gitignore vendored
View file

@ -24,3 +24,6 @@ utilities/sdb_to_tdb/.work
**/.classpath
**/.project
**/bin/
.fake
.ionide

View file

@ -16,7 +16,7 @@ With Vitro, you can:
* Search your data with Apache Solr
Vitro was originally developed at Cornell University, and is used as the core of the popular
research and scholarship portal, [VIVO](https://duraspace.org/vivo/).
research and scholarship portal, [VIVO](https://lyrasis.org/vivo/).
For more information, contact the [VIVO community](https://duraspace.org/vivo/resources/contact/).
For more information, contact the [VIVO community](https://lyrasis.org/vivo/resources/contact/).

View file

@ -21,6 +21,13 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<runOrder>alphabetical</runOrder>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>

View file

@ -22,6 +22,7 @@ import org.apache.jena.vocabulary.RDF;
import org.apache.jena.vocabulary.RDFS;
import org.apache.jena.vocabulary.XSD;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
@ -36,6 +37,9 @@ import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatementImpl;
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
import edu.cornell.mannlib.vitro.webapp.dao.InsertException;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import stubs.edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactoryStub;
import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub;
import stubs.javax.servlet.ServletContextStub;
public class JenaBaseDaoTest extends AbstractTestClass {
@ -54,6 +58,12 @@ public class JenaBaseDaoTest extends AbstractTestClass {
"@prefix owl: <" + OWL.getURI() + "> . \n" +
"@prefix ex: <http://example.com/> . \n" ;
@Before
public void setup() {
WebappDaoFactoryStub wdf = new WebappDaoFactoryStub();
ServletContextStub ctx = new ServletContextStub();
new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wdf);
}
@Test
public void smartRemoveTestForIndivdiualDelete(){

View file

@ -4,7 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.dao.jena;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@ -23,6 +23,8 @@ import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao;
import edu.cornell.mannlib.vitro.webapp.dao.UserAccountsDao;
import edu.cornell.mannlib.vitro.webapp.dao.VClassDao;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub;
import stubs.javax.servlet.ServletContextStub;
/**
* Test that the Jena DAOs write different types of data to the appropriate models.
@ -31,11 +33,14 @@ import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
*/
public class OntModelSegementationTest extends AbstractTestClass {
private WebappDaoFactoryJena wadf;
@org.junit.Before
private WebappDaoFactoryJena wadf;
@Before
public void setUpWebappDaoFactoryJena() {
super.setUp();
wadf = new WebappDaoFactoryJena(new SimpleOntModelSelector());
ServletContextStub ctx = new ServletContextStub();
new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wadf);
}
@Test

View file

@ -9,7 +9,7 @@ import java.util.Map;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
import org.junit.Assert;
import org.junit.Before;
import org.apache.jena.ontology.OntModel;
import org.apache.jena.ontology.OntModelSpec;
import org.apache.jena.rdf.model.Model;
@ -19,6 +19,8 @@ import org.apache.jena.vocabulary.XSD;
import edu.cornell.mannlib.vitro.webapp.beans.PropertyInstance;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub;
import stubs.javax.servlet.ServletContextStub;
public class PropertyInstanceDaoJenaTest extends AbstractTestClass {
@ -37,7 +39,16 @@ public class PropertyInstanceDaoJenaTest extends AbstractTestClass {
"@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . \n"+
"@prefix owl: <http://www.w3.org/2002/07/owl#> . \n";
private WebappDaoFactoryJena wadf;
@Before
public void setUpWebappDaoFactoryJena() {
super.setUp();
wadf = new WebappDaoFactoryJena(new SimpleOntModelSelector());
ServletContextStub ctx = new ServletContextStub();
new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wadf);
}
void printModels(Model expected, Model result){
System.out.println("Expected:");
expected.write(System.out);

View file

@ -19,11 +19,16 @@ import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.vocabulary.OWL;
import org.junit.Before;
import org.junit.Test;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import stubs.edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactoryStub;
import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub;
import stubs.javax.servlet.ServletContextStub;
/**
*
@ -31,7 +36,14 @@ import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
*/
public class VClassDaoTest extends AbstractTestClass {
@Before
public void setup() {
WebappDaoFactoryStub wdf = new WebappDaoFactoryStub();
ServletContextStub ctx = new ServletContextStub();
new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wdf);
}
@Test
// Test that the VClassDaoJena::updateVClass method will only update the jena model for
// those properties in VClass that have a different value from what is already in the
@ -45,7 +57,9 @@ public class VClassDaoTest extends AbstractTestClass {
// it will migrate to the super-model) because of the way jena handles additions and
// deletions with respect to super and sub models. This migration of statements may cause
// undesirable behavior in the vivo/vitro application.
public void modelIsolation(){
// 1. create two models and attach one as a sub-model of the other

View file

@ -7,8 +7,8 @@ import java.net.URLEncoder;
import java.util.Iterator;
import java.util.List;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.apache.jena.ontology.AllValuesFromRestriction;
@ -38,11 +38,15 @@ import org.apache.jena.shared.Lock;
import org.apache.jena.util.iterator.ClosableIterator;
import org.apache.jena.vocabulary.RDFS;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
import edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean;
import edu.cornell.mannlib.vitro.webapp.beans.Ontology;
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import stubs.edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactoryStub;
import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub;
import stubs.javax.servlet.ServletContextStub;
/**
*
@ -51,7 +55,14 @@ import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
*/
public class VClassJenaTest extends AbstractTestClass {
@Before
public void setup() {
WebappDaoFactoryStub wdf = new WebappDaoFactoryStub();
ServletContextStub ctx = new ServletContextStub();
new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wdf);
}
@Test
// NIHVIVO-1157 introduced VClassJena.java, a lazy-loading version of VClass.java.
// Per instructions from Brian L., this test tests that for one randomly selected Class,

View file

@ -9,6 +9,7 @@ import java.util.Map;
import org.junit.Assert;
import org.junit.Test;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission;
@ -16,7 +17,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import stubs.javax.servlet.http.HttpServletRequestStub;
public class AntiXssValidationTest {
public class AntiXssValidationTest extends AbstractTestClass{
@Test
public void testLiteral( ){

View file

@ -33,7 +33,7 @@
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>.
<http://vivo.cornell.edu/individual/individualIssueVivo15> vivo:overview "There is a form feed in the following text. Hex 0c, that sometimes displays as ^L. Star Award for excellence in scientic publication and for productive collaborations with other Center scientists, U.S. Department of the Interior, 2009. Publications Award for scientist at Florida Integrated Science Center with highest annual scien-tic productivity as measured by number, quality, and impact of publications., U.S. Department of the Interior, 2009.";
vivo:webpage <https://jira.duraspace.org/browse/VIVO-15>;
vivo:webpage <https://jira.lyrasis.org/browse/VIVO-15>;
a mann:CornellNonAcademicStaff,
local:InternalThing,
vivoc:CornellAffiliatedPerson,

View file

@ -33,7 +33,7 @@
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>.
<http://vivo.cornell.edu/individual/individualIssueVivo15> vivo:overview "There is a form feed in the following text. Hex 0c, that sometimes displays as ^L. Star Award for excellence in scienti c publication and for productive collaborations with other Center scientists, U.S. Department of the Interior, 2009. Publications Award for scientist at Florida Integrated Science Center with highest annual scien-ti c productivity as measured by number, quality, and impact of publications., U.S. Department of the Interior, 2009.";
vivo:webpage <https://jira.duraspace.org/browse/VIVO-15>;
vivo:webpage <https://jira.lyrasis.org/browse/VIVO-15>;
a mann:CornellNonAcademicStaff,
local:InternalThing,
vivoc:CornellAffiliatedPerson,

View file

@ -14,7 +14,7 @@
# not be enabled in a production instance of VIVO.
#
# For more information go to
# https://wiki.duraspace.org/display/VIVO/The+Developer+Panel
# https://wiki.lyrasis.org/display/VDOC16/The+Developer+Panel
#
# -----------------------------------------------------------------------------
#

View file

@ -145,7 +145,7 @@ proxy.eligibleTypeList = http://www.w3.org/2002/07/owl#Thing
# profile pages that it creates.
#
# For more information, see
# https://wiki.duraspace.org/display/VIVO/Use+HTTP+caching+to+improve+performance
# https://wiki.lyrasis.org/display/VIVODOC112x/Use+HTTP+caching+to+improve+performance
#
# Developers will likely want to leave caching disabled, since a change to a
# Freemarker template or to a Java class would not cause the page to be

View file

@ -1,7 +1,7 @@
#!/bin/bash
# RC Script
RC_VERSION=1.11.1
RC_VERSION=1.12.0
RC_NUM=1
git checkout master

View file

@ -2,7 +2,7 @@
if [ -z "$1" ]
then
echo 'New version number required eg. 1.9.0-rc1'
echo 'New version number required eg. 1.12.0-RC1'
exit 1
fi

View file

@ -9,5 +9,5 @@
# Ontology is complete.
#
# Find out how to use this file at
# https://wiki.duraspace.org/display/VIVO/Using+Short+Views+in+Release+1.5
# https://wiki.lyrasis.org/display/VIVODOC112x/Creating+short+views+of+individuals
#

View file

@ -2,7 +2,7 @@
# ServletContextListeners for Vitro, to be instantiated and run by the StartupManager.
#
# For more information,
# https://wiki.duraspace.org/display/VIVO/The+StartupManager
# https://wiki.lyrasis.org/display/VIVODOC112x/The+StartupManager
#
edu.cornell.mannlib.vitro.webapp.servlet.setup.JvmSmokeTests

View file

@ -3,7 +3,7 @@
<!-- VIVO-specific default list view config file for object properties
See guidelines at https://wiki.duraspace.org/x/eYXVAw -->
See guidelines at https://wiki.lyrasis.org/display/VIVODOC112x/Custom+List+View+Configurations -->
<list-view-config>
<query-select>

View file

@ -3,7 +3,7 @@
<!-- Default list view config file for object properties
See guidelines at https://wiki.duraspace.org/x/eYXVAw -->
See guidelines at https://wiki.lyrasis.org/display/VIVODOC112x/Custom+List+View+Configurations -->
<list-view-config>
<query-select>

View file

@ -3,7 +3,7 @@
<!-- Custom list view config file for display:hasElement property (used for menu system)
See guidelines at https://wiki.duraspace.org/x/eYXVAw -->
See guidelines at https://wiki.lyrasis.org/display/VIVODOC112x/Custom+List+View+Configurations -->
<list-view-config>
<query-select>