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:
1 parent
2cf2eb9f55
commit
3403d98c72
396 files changed
+595
-566
No files matched your search
@@ -23,9 +23,9 @@ jobs:
|
||||
run: pip install flake8
|
||||
- name: Syntax Error Check
|
||||
run: |
|
||||
flake8 nw --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 novelwriter --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 tests --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
- name: Coding Style Violations
|
||||
run: |
|
||||
flake8 nw --count --max-line-length=99 --ignore E221,E226,E228,E241 --show-source --statistics
|
||||
flake8 novelwriter --count --max-line-length=99 --ignore E221,E226,E228,E241 --show-source --statistics
|
||||
flake8 tests --count --max-line-length=99 --ignore E221,E226,E228,E241 --show-source --statistics
|
||||
@@ -36,6 +36,6 @@ jobs:
|
||||
- name: Run Tests
|
||||
run: |
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
pytest -v --cov=nw --timeout=60
|
||||
pytest -v --cov=novelwriter --timeout=60
|
||||
- name: Upload to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
@@ -31,6 +31,6 @@ jobs:
|
||||
- name: Run Tests
|
||||
run: |
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
pytest -v --cov=nw --timeout=60
|
||||
pytest -v --cov=novelwriter --timeout=60
|
||||
- name: Upload to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
@@ -26,6 +26,6 @@ jobs:
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Run Tests
|
||||
run: |
|
||||
pytest -v --cov=nw --timeout=60
|
||||
pytest -v --cov=novelwriter --timeout=60
|
||||
- name: Upload to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
+4
-4
@@ -10,15 +10,15 @@ novelwriter.desktop
|
||||
novelWriter.pyw
|
||||
|
||||
# Translations
|
||||
/nw/assets/i18n/*.qm
|
||||
/novelwriter/assets/i18n/*.qm
|
||||
.qmake.stash
|
||||
i18n/*.qm
|
||||
i18n/*.qph
|
||||
|
||||
# Documentation
|
||||
/docs/build/
|
||||
/nw/assets/help/html/
|
||||
/nw/assets/help/manual.pdf
|
||||
/novelwriter/assets/help/html/
|
||||
/novelwriter/assets/help/manual.pdf
|
||||
/UserManual.pdf
|
||||
*.qch
|
||||
*.qhc
|
||||
@@ -28,7 +28,7 @@ __pycache__
|
||||
*.pyc
|
||||
|
||||
# Sample Project
|
||||
/nw/assets/sample.zip
|
||||
/novelwriter/assets/sample.zip
|
||||
/sample/cache
|
||||
/sample/meta
|
||||
/sample/versions
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ include setup.py
|
||||
include LICENSE.md
|
||||
include CHANGELOG.md
|
||||
recursive-include setup *
|
||||
recursive-include nw/assets *
|
||||
recursive-include novelwriter/assets *
|
||||
recursive-include sample *.nwx *.nwd
|
||||
@@ -112,8 +112,8 @@ Building the Translation Files
|
||||
|
||||
If you installed novelWriter from a package, the translation files should be pre-built and
|
||||
included. If you're running novelWriter from the source code, you will need to generate the files
|
||||
yourself. The files you need will be written to the ``nw/assets/i18n`` folder, and will have the
|
||||
``.qm`` file extension.
|
||||
yourself. The files you need will be written to the ``novelwriter/assets/i18n`` folder, and will
|
||||
have the ``.qm`` file extension.
|
||||
|
||||
You can build the ``.qm`` files with:
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ You can also add coverage report generation. For instance to HTML:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
xvfb-run pytest -v --cov=nw --cov-report=html
|
||||
xvfb-run pytest -v --cov=novelwriter --cov-report=html
|
||||
|
||||
Other useful report formats are ``xml``, and ``term`` for terminal output.
|
||||
|
||||
@@ -60,7 +60,7 @@ subpackage groups are ``base``, ``core``, and ``gui``. Consider for instance:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
xvfb-run pytest -v --cov=nw --cov-report=html -m core
|
||||
xvfb-run pytest -v --cov=novelwriter --cov-report=html -m core
|
||||
|
||||
This will only run the tests of the "core" package, that is, all the classes that deal with the
|
||||
project data of a novelWriter project. The "gui" tests, likewise, will run the tests for the GUI
|
||||
@@ -71,7 +71,7 @@ You can also filter the tests with the ``-k`` switch. The following will do the
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
xvfb-run pytest -v --cov=nw --cov-report=html -k testCore
|
||||
xvfb-run pytest -v --cov=novelwriter --cov-report=html -k testCore
|
||||
|
||||
All tests are named in such a way that you can filter them by adding more bits of the test names.
|
||||
They all start with the word "test". Then comes the group: "Core", "Base", "Dlg", "Tool", or "Gui".
|
||||
@@ -80,6 +80,6 @@ file. For instance, running the following will run all tests for the document ed
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
xvfb-run pytest -v --cov=nw --cov-report=html -k testGuiEditor
|
||||
xvfb-run pytest -v --cov=novelwriter --cov-report=html -k testGuiEditor
|
||||
|
||||
To run a single test, simply add the full test name to the ``-k`` switch.
|
||||
+5
-5
@@ -3,8 +3,8 @@
|
||||
The `i18n` folder contains the translation files for the Qt5 GUI. There are two types of files
|
||||
involved: the `nw_XX.ts` and the `nw_XX.qm` files. The `nw_XX.ts` files are located in the `i18n`
|
||||
folder at the root of the repository, and the `nw_XX.qm` together with the `project_XX.json` files
|
||||
are located in `nw/assets/i18n`. The latter are JSON translation maps for the novelWriter projects,
|
||||
used by the Build Novel Project tool.
|
||||
are located in `novelwriter/assets/i18n`. The latter are JSON translation maps for the novelWriter
|
||||
projects, used by the Build Novel Project tool.
|
||||
|
||||
**Note**
|
||||
|
||||
@@ -35,7 +35,7 @@ edited with the Qt 5 Linguist application provided by Qt. This is by far easier
|
||||
editing the `.ts` file. Please select "English" and "United Kingdom" as the source langauge when
|
||||
prompted by Qt 5 Linguist.
|
||||
|
||||
When you're done editing, you can build the `nw/assets/i18n/nw_XX.qm` file and test it in
|
||||
When you're done editing, you can build the `novelwriter/assets/i18n/nw_XX.qm` file and test it in
|
||||
novelWriter. The Preferences dialog should list the newly added language, and you can select it and
|
||||
test it.
|
||||
|
||||
@@ -71,8 +71,8 @@ files.
|
||||
## Project Localisation
|
||||
|
||||
Projects can have a different language setting than the GUI itself. The files with format
|
||||
`project_XX.json` in `nw/assets/i18n` are simple translation maps for text that goes into the
|
||||
exported documents generated by the Build Novel Project tool.
|
||||
`project_XX.json` in `novelwriter/assets/i18n` are simple translation maps for text that goes into
|
||||
the exported documents generated by the Build Novel Project tool.
|
||||
|
||||
The files are loaded based on the language setting in the build tool. At the present time, no other
|
||||
parts of the application use these files. Since these are used as replacement lookups, they are
|
||||
|
||||
+29
-29
@@ -1,34 +1,34 @@
|
||||
SOURCES += \
|
||||
i18n/qtbase.py \
|
||||
nw/core/project.py \
|
||||
nw/core/tokenizer.py \
|
||||
nw/dialogs/about.py \
|
||||
nw/dialogs/docmerge.py \
|
||||
nw/dialogs/docsplit.py \
|
||||
nw/dialogs/itemeditor.py \
|
||||
nw/dialogs/preferences.py \
|
||||
nw/dialogs/projload.py \
|
||||
nw/dialogs/projsettings.py \
|
||||
nw/dialogs/wordlist.py \
|
||||
nw/gui/custom.py \
|
||||
nw/gui/doceditor.py \
|
||||
nw/gui/docviewer.py \
|
||||
nw/gui/itemdetails.py \
|
||||
nw/gui/mainmenu.py \
|
||||
nw/gui/noveltree.py \
|
||||
nw/gui/outline.py \
|
||||
nw/gui/outlinedetails.py \
|
||||
nw/gui/projdetails.py \
|
||||
nw/gui/projtree.py \
|
||||
nw/gui/statusbar.py \
|
||||
nw/gui/theme.py \
|
||||
nw/tools/build.py \
|
||||
nw/tools/projwizard.py \
|
||||
nw/tools/writingstats.py \
|
||||
nw/common.py \
|
||||
nw/constants.py \
|
||||
nw/error.py \
|
||||
nw/guimain.py
|
||||
novelwriter/core/project.py \
|
||||
novelwriter/core/tokenizer.py \
|
||||
novelwriter/dialogs/about.py \
|
||||
novelwriter/dialogs/docmerge.py \
|
||||
novelwriter/dialogs/docsplit.py \
|
||||
novelwriter/dialogs/itemeditor.py \
|
||||
novelwriter/dialogs/preferences.py \
|
||||
novelwriter/dialogs/projload.py \
|
||||
novelwriter/dialogs/projsettings.py \
|
||||
novelwriter/dialogs/wordlist.py \
|
||||
novelwriter/gui/custom.py \
|
||||
novelwriter/gui/doceditor.py \
|
||||
novelwriter/gui/docviewer.py \
|
||||
novelwriter/gui/itemdetails.py \
|
||||
novelwriter/gui/mainmenu.py \
|
||||
novelwriter/gui/noveltree.py \
|
||||
novelwriter/gui/outline.py \
|
||||
novelwriter/gui/outlinedetails.py \
|
||||
novelwriter/gui/projdetails.py \
|
||||
novelwriter/gui/projtree.py \
|
||||
novelwriter/gui/statusbar.py \
|
||||
novelwriter/gui/theme.py \
|
||||
novelwriter/tools/build.py \
|
||||
novelwriter/tools/projwizard.py \
|
||||
novelwriter/tools/writingstats.py \
|
||||
novelwriter/common.py \
|
||||
novelwriter/constants.py \
|
||||
novelwriter/error.py \
|
||||
novelwriter/guimain.py
|
||||
|
||||
TRANSLATIONS += \
|
||||
i18n/nw_en_US.ts \
|
||||
|
||||
+2
-2
@@ -17,5 +17,5 @@ except Exception:
|
||||
os.curdir = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
if __name__ == "__main__":
|
||||
import nw
|
||||
nw.main(sys.argv[1:])
|
||||
import novelwriter
|
||||
novelwriter.main(sys.argv[1:])
|
||||
@@ -30,8 +30,8 @@ import logging
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QApplication, QErrorMessage
|
||||
|
||||
from nw.error import exceptionHandler, logException
|
||||
from nw.config import Config
|
||||
from novelwriter.error import exceptionHandler, logException
|
||||
from novelwriter.config import Config
|
||||
|
||||
##
|
||||
# Version Scheme
|
||||
@@ -55,7 +55,7 @@ from nw.config import Config
|
||||
# 0x010201f0 : 1.2.1 1.2.1 Patch release
|
||||
##
|
||||
|
||||
__package__ = "nw"
|
||||
__package__ = "novelwriter"
|
||||
__copyright__ = "Copyright 2018–2021, Veronica Berglyd Olsen"
|
||||
__license__ = "GPLv3"
|
||||
__author__ = "Veronica Berglyd Olsen"
|
||||
@@ -185,10 +185,10 @@ def main(sysArgs=None):
|
||||
logLevel = logging.INFO
|
||||
elif inOpt == "--debug":
|
||||
logLevel = logging.DEBUG
|
||||
logFormat = "[{asctime:}] {name:>22}:{lineno:<4d} {levelname:8} {message:}"
|
||||
logFormat = "[{asctime:}] {filename:>17}:{lineno:<4d} {levelname:8} {message:}"
|
||||
elif inOpt == "--verbose":
|
||||
logLevel = VERBOSE
|
||||
logFormat = "[{asctime:}] {name:>22}:{lineno:<4d} {levelname:8} {message:}"
|
||||
logFormat = "[{asctime:}] {filename:>17}:{lineno:<4d} {levelname:8} {message:}"
|
||||
elif inOpt == "--style":
|
||||
qtStyle = inArg
|
||||
elif inOpt == "--config":
|
||||
@@ -276,7 +276,7 @@ def main(sysArgs=None):
|
||||
logException()
|
||||
|
||||
# Import GUI (after dependency checks), and launch
|
||||
from nw.guimain import GuiMain
|
||||
from novelwriter.guimain import GuiMain
|
||||
if testMode:
|
||||
nwGUI = GuiMain()
|
||||
return nwGUI
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 396 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user