Rename package from 'nw' to 'novelwriter' (#868)

* Rename nw folder to novelwriter
* Rename nw to novelwriter in auxiliary files
* Rename nw to novelwriter in main app source
* Rename nw to novelwriter in tests
* Make setup script for pdf docs less spammy
This commit is contained in:
Veronica Berglyd Olsen
2021-08-26 17:33:54 +02:00
committed by GitHub
parent 2cf2eb9f55
commit 3403d98c72
396 changed files with 595 additions and 566 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ from tools import getGuiItem
from PyQt5.QtWidgets import QAction, QMessageBox
from nw.dialogs import GuiAbout
from novelwriter.dialogs import GuiAbout
keyDelay = 2
typeDelay = 1
+3 -3
View File
@@ -24,7 +24,7 @@ import pytest
from PyQt5.QtCore import QItemSelectionModel
from PyQt5.QtWidgets import QAction, QListWidgetItem, QDialog, QMessageBox
from nw.dialogs import GuiQuoteSelect, GuiUpdates
from novelwriter.dialogs import GuiQuoteSelect, GuiUpdates
keyDelay = 2
typeDelay = 1
@@ -86,11 +86,11 @@ def testDlgOther_Updates(qtbot, monkeypatch, nwGUI):
return mockPayload()
# Faulty Return
monkeypatch.setattr("nw.dialogs.updates.urlopen", mockUrlopenA)
monkeypatch.setattr("novelwriter.dialogs.updates.urlopen", mockUrlopenA)
nwUpdate.checkLatest()
# Valid Return
monkeypatch.setattr("nw.dialogs.updates.urlopen", mockUrlopenB)
monkeypatch.setattr("novelwriter.dialogs.updates.urlopen", mockUrlopenB)
nwUpdate.checkLatest()
assert nwUpdate.latestValue.text().startswith("novelWriter v1.0")
+3 -3
View File
@@ -27,9 +27,9 @@ from tools import cmpFiles, getGuiItem
from PyQt5.QtWidgets import QAction, QMessageBox
from nw.gui import GuiProjectTree
from nw.enum import nwItemLayout
from nw.dialogs import GuiItemEditor
from novelwriter.gui import GuiProjectTree
from novelwriter.enum import nwItemLayout
from novelwriter.dialogs import GuiItemEditor
keyDelay = 2
typeDelay = 1
+3 -3
View File
@@ -27,9 +27,9 @@ from mock import causeOSError
from PyQt5.QtWidgets import QAction, QMessageBox, QDialog
from nw.dialogs import GuiDocMerge, GuiItemEditor
from nw.enum import nwItemType, nwWidget
from nw.core.tree import NWTree
from novelwriter.dialogs import GuiDocMerge, GuiItemEditor
from novelwriter.enum import nwItemType, nwWidget
from novelwriter.core.tree import NWTree
keyDelay = 2
typeDelay = 1
+10 -10
View File
@@ -19,9 +19,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import nw
import pytest
import os
import pytest
import novelwriter
from shutil import copyfile
from tools import cmpFiles, getGuiItem
@@ -31,9 +31,9 @@ from PyQt5.QtWidgets import (
QDialogButtonBox, QDialog, QAction, QFileDialog, QFontDialog, QMessageBox
)
from nw.config import Config
from nw.dialogs import GuiPreferences, GuiQuoteSelect
from nw.constants import nwConst
from novelwriter.config import Config
from novelwriter.dialogs import GuiPreferences, GuiQuoteSelect
from novelwriter.constants import nwConst
keyDelay = 2
typeDelay = 1
@@ -50,17 +50,17 @@ def testDlgPreferences_Main(qtbot, monkeypatch, fncDir, outDir, refDir):
monkeypatch.setattr(QMessageBox, "information", lambda *a: QMessageBox.Yes)
# Must create a clean config and GUI object as the test-wide
# nw.CONFIG object is created on import an can be tainted by other tests
# novelwriter.CONFIG object is created on import an can be tainted by other tests
confFile = os.path.join(fncDir, "novelwriter.conf")
if os.path.isfile(confFile):
os.unlink(confFile)
theConf = Config()
theConf.initConfig(fncDir, fncDir)
theConf.setLastPath("")
origConf = nw.CONFIG
nw.CONFIG = theConf
origConf = novelwriter.CONFIG
novelwriter.CONFIG = theConf
nwGUI = nw.main(["--testmode", "--config=%s" % fncDir, "--data=%s" % fncDir])
nwGUI = novelwriter.main(["--testmode", "--config=%s" % fncDir, "--data=%s" % fncDir])
qtbot.addWidget(nwGUI)
nwGUI.show()
qtbot.wait(stepDelay)
@@ -253,7 +253,7 @@ def testDlgPreferences_Main(qtbot, monkeypatch, fncDir, outDir, refDir):
assert cmpFiles(testFile, compFile, ignoreLines)
# Clean up
nw.CONFIG = origConf
novelwriter.CONFIG = origConf
nwGUI.closeMain()
# qtbot.stopForInteraction()
+1 -1
View File
@@ -30,7 +30,7 @@ from PyQt5.QtWidgets import (
QMessageBox
)
from nw.dialogs import GuiProjectLoad
from novelwriter.dialogs import GuiProjectLoad
keyDelay = 2
typeDelay = 1
+1 -1
View File
@@ -31,7 +31,7 @@ from PyQt5.QtWidgets import (
QDialog, QAction, QMessageBox, QColorDialog, QTreeWidgetItem
)
from nw.dialogs import GuiProjectSettings
from novelwriter.dialogs import GuiProjectSettings
keyDelay = 2
typeDelay = 1
+4 -4
View File
@@ -27,10 +27,10 @@ from mock import causeOSError
from PyQt5.QtWidgets import QAction, QMessageBox, QDialog
from nw.dialogs import GuiDocSplit, GuiItemEditor
from nw.enum import nwItemType, nwWidget
from nw.core.document import NWDoc
from nw.core.tree import NWTree
from novelwriter.dialogs import GuiDocSplit, GuiItemEditor
from novelwriter.enum import nwItemType, nwWidget
from novelwriter.core.document import NWDoc
from novelwriter.core.tree import NWTree
keyDelay = 2
typeDelay = 1
+2 -2
View File
@@ -28,8 +28,8 @@ from PyQt5.QtWidgets import QDialog, QMessageBox, QAction
from tools import writeFile, readFile, getGuiItem
from mock import causeOSError
from nw.dialogs import GuiWordList
from nw.constants import nwFiles
from novelwriter.dialogs import GuiWordList
from novelwriter.constants import nwFiles
keyDelay = 2
typeDelay = 1