diff options
| author | Simeon Simeonov | 2025-12-23 09:59:50 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2025-12-23 09:59:50 +0100 |
| commit | a29c4509a316c0c77450b6fa74b96f036b0f0821 (patch) | |
| tree | 13babfe7a0fba24c7df609c909b81ab70f4092ec | |
| parent | 8ad11db860898dcfc9269f2b84df7e301a6e8e5c (diff) | |
Add structure
| -rw-r--r-- | .gitignore | 65 | ||||
| -rw-r--r-- | CHANGELOG | 5 | ||||
| -rw-r--r-- | LICENSE | 15 | ||||
| -rw-r--r-- | README.rst | 12 | ||||
| -rw-r--r-- | pyproject.toml | 194 | ||||
| -rw-r--r-- | src/scorecounter/__init__.py (renamed from __init__.py) | 0 | ||||
| -rw-r--r-- | src/scorecounter/__main__.py (renamed from __main__.py) | 0 | ||||
| -rw-r--r-- | src/scorecounter/app.py (renamed from app.py) | 0 | ||||
| -rw-r--r-- | tests/__init__.py | 0 | ||||
| -rw-r--r-- | tests/scorecounter.py | 35 | ||||
| -rw-r--r-- | tests/test_app.py | 3 |
11 files changed, 329 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..691f282 --- /dev/null +++ b/.gitignore | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | # Byte-compiled / optimized / DLL files | ||
| 2 | __pycache__/ | ||
| 3 | *.py[cod] | ||
| 4 | *$py.class | ||
| 5 | |||
| 6 | # OSX useful to ignore | ||
| 7 | *.DS_Store | ||
| 8 | .AppleDouble | ||
| 9 | .LSOverride | ||
| 10 | |||
| 11 | # Thumbnails | ||
| 12 | ._* | ||
| 13 | |||
| 14 | # Files that might appear in the root of a volume | ||
| 15 | .DocumentRevisions-V100 | ||
| 16 | .fseventsd | ||
| 17 | .Spotlight-V100 | ||
| 18 | .TemporaryItems | ||
| 19 | .Trashes | ||
| 20 | .VolumeIcon.icns | ||
| 21 | .com.apple.timemachine.donotpresent | ||
| 22 | |||
| 23 | # Directories potentially created on remote AFP share | ||
| 24 | .AppleDB | ||
| 25 | .AppleDesktop | ||
| 26 | Network Trash Folder | ||
| 27 | Temporary Items | ||
| 28 | .apdisk | ||
| 29 | |||
| 30 | # C extensions | ||
| 31 | *.so | ||
| 32 | |||
| 33 | # Distribution / packaging | ||
| 34 | .Python | ||
| 35 | env/ | ||
| 36 | build/ | ||
| 37 | develop-eggs/ | ||
| 38 | dist/ | ||
| 39 | downloads/ | ||
| 40 | eggs/ | ||
| 41 | .eggs/ | ||
| 42 | lib/ | ||
| 43 | lib64/ | ||
| 44 | parts/ | ||
| 45 | sdist/ | ||
| 46 | var/ | ||
| 47 | *.dist-info/ | ||
| 48 | *.egg-info/ | ||
| 49 | .installed.cfg | ||
| 50 | *.egg | ||
| 51 | |||
| 52 | # IntelliJ Idea family of suites | ||
| 53 | .idea | ||
| 54 | *.iml | ||
| 55 | ## File-based project format: | ||
| 56 | *.ipr | ||
| 57 | *.iws | ||
| 58 | ## mpeltonen/sbt-idea plugin | ||
| 59 | .idea_modules/ | ||
| 60 | |||
| 61 | # Briefcase log files | ||
| 62 | logs/ | ||
| 63 | |||
| 64 | # Briefcase local configuratoin | ||
| 65 | .briefcase/ | ||
diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..3a9a25a --- /dev/null +++ b/CHANGELOG | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # scorecounter Release Notes | ||
| 2 | |||
| 3 | ## 0.0.1 (22 Dec 2025) | ||
| 4 | |||
| 5 | * Initial release | ||
| @@ -0,0 +1,15 @@ | |||
| 1 | scorecounter: Simple application for counting scores for two teams | ||
| 2 | Copyright (C) 2025 Simeon Simeonov | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 3 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..9316f3e --- /dev/null +++ b/README.rst | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | scorecounter | ||
| 2 | ============ | ||
| 3 | |||
| 4 | **This cross-platform app was generated by** `Briefcase`_ **- part of** | ||
| 5 | `The BeeWare Project`_. **If you want to see more tools like Briefcase, please | ||
| 6 | consider** `becoming a financial member of BeeWare`_. | ||
| 7 | |||
| 8 | Simple application for counting scores for two teams | ||
| 9 | |||
| 10 | .. _`Briefcase`: https://briefcase.readthedocs.io/ | ||
| 11 | .. _`The BeeWare Project`: https://beeware.org/ | ||
| 12 | .. _`becoming a financial member of BeeWare`: https://beeware.org/contributing/membership | ||
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b76b249 --- /dev/null +++ b/pyproject.toml | |||
| @@ -0,0 +1,194 @@ | |||
| 1 | # This project was generated with 0.3.26 using template: https://github.com/beeware/briefcase-template @ v0.3.26 | ||
| 2 | [tool.briefcase] | ||
| 3 | project_name = "scorecounter" | ||
| 4 | bundle = "org.pichove" | ||
| 5 | version = "1.0.0" | ||
| 6 | url = "https://simeon.simeonov.no" | ||
| 7 | license.file = "LICENSE" | ||
| 8 | author = "Simeon Simeonov" | ||
| 9 | author_email = "sgs@pichove.org" | ||
| 10 | |||
| 11 | [tool.briefcase.app.scorecounter] | ||
| 12 | formal_name = "scorecounter" | ||
| 13 | description = "Simple application for counting scores for two teams" | ||
| 14 | long_description = """Simple application for counting scores for two teams | ||
| 15 | """ | ||
| 16 | sources = [ | ||
| 17 | "src/scorecounter", | ||
| 18 | ] | ||
| 19 | test_sources = [ | ||
| 20 | "tests", | ||
| 21 | ] | ||
| 22 | |||
| 23 | requires = [ | ||
| 24 | ] | ||
| 25 | test_requires = [ | ||
| 26 | "pytest", | ||
| 27 | ] | ||
| 28 | |||
| 29 | [tool.briefcase.app.scorecounter.macOS] | ||
| 30 | universal_build = true | ||
| 31 | requires = [ | ||
| 32 | "toga-cocoa~=0.5.0", | ||
| 33 | "std-nslog~=1.0.3", | ||
| 34 | ] | ||
| 35 | |||
| 36 | [tool.briefcase.app.scorecounter.linux] | ||
| 37 | requires = [ | ||
| 38 | "toga-gtk~=0.5.0", | ||
| 39 | # PyGObject 3.52.1 enforces a requirement on libgirepository-2.0-dev. This library | ||
| 40 | # isn't available on Debian 12/Ubuntu 22.04. If you don't need to support those (or | ||
| 41 | # older) releases, you can remove this version pin. See beeware/toga#3143. | ||
| 42 | "pygobject < 3.52.1", | ||
| 43 | ] | ||
| 44 | |||
| 45 | [tool.briefcase.app.scorecounter.linux.system.debian] | ||
| 46 | system_requires = [ | ||
| 47 | # Needed to compile pycairo wheel | ||
| 48 | "libcairo2-dev", | ||
| 49 | # One of the following two packages are needed to compile PyGObject wheel. If you | ||
| 50 | # remove the pygobject pin in the requires list, you should also change to the | ||
| 51 | # version 2.0 of the girepository library. See beeware/toga#3143. | ||
| 52 | "libgirepository1.0-dev", | ||
| 53 | # "libgirepository-2.0-dev", | ||
| 54 | ] | ||
| 55 | |||
| 56 | system_runtime_requires = [ | ||
| 57 | # Needed to provide GTK and its GI bindings | ||
| 58 | "gir1.2-gtk-3.0", | ||
| 59 | # One of the following two packages are needed to use PyGObject at runtime. If you | ||
| 60 | # remove the pygobject pin in the requires list, you should also change to the | ||
| 61 | # version 2.0 of the girepository library. See beeware/toga#3143. | ||
| 62 | "libgirepository-1.0-1", | ||
| 63 | # "libgirepository-2.0-0", | ||
| 64 | # Dependencies that GTK looks for at runtime | ||
| 65 | "libcanberra-gtk3-module", | ||
| 66 | # Needed to provide WebKit2 at runtime | ||
| 67 | # Note: Debian 11 requires gir1.2-webkit2-4.0 instead | ||
| 68 | # "gir1.2-webkit2-4.1", | ||
| 69 | ] | ||
| 70 | |||
| 71 | [tool.briefcase.app.scorecounter.linux.system.rhel] | ||
| 72 | system_requires = [ | ||
| 73 | # Needed to compile pycairo wheel | ||
| 74 | "cairo-gobject-devel", | ||
| 75 | # Needed to compile PyGObject wheel | ||
| 76 | "gobject-introspection-devel", | ||
| 77 | ] | ||
| 78 | |||
| 79 | system_runtime_requires = [ | ||
| 80 | # Needed to support Python bindings to GTK | ||
| 81 | "gobject-introspection", | ||
| 82 | # Needed to provide GTK | ||
| 83 | "gtk3", | ||
| 84 | # Dependencies that GTK looks for at runtime | ||
| 85 | "libcanberra-gtk3", | ||
| 86 | # Needed to provide WebKit2 at runtime | ||
| 87 | # "webkit2gtk3", | ||
| 88 | ] | ||
| 89 | |||
| 90 | [tool.briefcase.app.scorecounter.linux.system.suse] | ||
| 91 | system_requires = [ | ||
| 92 | # Needed to compile pycairo wheel | ||
| 93 | "cairo-devel", | ||
| 94 | # Needed to compile PyGObject wheel | ||
| 95 | "gobject-introspection-devel", | ||
| 96 | ] | ||
| 97 | |||
| 98 | system_runtime_requires = [ | ||
| 99 | # Needed to provide GTK | ||
| 100 | "gtk3", | ||
| 101 | # Needed to support Python bindings to GTK | ||
| 102 | "gobject-introspection", "typelib(Gtk) = 3.0", | ||
| 103 | # Dependencies that GTK looks for at runtime | ||
| 104 | "libcanberra-gtk3-module", | ||
| 105 | # Needed to provide WebKit2 at runtime | ||
| 106 | # "libwebkit2gtk3", "typelib(WebKit2)", | ||
| 107 | ] | ||
| 108 | |||
| 109 | [tool.briefcase.app.scorecounter.linux.system.arch] | ||
| 110 | system_requires = [ | ||
| 111 | # Needed to compile pycairo wheel | ||
| 112 | "cairo", | ||
| 113 | # Needed to compile PyGObject wheel | ||
| 114 | "gobject-introspection", | ||
| 115 | # Runtime dependencies that need to exist so that the | ||
| 116 | # Arch package passes final validation. | ||
| 117 | # Needed to provide GTK | ||
| 118 | "gtk3", | ||
| 119 | # Dependencies that GTK looks for at runtime | ||
| 120 | "libcanberra", | ||
| 121 | # Needed to provide WebKit2 | ||
| 122 | # "webkit2gtk", | ||
| 123 | ] | ||
| 124 | |||
| 125 | system_runtime_requires = [ | ||
| 126 | # Needed to provide GTK | ||
| 127 | "gtk3", | ||
| 128 | # Needed to provide PyGObject bindings | ||
| 129 | "gobject-introspection-runtime", | ||
| 130 | # Dependencies that GTK looks for at runtime | ||
| 131 | "libcanberra", | ||
| 132 | # Needed to provide WebKit2 at runtime | ||
| 133 | # "webkit2gtk", | ||
| 134 | ] | ||
| 135 | |||
| 136 | [tool.briefcase.app.scorecounter.linux.appimage] | ||
| 137 | manylinux = "manylinux_2_28" | ||
| 138 | |||
| 139 | system_requires = [ | ||
| 140 | # Needed to compile pycairo wheel | ||
| 141 | "cairo-gobject-devel", | ||
| 142 | # Needed to compile PyGObject wheel | ||
| 143 | "gobject-introspection-devel", | ||
| 144 | # Needed to provide GTK | ||
| 145 | "gtk3-devel", | ||
| 146 | # Dependencies that GTK looks for at runtime, that need to be | ||
| 147 | # in the build environment to be picked up by linuxdeploy | ||
| 148 | "libcanberra-gtk3", | ||
| 149 | "PackageKit-gtk3-module", | ||
| 150 | "gvfs-client", | ||
| 151 | ] | ||
| 152 | |||
| 153 | linuxdeploy_plugins = [ | ||
| 154 | "DEPLOY_GTK_VERSION=3 gtk", | ||
| 155 | ] | ||
| 156 | |||
| 157 | [tool.briefcase.app.scorecounter.linux.flatpak] | ||
| 158 | flatpak_runtime = "org.gnome.Platform" | ||
| 159 | flatpak_runtime_version = "48" | ||
| 160 | flatpak_sdk = "org.gnome.Sdk" | ||
| 161 | |||
| 162 | [tool.briefcase.app.scorecounter.windows] | ||
| 163 | requires = [ | ||
| 164 | "toga-winforms~=0.5.0", | ||
| 165 | ] | ||
| 166 | |||
| 167 | # Mobile deployments | ||
| 168 | [tool.briefcase.app.scorecounter.iOS] | ||
| 169 | requires = [ | ||
| 170 | "toga-iOS~=0.5.0", | ||
| 171 | "std-nslog~=1.0.3", | ||
| 172 | ] | ||
| 173 | |||
| 174 | [tool.briefcase.app.scorecounter.android] | ||
| 175 | requires = [ | ||
| 176 | "toga-android~=0.5.0", | ||
| 177 | ] | ||
| 178 | |||
| 179 | base_theme = "Theme.MaterialComponents.Light.DarkActionBar" | ||
| 180 | |||
| 181 | build_gradle_dependencies = [ | ||
| 182 | "com.google.android.material:material:1.13.0", | ||
| 183 | # Needed for DetailedList | ||
| 184 | # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", | ||
| 185 | # Needed for MapView | ||
| 186 | # "org.osmdroid:osmdroid-android:6.1.20", | ||
| 187 | ] | ||
| 188 | |||
| 189 | # Web deployments | ||
| 190 | [tool.briefcase.app.scorecounter.web] | ||
| 191 | requires = [ | ||
| 192 | "toga-web~=0.5.0", | ||
| 193 | ] | ||
| 194 | |||
diff --git a/__init__.py b/src/scorecounter/__init__.py index e69de29..e69de29 100644 --- a/__init__.py +++ b/src/scorecounter/__init__.py | |||
diff --git a/__main__.py b/src/scorecounter/__main__.py index 8fac33c..8fac33c 100644 --- a/__main__.py +++ b/src/scorecounter/__main__.py | |||
diff --git a/app.py b/src/scorecounter/app.py index cf4bc1d..cf4bc1d 100644 --- a/app.py +++ b/src/scorecounter/app.py | |||
diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/__init__.py | |||
diff --git a/tests/scorecounter.py b/tests/scorecounter.py new file mode 100644 index 0000000..d59e9f3 --- /dev/null +++ b/tests/scorecounter.py | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | import os | ||
| 2 | import sys | ||
| 3 | import tempfile | ||
| 4 | from pathlib import Path | ||
| 5 | |||
| 6 | import pytest | ||
| 7 | |||
| 8 | |||
| 9 | def run_tests(): | ||
| 10 | project_path = Path(__file__).parent.parent | ||
| 11 | os.chdir(project_path) | ||
| 12 | |||
| 13 | # Determine any args to pass to pytest. If there aren't any, | ||
| 14 | # default to running the whole test suite. | ||
| 15 | args = sys.argv[1:] | ||
| 16 | if len(args) == 0: | ||
| 17 | args = ["tests"] | ||
| 18 | |||
| 19 | returncode = pytest.main( | ||
| 20 | [ | ||
| 21 | # Turn up verbosity | ||
| 22 | "-vv", | ||
| 23 | # Disable color | ||
| 24 | "--color=no", | ||
| 25 | # Overwrite the cache directory to somewhere writable | ||
| 26 | "-o", | ||
| 27 | f"cache_dir={tempfile.gettempdir()}/.pytest_cache", | ||
| 28 | ] + args | ||
| 29 | ) | ||
| 30 | |||
| 31 | print(f">>>>>>>>>> EXIT {returncode} <<<<<<<<<<") | ||
| 32 | |||
| 33 | |||
| 34 | if __name__ == "__main__": | ||
| 35 | run_tests() | ||
diff --git a/tests/test_app.py b/tests/test_app.py new file mode 100644 index 0000000..e1a335f --- /dev/null +++ b/tests/test_app.py | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | def test_first(): | ||
| 2 | """An initial test for the app.""" | ||
| 3 | assert 1 + 1 == 2 | ||
