Skip to content
This repository was archived by the owner on Oct 13, 2024. It is now read-only.

Commit 121ebe7

Browse files
refactor: restructure source code
1 parent 01d4d90 commit 121ebe7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+228
-217
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ jobs:
5959

6060
- name: Set up Python Dependencies
6161
run: |
62-
python -m pip install --upgrade pip setuptools
63-
python -m pip install -r requirements-dev.txt --no-warn-script-location
62+
python -m pip install --upgrade pip setuptools wheel
63+
python -m pip install -r requirements-dev.txt
6464
6565
- name: Compile Locale Translations
6666
run: |
@@ -108,7 +108,7 @@ jobs:
108108
--tb=native \
109109
--verbose \
110110
--color=yes \
111-
--cov=pyra \
111+
--cov=src \
112112
tests
113113
114114
- name: Upload coverage

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ cython_debug/
155155
node_modules/
156156
*package-lock.json
157157

158-
# RetroArcher directories
158+
# project files and directories
159159
logs/
160-
161-
# RetroArcher files
162160
*config.ini

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ RUN groupadd -g 1000 retroarcher && \
6262
RUN mkdir -p /config
6363
VOLUME /config
6464

65-
CMD ["python", "retroarcher.py"]
65+
CMD ["python", "./src/retroarcher.py"]
6666

6767
EXPOSE 9696
6868
HEALTHCHECK --start-period=90s CMD python retroarcher.py --docker_healthcheck || exit 1

docs/source/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
script_dir = os.path.dirname(os.path.abspath(__file__)) # the directory of this file
2020
source_dir = os.path.dirname(script_dir) # the source folder directory
2121
root_dir = os.path.dirname(source_dir) # the root folder directory
22+
src_dir = os.path.join(root_dir, 'src') # the src folder directory
2223

2324
try:
24-
sys.path.insert(0, root_dir)
25-
from pyra import definitions # put this in a try/except to prevent flake8 warning
26-
except Exception:
25+
sys.path.insert(0, src_dir)
26+
from common import definitions # put this in a try/except to prevent flake8 warning
27+
except Exception as e:
28+
print(f"Unable to import definitions from {root_dir}: {e}")
2729
sys.exit(1)
2830

2931
# -- Project information -----------------------------------------------------

docs/source/contributing/localization.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ situations. For example the system tray icon is user interfacing and therefore s
4343
- In order for strings to be extracted from python code, the following lines must be added.
4444
.. code-block:: python
4545
46-
from pyra import locales
46+
from common import locales
4747
_ = locales.get_text()
4848
4949
- Wrap the string to be extracted in a function as shown.
@@ -76,8 +76,7 @@ any of the following paths are modified.
7676

7777
.. code-block:: yaml
7878
79-
- 'retroarcher.py'
80-
- 'pyra/**.py'
79+
- 'src/**.py'
8180
- 'web/templates/**'
8281
8382
When testing locally it may be desirable to manually extract, initialize, update, and compile strings.

docs/source/pyra_docs/config.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/source/pyra_docs/hardware.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/source/pyra_docs/helpers.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/source/pyra_docs/locales.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/source/pyra_docs/logger.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)