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: 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/.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/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 d980934..bddf3ea 100644 --- a/README.md +++ b/README.md @@ -1 +1,48 @@ -# library-python \ No newline at end of file +# 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. diff --git a/pyproject.toml b/pyproject.toml index c0c233e..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" @@ -24,10 +31,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" 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..3c50747 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -1,2 +1,2 @@ def test_module_import(): - import src.scadable + import src.scadable # noqa