diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..86cb462 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,130 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +TODO@openscilab.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..76ad605 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contribution + +Changes and improvements are more than welcome! ❤️ Feel free to fork and open a pull request. + + +Please consider the following : + + +1. Fork it! +2. Create your feature branch (under `dev` branch) +3. Add your functions/methods to proper files +4. Add standard `docstring` to your functions/methods +5. Add tests for your functions/methods (`doctest` testcases in `test` folder) +6. Pass all CI tests +7. Update `CHANGELOG.md` + - Describe changes under `[Unreleased]` section +8. Submit a pull request into `dev` (please complete the pull request template) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..cf6ff87 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,97 @@ +name: Bug Report +description: File a bug report +title: "[Bug]: " +body: + - type: markdown + attributes: + value: | + Thanks for your time to fill out this bug report! + - type: input + id: contact + attributes: + label: Contact details + description: How can we get in touch with you if we need more info? + placeholder: ex. email@example.com + validations: + required: false + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Provide a clear and concise description of what the bug is. + placeholder: > + Tell us a description of the bug. + validations: + required: true + - type: textarea + id: step-to-reproduce + attributes: + label: Steps to reproduce + description: Provide details of how to reproduce the bug. + placeholder: > + ex. 1. Go to '...' + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: What did you expect to happen? + placeholder: > + ex. I expected '...' to happen + validations: + required: true + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: What did actually happen? + placeholder: > + ex. Instead '...' happened + validations: + required: true + - type: dropdown + id: operating-system + attributes: + label: Operating system + description: Which operating system are you using? + options: + - Windows + - macOS + - Linux + default: 0 + validations: + required: true + - type: dropdown + id: python-version + attributes: + label: Python version + description: Which version of Python are you using? + options: + - Python 3.13 + - Python 3.12 + - Python 3.11 + - Python 3.10 + - Python 3.9 + - Python 3.8 + - Python 3.7 + - Python 3.6 + default: 1 + validations: + required: true + - type: dropdown + id: TODO-version + attributes: + label: TODO version + description: Which version of TODO are you using? + options: + - TODO 0.1 + default: 0 + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3f0d75b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Discord + url: https://discord.gg/TODO + about: Ask questions and discuss with other TODO community members + - name: Website + url: https://openscilab.com/ + about: Check out our website for more information diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..139114c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,36 @@ +name: Feature Request +description: Suggest a feature for this project +title: "[Feature]: " +body: + - type: textarea + id: description + attributes: + label: Describe the feature you want to add + placeholder: > + I'd like to be able to [...] + validations: + required: true + - type: textarea + id: possible-solution + attributes: + label: Describe your proposed solution + placeholder: > + I think this could be done by [...] + validations: + required: false + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered, if relevant + placeholder: > + Another way to do this would be [...] + validations: + required: false + - type: textarea + id: additional-context + attributes: + label: Additional context + placeholder: > + Add any other context or screenshots about the feature request here. + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ded12d6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,6 @@ +#### Reference Issues/PRs + +#### What does this implement/fix? Explain your changes. + +#### Any other comments? + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5952903 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: weekly + time: "01:30" + open-pull-requests-limit: 10 + target-branch: dev + assignees: + - "TODO" diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml new file mode 100644 index 0000000..2a3bd29 --- /dev/null +++ b/.github/workflows/publish_pypi.yml @@ -0,0 +1,34 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/*.tar.gz + twine upload dist/*.whl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..06efcd3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,58 @@ +name: CI + +on: + push: + branches: + - main + - dev + + pull_request: + branches: + - main + - dev + +env: + TEST_PYTHON_VERSION: 3.9 + TEST_OS: 'ubuntu-22.04' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, windows-2022, macos-15-intel] + python-version: [3.7, 3.8, 3.9, 3.10.5, 3.11.0, 3.12.0, 3.13.0] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Installation + run: | + python -m pip install --upgrade pip + pip install . + - name: Test requirements installation + run: | + pip install -r dev-requirements.txt + - name: Test with pytest + run: | + python -m pytest . --cov=TODO --cov-report=term + #### TODO: uncomment below after adding CODECOV_TOKEN to repository #### + # - name: Upload coverage to Codecov + # uses: codecov/codecov-action@v4 + # with: + # fail_ci_if_error: true + # token: ${{ secrets.CODECOV_TOKEN }} + if: matrix.python-version == env.TEST_PYTHON_VERSION && matrix.os == env.TEST_OS + - name: Vulture, Bandit and Pydocstyle tests + run: | + python -m vulture TODO/ setup.py --min-confidence 80 --sort-by-size + python -m bandit -r TODO + python -m pydocstyle TODO + - name: Version check + run: | + python otherfiles/version_check.py + if: matrix.python-version == env.TEST_PYTHON_VERSION diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b811a9e --- /dev/null +++ b/.gitignore @@ -0,0 +1,100 @@ +# Created by .ignore support plugin (hsz.mobi) +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +.venv/ +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject +### Example user template template +### Example user template + +# IntelliJ project files +.idea +*.iml +out +gen diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..82e334e --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,12 @@ +# Core Developers +---------- +- Sadra Sabouri - Open Science Laboratory ([Github](https://github.com/sadrasabouri)) ** +- Sepand Haghighi - Open Science Laboratory ([Github](https://github.com/sepandhaghighi)) ** + + +** **Maintainer** + +# Other Contributors +---------- + + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a85479e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] +### Added +- `TIKTOKEN_R50K.LINEAR_ALL` model +- `TIKTOKEN_R50K.LINEAR_ENGLISH` model +### Changed +- `README.md` updated +## [0.1] - 2025-08-30 +### Added +- `RULE_BASED.UNIVERSAL` model +- `RULE_BASED.GPT_4` model +- `RULE_BASED.GPT_3_5` model + + +[Unreleased]: https://github.com/openscilab/TODO/compare/v0.1...dev +[0.1]: https://github.com/openscilab/TODO/compare/8385d46...v0.1 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a05d9c4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 OpenSciLab + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b005e1d --- /dev/null +++ b/README.md @@ -0,0 +1,92 @@ +
+ +---------- + + +## Overview ++TODO +
+ +| PyPI Counter | +
+
+ |
+
| Github Stars | +
+
+ |
+
| Branch | +main | +dev | +
| CI | +
+ |
+
+ |
+
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..d32818b
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,14 @@
+# Security policy
+
+## Supported versions
+
+| Version | Supported |
+| ------------- | ------------------ |
+| 0.1 | :white_check_mark: |
+| < 0.1 | :x: |
+
+## Reporting a vulnerability
+
+Please report security vulnerabilities by email to [TODO@openscilab.com](mailto:TODO@openscilab.com "TODO@openscilab.com").
+
+If the security vulnerability is accepted, a dedicated bugfix release will be issued as soon as possible (depending on the complexity of the fix).
\ No newline at end of file
diff --git a/TODO/__init__.py b/TODO/__init__.py
new file mode 100644
index 0000000..617c184
--- /dev/null
+++ b/TODO/__init__.py
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+"""TODO modules."""
+
+from .params import TODO_VERSION
diff --git a/TODO/functions.py b/TODO/functions.py
new file mode 100644
index 0000000..439314a
--- /dev/null
+++ b/TODO/functions.py
@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+"""TODO functions."""
diff --git a/TODO/params.py b/TODO/params.py
new file mode 100644
index 0000000..ef49802
--- /dev/null
+++ b/TODO/params.py
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+"""TODO parameters and constants."""
+
+TODO_VERSION = "0.1"
diff --git a/autopep8.bat b/autopep8.bat
new file mode 100644
index 0000000..8389cd9
--- /dev/null
+++ b/autopep8.bat
@@ -0,0 +1,4 @@
+python -m autopep8 TODO --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose --ignore=E721
+python -m autopep8 otherfiles --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose --ignore=E721
+python -m autopep8 tests --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose --ignore=E721
+python -m autopep8 setup.py --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose
diff --git a/autopep8.sh b/autopep8.sh
new file mode 100644
index 0000000..d86c788
--- /dev/null
+++ b/autopep8.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+python -m autopep8 TODO --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose --ignore=E721
+python -m autopep8 otherfiles --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose --ignore=E721
+python -m autopep8 tests --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose --ignore=E721
+python -m autopep8 setup.py --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --max-line-length 120 --verbose
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 0000000..600c260
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,14 @@
+codecov:
+ require_ci_to_pass: yes
+
+coverage:
+ precision: 2
+ round: up
+ range: "70...100"
+ status:
+ patch:
+ default:
+ enabled: no
+ project:
+ default:
+ threshold: 1%
diff --git a/dev-requirements.txt b/dev-requirements.txt
new file mode 100644
index 0000000..e4209e7
--- /dev/null
+++ b/dev-requirements.txt
@@ -0,0 +1,6 @@
+setuptools>=40.8.0
+vulture>=1.0
+bandit>=1.5.1
+pydocstyle>=3.0.0
+pytest>=4.3.1
+pytest-cov>=2.6.1
\ No newline at end of file
diff --git a/otherfiles/RELEASE.md b/otherfiles/RELEASE.md
new file mode 100644
index 0000000..04c01db
--- /dev/null
+++ b/otherfiles/RELEASE.md
@@ -0,0 +1,40 @@
+# TODO Release Instructions
+
+**Last Update: 2025-04-17**
+
+1. Create the `release` branch under `dev`
+2. Update all version tags
+ 1. `setup.py`
+ 2. `README.md`
+ 3. `otherfiles/version_check.py`
+ 4. `otherfiles/meta.yaml`
+ 5. `TODO/params.py`
+3. Update `CHANGELOG.md`
+ 1. Add a new header under `Unreleased` section (Example: `## [0.1] - 2022-08-17`)
+ 2. Add a new compare link to the end of the file (Example: `[0.2]: https://github.com/openscilab/TODO/compare/v0.1...v0.2`)
+ 3. Update `dev` compare link (Example: `[Unreleased]: https://github.com/openscilab/TODO/compare/v0.2...dev`)
+4. Update `.github/ISSUE_TEMPLATE/bug_report.yml`
+ 1. Add new version tag to `TODO version` dropbox options
+5. Create a PR from `release` to `dev`
+ 1. Title: `Version x.x` (Example: `Version 0.1`)
+ 2. Tag all related issues
+ 3. Labels: `release`
+ 4. Set milestone
+ 5. Wait for all CI pass
+ 6. Need review (**2** reviewers)
+ 7. Squash and merge
+ 8. Delete `release` branch
+6. Merge `dev` branch into `main`
+ 1. `git checkout main`
+ 2. `git merge dev`
+ 3. `git push origin main`
+ 4. Wait for all CI pass
+7. Create a new release
+ 1. Target branch: `main`
+ 2. Tag: `vx.x` (Example: `v0.1`)
+ 3. Title: `Version x.x` (Example: `Version 0.1`)
+ 4. Copy changelogs
+ 5. Tag all related issues
+8. Bump!!
+9. Close this version issues
+10. Close milestone
\ No newline at end of file
diff --git a/otherfiles/donation.png b/otherfiles/donation.png
new file mode 100644
index 0000000..c1c2e50
Binary files /dev/null and b/otherfiles/donation.png differ
diff --git a/otherfiles/meta.yaml b/otherfiles/meta.yaml
new file mode 100644
index 0000000..17d6bcc
--- /dev/null
+++ b/otherfiles/meta.yaml
@@ -0,0 +1,30 @@
+{% set name = "TODO" %}
+{% set version = "0.1" %}
+
+package:
+ name: {{ name|lower }}
+ version: {{ version }}
+source:
+ git_url: https://github.com/openscilab/TODO
+ git_rev: v{{ version }}
+build:
+ noarch: python
+ number: 0
+ script: {{ PYTHON }} -m pip install . -vv
+requirements:
+ host:
+ - pip
+ - setuptools
+ - python >=3.7
+ run:
+ - python >=3.7
+about:
+ home: https://github.com/openscilab/TODO
+ license: MIT
+ license_family: MIT
+ summary: TODO
+ description: |
+ TODO
+extra:
+ recipe-maintainers:
+ - TODO
diff --git a/otherfiles/requirements-splitter.py b/otherfiles/requirements-splitter.py
new file mode 100644
index 0000000..4d095bb
--- /dev/null
+++ b/otherfiles/requirements-splitter.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+"""Requirements splitter."""
+
+test_req = ""
+
+with open('dev-requirements.txt', 'r') as f:
+ for line in f:
+ if '==' not in line:
+ test_req += line
+
+with open('test-requirements.txt', 'w') as f:
+ f.write(test_req)
diff --git a/otherfiles/version_check.py b/otherfiles/version_check.py
new file mode 100644
index 0000000..c1b95c1
--- /dev/null
+++ b/otherfiles/version_check.py
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+"""Version-check script."""
+import os
+import sys
+import codecs
+Failed = 0
+TODO_VERSION = "0.1"
+
+
+SETUP_ITEMS = [
+ "version='{0}'",
+ 'https://github.com/openscilab/TODO/tarball/v{0}']
+README_ITEMS = [
+ "[Version {0}](https://github.com/openscilab/TODO/archive/v{0}.zip)",
+ "pip install TODO=={0}"]
+CHANGELOG_ITEMS = [
+ "## [{0}]",
+ "https://github.com/openscilab/TODO/compare/v{0}...dev",
+ "[{0}]:"]
+PARAMS_ITEMS = ['TODO_VERSION = "{0}"']
+META_ITEMS = ['% set version = "{0}" %']
+ISSUE_TEMPLATE_ITEMS = ["- TODO {0}"]
+SECURITY_ITEMS = ["| {0} | :white_check_mark: |", "| < {0} | :x: |"]
+
+FILES = {
+ os.path.join("otherfiles", "meta.yaml"): META_ITEMS,
+ "setup.py": SETUP_ITEMS,
+ "README.md": README_ITEMS,
+ "CHANGELOG.md": CHANGELOG_ITEMS,
+ "SECURITY.md": SECURITY_ITEMS,
+ os.path.join("TODO", "params.py"): PARAMS_ITEMS,
+ os.path.join(".github", "ISSUE_TEMPLATE", "bug_report.yml"): ISSUE_TEMPLATE_ITEMS,
+}
+
+TEST_NUMBER = len(FILES)
+
+
+def print_result(failed: bool = False) -> None:
+ """
+ Print final result.
+
+ :param failed: failed flag
+ """
+ message = "Version tag tests "
+ if not failed:
+ print("\n" + message + "passed!")
+ else:
+ print("\n" + message + "failed!")
+ print("Passed : " + str(TEST_NUMBER - Failed) + "/" + str(TEST_NUMBER))
+
+
+if __name__ == "__main__":
+ for file_name in FILES:
+ try:
+ file_content = codecs.open(
+ file_name, "r", "utf-8", 'ignore').read()
+ for test_item in FILES[file_name]:
+ if file_content.find(test_item.format(TODO_VERSION)) == -1:
+ print("Incorrect version tag in " + file_name)
+ Failed += 1
+ break
+ except Exception as e:
+ Failed += 1
+ print("Error in " + file_name + "\n" + "Message : " + str(e))
+
+ if Failed == 0:
+ print_result(False)
+ sys.exit(0)
+ else:
+ print_result(True)
+ sys.exit(1)
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..304d603
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+"""Setup module."""
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
+
+
+def get_requires() -> list:
+ """Read requirements.txt."""
+ requirements = open("requirements.txt", "r").read()
+ return list(filter(lambda x: x != "", requirements.split()))
+
+
+def read_description() -> str:
+ """Read README.md and CHANGELOG.md."""
+ try:
+ with open("README.md") as r:
+ description = "\n"
+ description += r.read()
+ with open("CHANGELOG.md") as c:
+ description += "\n"
+ description += c.read()
+ return description
+ except Exception:
+ return '''TODO'''
+
+
+setup(
+ name='TODO',
+ packages=[
+ 'TODO', ],
+ version='0.1',
+ description='TODO',
+ long_description=read_description(),
+ long_description_content_type='text/markdown',
+ author='TODO Development Team',
+ author_email='TODO@openscilab.com',
+ url='https://github.com/openscilab/TODO',
+ download_url='https://github.com/openscilab/TODO/tarball/v0.1',
+ keywords="TODO TODO TODO",
+ project_urls={
+ 'Source': 'https://github.com/openscilab/TODO',
+ },
+ install_requires=get_requires(),
+ python_requires='>=3.7',
+ classifiers=[
+ 'Development Status :: 2 - Pre-Alpha',
+ 'Natural Language :: English',
+ 'License :: OSI Approved :: MIT License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ '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',
+ 'Intended Audience :: TODO',
+ 'Intended Audience :: TODO',
+ 'Topic :: TODO',
+ 'Topic :: TODO',
+ ],
+ license='MIT',
+)
diff --git a/tests/test_todo.py b/tests/test_todo.py
new file mode 100644
index 0000000..15e37cf
--- /dev/null
+++ b/tests/test_todo.py
@@ -0,0 +1,6 @@
+"""Main package tests"""
+
+TEST_CASE_NAME = "TODO tests"
+
+def test_todo():
+ pass