From e9514e622d27e14c4cd69f0c48d72aac3b32e685 Mon Sep 17 00:00:00 2001 From: Christopher Li <.@.> Date: Mon, 15 Sep 2025 20:41:44 -0400 Subject: [PATCH 1/6] stop tests running on pushes to main --- .github/workflows/test-project.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-project.yml b/.github/workflows/test-project.yml index 85e526c..59940dd 100644 --- a/.github/workflows/test-project.yml +++ b/.github/workflows/test-project.yml @@ -3,9 +3,9 @@ name: Scadable Tests on: pull_request: types: [opened, synchronize, reopened, ready_for_review] - push: - branches: - - main +# push: +# branches: +# - main jobs: test: From 2aaad11b31290fdf94cb32a563d1a0e57044f410 Mon Sep 17 00:00:00 2001 From: Christopher Li <.@.> Date: Mon, 15 Sep 2025 20:51:36 -0400 Subject: [PATCH 2/6] feat: add pre-commit hooks for linting --- .pre-commit-config.yaml | 14 ++++++++++++++ pyproject.toml | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ef4821a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.13.0 + hooks: + - id: ruff-check + args: [ --fix ] + - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index c0c233e..8fe3fd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,10 +24,11 @@ dependencies = [ dev = [ "pytest", "coverage", - "pytest-cov" + "pytest-cov", + "pre-commit" ] [project.urls] "Homepage" = "https://github.com/scadable/library-python" -"Bug Tracker" = "https://github.com/scadable/library-python/issues" \ No newline at end of file +"Bug Tracker" = "https://github.com/scadable/library-python/issues" From 0250ffc268eb9976c9a8a30b638c15d256132132 Mon Sep 17 00:00:00 2001 From: Christopher Li <.@.> Date: Mon, 15 Sep 2025 20:51:50 -0400 Subject: [PATCH 3/6] refactor: precommit hooks --- .gitignore | 6 +++--- README.md | 2 +- src/scadable/__init__.py | 2 +- tests/test_import.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 10ca01a..3578d82 100644 --- a/.gitignore +++ b/.gitignore @@ -182,9 +182,9 @@ cython_debug/ .abstra/ # Visual Studio Code -# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore +# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore -# and can be added to the global gitignore or merged into this file. However, if you prefer, +# and can be added to the global gitignore or merged into this file. However, if you prefer, # you could uncomment the following to ignore the entire vscode folder # .vscode/ @@ -207,4 +207,4 @@ marimo/_lsp/ __marimo__/ # Pycharm files -.idea \ No newline at end of file +.idea diff --git a/README.md b/README.md index d980934..a7cc10a 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# library-python \ No newline at end of file +# library-python diff --git a/src/scadable/__init__.py b/src/scadable/__init__.py index 8e23576..ad35e5a 100644 --- a/src/scadable/__init__.py +++ b/src/scadable/__init__.py @@ -1 +1 @@ -print("Hello World") \ No newline at end of file +print("Hello World") diff --git a/tests/test_import.py b/tests/test_import.py index 150d14e..5b8609e 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -1,2 +1,2 @@ def test_module_import(): - import src.scadable + pass From aaaf8fce4ba276acd91018d5228e7e34ee427e02 Mon Sep 17 00:00:00 2001 From: Christopher Li <.@.> Date: Mon, 15 Sep 2025 20:57:17 -0400 Subject: [PATCH 4/6] test: add import test case --- tests/test_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_import.py b/tests/test_import.py index 5b8609e..3c50747 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -1,2 +1,2 @@ def test_module_import(): - pass + import src.scadable # noqa From 87cd67667ef29de71a656f78f1e8e2a789cd6d98 Mon Sep 17 00:00:00 2001 From: Christopher Li <.@.> Date: Mon, 15 Sep 2025 21:13:43 -0400 Subject: [PATCH 5/6] chore: update classifiers for pyproject --- pyproject.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8fe3fd5..03bcd51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,14 @@ description = "A Python library for scalable and modular software development." readme = "README.md" requires-python = ">=3.9" classifiers = [ - "Programming Language :: Python :: 3", + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', "Operating System :: OS Independent", ] license = "Apache-2.0" From 750dd63eb71af63423b3d4677d2e10b89dcfd454 Mon Sep 17 00:00:00 2001 From: Christopher Li <.@.> Date: Mon, 15 Sep 2025 22:14:26 -0400 Subject: [PATCH 6/6] docs: update readme and contributing docs --- CONTRIBUTING.md | 27 +++++++++++++++++++++++++++ README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..771983f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contribution Guidelines + +Please refer to the [Organization Docs](https://github.com/scadable/.github/blob/main/CONTRIBUTING.md) on how to +contribute to any project at Scadable. + +## Codestyle + +This project uses [ruff](https://github.com/astral-sh/ruff) to enforce style requirements. This is already configured in +a tool called [pre-commit](https://pre-commit.com/). + +To validate your PR, you can use the [installation guide](https://pre-commit.com/#install) to setup pre-commit hooks. + +To setup git pre-commit hooks, run: + +```commandline +pre-commit install +``` + +To run codestyle validations without install hooks, run: + +```commandline +pre-commit run --all-files +``` + +## Releases + +To push a new version of this package to PyPi, create a Release on github to run the deployment workflow. diff --git a/README.md b/README.md index a7cc10a..bddf3ea 100644 --- a/README.md +++ b/README.md @@ -1 +1,48 @@ -# library-python +# Scadable + +[![PyPi](https://img.shields.io/pypi/v/scadable)](https://pypi.org/project/scadable/) +[![Downloads](https://static.pepy.tech/badge/scadable/month)](https://pepy.tech/project/scadable) +[![Supported Versions](https://img.shields.io/pypi/pyversions/scadable.svg)](https://pypi.org/project/scadable) +[![GitHub issues](https://img.shields.io/badge/issue_tracking-github-blue.svg)](https://github.com/scadable/library-python/issues) +[![GitHub actions status](https://github.com/scadable/library-python/actions/workflows/test-project.yml/badge.svg)](https://github.com/scadable/library-python/actions/workflows/test-project.yml) + +**Scadable** is the first fully container‑native SCADA platform—built on Kubernetes & NATS and delivered with Python + +React SDKs. +Forget rigid vendor UIs: craft your own dashboards, deploy in any cloud, and scale to millions of tags in minutes. + +## Getting Started + +Assuming that you have a supported version of Python installed, you can first set up your environment with: + +```bash +python -m venv .venv +... +. .venv/bin/activate +``` + +or + +```commandline +python -m venv .venv +... +".venv/Scripts/activate" +``` + +Then, you can install Scadable from PyPI with: + +```commandline +python -m pip install scadable +``` + +## Running Tests + +You can run tests in your environment by running the `pytest` command directly: + +```commandline +pytest tests +``` + +## Contributing + +Please read through the [CONTRIBUTING](https://github.com/scadable/library-python/blob/main/CONTRIBUTING.md) document +before submitting any issues or pull requests.