Skip to content

Commit

Permalink
Update help URLs (#5609)
Browse files Browse the repository at this point in the history
* Update help URLs (and fix some fetcher tests)
* Allow codecov to fail (hotfix)
  • Loading branch information
koppor authored Nov 15, 2019
1 parent 17b10b8 commit 337716f
Show file tree
Hide file tree
Showing 20 changed files with 83 additions and 104 deletions.
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
- [ ] Tests created for changes
- [ ] Manually tested changed features in running JabRef
- [ ] Screenshots added in PR description (for bigger UI changes)
- [ ] Ensured that [the git commit message is a good one](https://github.com/joelparkerhenderson/git_commit_message)
- [ ] Check documentation status (Issue created for outdated help page at [help.jabref.org](https://github.com/JabRef/help.jabref.org/issues)?)
- [ ] [Checked documentation](https://docs.jabref.org/): Is the information available and up to date? If not: Issue created at <https://github.com/JabRef/user-documentation/issues>.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env:
matrix:
fast_finish: true
allow_failures:
- env: TEST_SUITE=codecov
- env: TEST_SUITE=fetcherTest
- env: TEST_SUITE=databaseTest
- env: TEST_SUITE=guiTest
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- Change default icon for groups to a circle because a colored version of the old icon was hard to distinguish from its black counterpart.
- In the main table, the context menu appears now when you press the "context menu" button on the keyboard. [feature request in the forum](http://discourse.jabref.org/t/how-to-enable-keyboard-context-key-windows)
- We added icons to the group side panel to quickly switch between `union` and `intersection` group view mode https://github.com/JabRef/jabref/issues/3269.
- We use `https` for [fetching from most online bibliographic database](https://help.jabref.org/en/#-using-online-bibliographic-database).
- We use `https` for [fetching from most online bibliographic database](https://docs.jabref.org/import-using-online-bibliographic-database).
- We changed the default keyboard shortcuts for moving between entries when the entry editor is active to ̀<kbd>alt</kbd> + <kbd>up/down</kbd>.
- Opening a new file now prompts the directory of the currently selected file, instead of the directory of the last opened file.
- Window state is saved on close and restored on start.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ The [latest stable release is available at FossHub](https://www.fosshub.com/JabR

JabRef runs on any system equipped with the Java Virtual Machine (Java 11 or higher), which can be downloaded at no cost from [AdoptOpenDJK](https://adoptopenjdk.net/).
From JabRef 4.0 onwards, [JavaFX] support has to be installed.
- Windows: JabRef offers an installer, which also adds a shortcut to JabRef to your start menu. Please also see our [Windows FAQ](https://help.jabref.org/en/FAQwindows)
- Linux: Please see our [Installation Guide](http://help.jabref.org/en/Installation).
- Mac OS X: Please see our [Mac OS X FAQ](https://help.jabref.org/en/FAQosx).
- Windows: JabRef offers an installer, which also adds a shortcut to JabRef to your start menu. Please also see our [Windows FAQ](https://docs.jabref.org/faq/faqwindows)
- Linux: Please see our [Installation Guide](https://docs.jabref.org/general/installation).
- Mac OS X: Please see our [Mac OS X FAQ](https://docs.jabref.org/faq/faqosx).

In addition, JabRef can be downloaded as an executable `.jar` file.
Try to double click the `jar` file or execute the following command:
Expand All @@ -78,7 +78,7 @@ Try to double click the `jar` file or execute the following command:

We are thankful for any bug reports or other feedback.
If you have ideas for new features you want to be included in JabRef, [tell us in our forum](http://discourse.jabref.org/c/features)!
If you need support in using JabRef, please read [the documentation](https://help.jabref.org/) first and have a look at our [community forum](http://discourse.jabref.org/c/help).
If you need support in using JabRef, please read [the documentation](https://docs.jabref.org/) first and have a look at our [community forum](https://discourse.jabref.org/c/help).
You can use our [GitHub issue tracker](https://github.com/JabRef/jabref/issues) to file bug reports.

An explanation of donation possibilities and usage of donations is available at our [donations page](https://donations.jabref.org).
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0001-use-crowdin-for-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The JabRef UI is offered in multiple languages. It should be easy for translator
* Use [Crowdin](http://crowdin.com/)
* Use [popeye](https://github.com/JabRef/popeye)
* Use [Lingohub](https://lingohub.com/)
* Keep current GitHub flow. See the [Step-by-step guide](https://github.com/JabRef/help.jabref.org/blob/d5569bebdb0e1de5c71401bbfba45311c19c80a8/en/TranslatingGUI.md#step-by-step-guide).
* Keep current GitHub flow. See the [Step-by-step guide](https://docs.jabref.org/faq/how-to-translate-the-ui).

## Decision Outcome

Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0004-use-mariadb-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Context and Problem Statement

JabRef needs to connect to a MySQL database.
See [Shared SQL Database](https://help.jabref.org/en/SQLDatabase) for more information.
See [Shared SQL Database](https://docs.jabref.org/collaborative-work/sqldatabase) for more information.

## Considered Options

Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0005-fully-support-utf8-only-for-latex-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Context and Problem Statement

The feature [search for citations](https://github.com/JabRef/help.jabref.org/issues/210) displays the content of LaTeX files.
The feature [search for citations](https://github.com/JabRef/user-documentation/issues/210) displays the content of LaTeX files.
The LaTeX files are text files and might be encoded arbitrarily.

## Considered Options
Expand Down
23 changes: 1 addition & 22 deletions src/main/java/org/jabref/gui/help/HelpAction.java
Original file line number Diff line number Diff line change
@@ -1,44 +1,23 @@
package org.jabref.gui.help;

import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.jabref.Globals;
import org.jabref.gui.actions.SimpleCommand;
import org.jabref.gui.desktop.JabRefDesktop;
import org.jabref.logic.help.HelpFile;
import org.jabref.preferences.JabRefPreferences;

/**
* This Action keeps a reference to a URL. When activated, it shows the help
* Dialog unless it is already visible, and shows the URL in it.
*/
public class HelpAction extends SimpleCommand {

/**
* New languages of the help have to be added here
*/
private static final Set<String> AVAILABLE_LANG_FILES = Stream.of("en", "de", "fr", "in", "ja")
.collect(Collectors.toCollection(HashSet::new));

private HelpFile helpPage;

public HelpAction(HelpFile helpPage) {
this.helpPage = helpPage;
}

public static void openHelpPage(HelpFile helpPage) {
String lang = Globals.prefs.get(JabRefPreferences.LANGUAGE);
StringBuilder sb = new StringBuilder("https://help.jabref.org/");

if (AVAILABLE_LANG_FILES.contains(lang)) {
sb.append(lang);
sb.append("/");
} else {
sb.append("en/");
}
StringBuilder sb = new StringBuilder("https://docs.jabref.org/");
sb.append(helpPage.getPageName());
JabRefDesktop.openBrowserShowPopup(sb.toString());
}
Expand Down
81 changes: 36 additions & 45 deletions src/main/java/org/jabref/logic/help/HelpFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,47 @@
/**
* This enum globally defines all help pages with the name of the markdown file in the help repository at Github.
*
* @see <a href=https://github.com/JabRef/help.jabref.org>help.jabref.org@github</a>
* @see <a href="https://github.com/JabRef/user-documentation">user-documentation@github</a>
*/
public enum HelpFile {
COMMAND_LINE(""),
//Empty because it refers to the TOC/index
CONTENTS(""),
ENTRY_EDITOR("EntryEditor"),
STRING_EDITOR("StringEditor"),
SEARCH("Search"),
GROUP("Groups"),
CONTENT_SELECTOR("ContentSelector"),
SPECIAL_FIELDS("SpecialFields"),
BIBTEX_KEY_PATTERN("BibtexKeyPatterns"),
OWNER("Owner"),
TIMESTAMP("TimeStamp"),
CUSTOM_EXPORTS("CustomExports"),
CUSTOM_EXPORTS_NAME_FORMATTER("CustomExports#NameFormatter"),
CUSTOM_IMPORTS("CustomImports"),
GENERAL_FIELDS("GeneralFields"),
IMPORT_INSPECTION("ImportInspectionDialog"),
REMOTE("Remote"),
JOURNAL_ABBREV("JournalAbbreviations"),
REGEX_SEARCH("ExternalFiles#RegularExpressionSearch"),
PREVIEW("Preview"),
AUTOSAVE("Autosave"),
// empty string denotes that it refers to the TOC/index
CONTENTS(""), // this is always the index
ENTRY_EDITOR("general/entryeditor"),
STRING_EDITOR("setup/stringeditor"),
SPECIAL_FIELDS("fields/specialfields"),
BIBTEX_KEY_PATTERN("setup/bibtexkeypatterns"),
OWNER("fields/owner"),
TIMESTAMP("fields/timestamp"),
CUSTOM_EXPORTS_NAME_FORMATTER("import-export/customexports#using-custom-name-formatters"),
GENERAL_FIELDS("setup/generalfields"),
REMOTE("general/remote"),
REGEX_SEARCH("fields/filelinks#RegularExpressionSearch"),
PREVIEW("setup/preview"),
AUTOSAVE("general/autosave"),
//The help page covers both OO and LO.
OPENOFFICE_LIBREOFFICE("OpenOfficeIntegration"),
FETCHER_ACM("ACMPortal"),
FETCHER_ADS("ADS"),
OPENOFFICE_LIBREOFFICE("import-export/openofficeintegration"),
FETCHER_ACM("import-using-online-bibliographic-database/acmportal"),
FETCHER_ADS("import-using-online-bibliographic-database/ads"),
FETCHER_BIBSONOMY_SCRAPER(""),
FETCHER_CITESEERX("CiteSeer"),
FETCHER_DBLP("DBLP"),
FETCHER_DIVA("DiVAtoBibTeX"),
FETCHER_DOAJ("DOAJ"),
FETCHER_DOI("DOItoBibTeX"),
FETCHER_GOOGLE_SCHOLAR("GoogleScholar"),
FETCHER_GVK("GVK"),
FETCHER_IEEEXPLORE("IEEEXplore"),
FETCHER_INSPIRE("INSPIRE"),
FETCHER_ISBN("ISBNtoBibTeX"),
FETCHER_MEDLINE("Medline"),
FETCHER_OAI2_ARXIV("arXiv"),
FETCHER_RFC("RFCtoBibTeX"),
FETCHER_SPRINGER("Springer"),
FETCHER_TITLE("TitleToBibTeX"),
FETCHER_CITESEERX("import-using-online-bibliographic-database/citeseer"),
FETCHER_DBLP("import-using-online-bibliographic-database/dblp"),
FETCHER_DIVA("import-using-publication-identifiers/divatobibtex"),
FETCHER_DOAJ("import-using-online-bibliographic-database/doaj"),
FETCHER_DOI("import-using-publication-identifiers/doitobibtex"),
FETCHER_GOOGLE_SCHOLAR("import-using-online-bibliographic-database/googlescholar"),
FETCHER_GVK("import-using-online-bibliographic-database/gvk"),
FETCHER_IEEEXPLORE("import-using-online-bibliographic-database/ieeexplore"),
FETCHER_INSPIRE("import-using-online-bibliographic-database/inspire"),
FETCHER_ISBN("import-using-publication-identifiers/isbntobibtex"),
FETCHER_MEDLINE("import-using-online-bibliographic-database/medline"),
FETCHER_OAI2_ARXIV("import-using-online-bibliographic-database/arxiv"),
FETCHER_RFC("import-using-publication-identifiers/rfctobibtex"),
FETCHER_SPRINGER("import-using-online-bibliographic-database/springer"),
FETCHER_TITLE("import-using-publication-identifiers/titletobibtex"),
FETCHER_SCIENCEDIRECT(""),
DATABASE_PROPERTIES("DatabaseProperties"),
FIND_DUPLICATES("FindDuplicates"),
SQL_DATABASE_MIGRATION("SQLDatabaseMigration"),
SQL_DATABASE("SQLDatabase");
DATABASE_PROPERTIES("setup/databaseproperties"),
FIND_DUPLICATES("finding-sorting-and-cleaning-entries/findduplicates"),
SQL_DATABASE_MIGRATION("collaborative-work/sqldatabasemigration");

private final String pageName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/**
* Fetch or search from PubMed <a href="http://www.ncbi.nlm.nih.gov/sites/entrez/">www.ncbi.nlm.nih.gov</a>
* The MedlineFetcher fetches the entries from the PubMed database.
* See <a href="http://help.jabref.org/en/MedlineRIS">help.jabref.org</a> for a detailed documentation of the available fields.
* See <a href="https://docs.jabref.org/import-export/medlineris">docs.jabref.org</a> for a detailed documentation of the available fields.
*/
public class MedlineFetcher implements IdBasedParserFetcher, SearchBasedFetcher {
private static final Logger LOGGER = LoggerFactory.getLogger(MedlineFetcher.class);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/model/entry/Month.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public String getShortName() {
*
* See <a href="https://github.com/JabRef/jabref/issues/263#issuecomment-151246595">Issue 263</a> for a discussion on that thing.
* This seems to be an <em>invalid</em> format in terms of plain BiBTeX, but a <em>valid</em> format in the case of JabRef.
* The documentation is available at the <a href="http://help.jabref.org/en/Strings">Strings help</a> of JabRef.
* The documentation is available at the <a href="https://docs.jabref.org/fields/strings">Strings help</a> of JabRef.
*
* @return Month in JabRef format
*/
Expand Down
27 changes: 17 additions & 10 deletions src/test/java/org/jabref/logic/help/HelpFileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.stream.Stream;

import org.jabref.logic.net.URLDownload;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

import static org.jabref.logic.help.HelpFile.values;
import static org.junit.jupiter.api.Assertions.assertEquals;

public class HelpFileTest {

private final String jabrefHelp = "https://help.jabref.org/en/";
private final String jabrefHelp = "https://docs.jabref.org/";

@Test
public void referToValidPage() throws IOException {
for (HelpFile help : HelpFile.values()) {
URL url = new URL(jabrefHelp + help.getPageName());
HttpURLConnection http = (HttpURLConnection) url.openConnection();
http.setRequestProperty("User-Agent", URLDownload.USER_AGENT);
assertEquals(200, http.getResponseCode());
}
static Stream<HelpFile> getAllHelpFiles() {
return Arrays.stream(values());
}

@ParameterizedTest
@MethodSource("getAllHelpFiles")
public void referToValidPage(HelpFile help) throws IOException {
URL url = new URL(jabrefHelp + help.getPageName());
HttpURLConnection http = (HttpURLConnection) url.openConnection();
http.setRequestProperty("User-Agent", URLDownload.USER_AGENT);
assertEquals(200, http.getResponseCode(), "Wrong URL: " + url.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void setUp() throws Exception {
diezSliceTheoremEntry.setField(StandardField.URL, "https://ui.adsabs.harvard.edu/abs/2018arXiv181204698D");
diezSliceTheoremEntry.setField(StandardField.ABSTRACT,
"We establish a general slice theorem for the action of a locally convex Lie group on a locally convex manifold, which generalizes the classical slice theorem of Palais to infinite dimensions. We discuss two important settings under which the assumptions of this theorem are fulfilled. First, using Gl{\\\"o}ckner's inverse function theorem, we show that the linear action of a compact Lie group on a Fr{\\'e}chet space admits a slice. Second, using the Nash--Moser theorem, we establish a slice theorem for the tame action of a tame Fr{\\'e}chet Lie group on a tame Fr{\\'e}chet manifold. For this purpose, we develop the concept of a graded Riemannian metric, which allows the construction of a path-length metric compatible with the manifold topology and of a local addition. Finally, generalizing a classical result in finite dimensions, we prove that the existence of a slice implies that the decomposition of the manifold into orbit types of the group action is a stratification.");
diezSliceTheoremEntry.setField(StandardField.ABSTRACT, "Not Available <P />");

famaeyMcGaughEntry = new BibEntry();
famaeyMcGaughEntry.setType(StandardEntryType.Article);
Expand Down Expand Up @@ -96,6 +97,7 @@ public void setUp() throws Exception {
xiongSunEntry.setField(StandardField.VOLUME, "45");
xiongSunEntry.setField(StandardField.YEAR, "2007");
xiongSunEntry.setField(StandardField.URL, "https://ui.adsabs.harvard.edu/abs/2007ITGRS..45..879X");
xiongSunEntry.setField(StandardField.ABSTRACT, "Not Available <P />");

ingersollPollardEntry = new BibEntry();
ingersollPollardEntry.setType(StandardEntryType.Article);
Expand Down Expand Up @@ -127,11 +129,12 @@ public void setUp() throws Exception {
luceyPaulEntry.setField(StandardField.URL, "https://ui.adsabs.harvard.edu/abs/2000JGR...10520297L");
luceyPaulEntry.setField(StandardField.MONTH, "Jan");
luceyPaulEntry.setField(StandardField.NUMBER, "E8");
luceyPaulEntry.setField(StandardField.ABSTRACT, "Not Available <P />");
}

@Test
public void testHelpPage() {
assertEquals("ADS", fetcher.getHelpPage().get().getPageName());
assertEquals("import-using-online-bibliographic-database/ads", fetcher.getHelpPage().get().getPageName());
}

@Test
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/org/jabref/logic/importer/fetcher/IEEETest.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ void searchResultHasNoKeywordTerms() throws FetcherException {

expected.setField(StandardField.AUTHOR, "Shatakshi Jha and Ikhlaq Hussain and Bhim Singh and Sukumar Mishra");
expected.setField(StandardField.DATE, "25 2 2019");
expected.setField(StandardField.YEAR, "2019");
expected.setField(StandardField.DOI, "10.1049/iet-rpg.2018.5648");
expected.setField(StandardField.FILE, ":https\\://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8636659:PDF");
expected.setField(StandardField.ISSN, "1752-1416");
expected.setField(StandardField.ISSUE, "3");
expected.setField(StandardField.JOURNALTITLE, "IET Renewable Power Generation");
expected.setField(StandardField.PAGES, "418--426");
Expand All @@ -118,12 +118,11 @@ void searchByQueryFindsEntry() throws Exception {
BibEntry expected = new BibEntry(StandardEntryType.InProceedings);
expected.setField(StandardField.AUTHOR, "Igor Steinmacher and Tayana Uchoa Conte and Christoph Treude and Marco Aurélio Gerosa");
expected.setField(StandardField.DATE, "14-22 May 2016");
expected.setField(StandardField.YEAR, "2016");
expected.setField(StandardField.EVENTDATE, "14-22 May 2016");
expected.setField(StandardField.EVENTTITLEADDON, "Austin, TX");
expected.setField(StandardField.LOCATION, "Austin, TX");
expected.setField(StandardField.DOI, "10.1145/2884781.2884806");
expected.setField(StandardField.ISBN, "978-1-4503-3900-1");
expected.setField(StandardField.ISSN, "1558-1225");
expected.setField(StandardField.JOURNALTITLE, "2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE)");
expected.setField(StandardField.PAGES, "273--284");
expected.setField(StandardField.PUBLISHER, "IEEE");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void testName() {

@Test
void testHelpPage() {
assertEquals("ISBNtoBibTeX", fetcher.getHelpPage().get().getPageName());
assertEquals("import-using-publication-identifiers/isbntobibtex", fetcher.getHelpPage().get().getPageName());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void testName() {
@Test
@Override
public void testHelpPage() {
assertEquals("ISBNtoBibTeX", fetcher.getHelpPage().get().getPageName());
assertEquals("import-using-publication-identifiers/isbntobibtex", fetcher.getHelpPage().get().getPageName());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void testName() {
@Test
@Override
public void testHelpPage() {
assertEquals("ISBNtoBibTeX", fetcher.getHelpPage().get().getPageName());
assertEquals("import-using-publication-identifiers/isbntobibtex", fetcher.getHelpPage().get().getPageName());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void setUp() {
void findByDOI() throws IOException {
entry.setField(StandardField.DOI, "10.1038/nature12373");

assertEquals(Optional.of(new URL("https://dash.harvard.edu/bitstream/handle/1/12285462/Nanometer-Scale%20Thermometry.pdf?sequence=1")), finder.findFullText(entry));
assertEquals(Optional.of(new URL("https://dash.harvard.edu/bitstream/1/12285462/Nanometer-Scale%20Thermometry.pdf?sequence=1")), finder.findFullText(entry));
}

@Test
Expand Down
Loading

0 comments on commit 337716f

Please sign in to comment.