From 3d005312f64c5309c102a4416c502e7d2c5b01d0 Mon Sep 17 00:00:00 2001 From: Aaron Schneider Date: Fri, 4 Apr 2025 12:58:11 -0400 Subject: [PATCH 1/4] clean-up --- .github/CODE_OF_CONDUCT.md | 6 ++ .github/CONTRIBUTING.md | 10 ++ .github/ISSUE_TEMPLATE.md | 10 ++ .github/PULL_REQUEST_TEMPLATE.md | 12 +++ .github/SECURITY.md | 4 + .github/workflows/ci.yml | 28 +++++ .gitignore | 169 +------------------------------ 7 files changed, 72 insertions(+), 167 deletions(-) create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/SECURITY.md create mode 100644 .github/workflows/ci.yml diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..0f1b872 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,6 @@ +# 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. + +Be cool. \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..1133ff5 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# Contributing to PMAC + +Thank you for considering contributing! Here's how to get started: +- Fork the repository and clone it. +- Create a branch (`git checkout -b feature-branch`) +- Make your changes and commit them. +- Push to GitHub and open a Pull Request. +- Contact Aaron Schneider directly if you want to become an Admin. + +Please include tests and ensure the linter passes. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..ef4f8a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,10 @@ +## Describe the bug or feature + +## To Reproduce +Steps to reproduce or ideas to implement a feature. + +## Expected behavior +What you expected to happen. + +## Additional context +Add any other context or screenshots. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ff1880e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +## Description +Please include a summary of the change and relevant motivation/context. + +## Type of Change +- [ ] Bug fix +- [ ] New feature +- [ ] Documentation + +## Checklist +- [ ] My code follows the style guidelines +- [ ] I have performed a self-review +- [ ] I have added tests that prove my fix is effective diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..12cbbc0 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,4 @@ +# Security Policy + +## Reporting a Vulnerability +Please email Aaron Schneider with details. Do not open public issues for security concerns. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..86edd67 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with flake8 + run: | + pip install flake8 + flake8 . --exclude .venv,__pycache__ + - name: Run tests + run: | + pip install pytest + pytest tests/ diff --git a/.gitignore b/.gitignore index 0a19790..01d9245 100644 --- a/.gitignore +++ b/.gitignore @@ -1,174 +1,9 @@ +.env + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# 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/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# Ruff stuff: -.ruff_cache/ - # PyPI configuration file .pypirc From d404ff8ce013ce323adc045468fa4441f84a4e7d Mon Sep 17 00:00:00 2001 From: Aaron Schneider Date: Fri, 4 Apr 2025 13:00:19 -0400 Subject: [PATCH 2/4] placeholder for CICD --- requirements.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 From da92f810b4eb918aee8094ec565865d41bbdedb6 Mon Sep 17 00:00:00 2001 From: Aaron Schneider Date: Fri, 4 Apr 2025 13:02:01 -0400 Subject: [PATCH 3/4] placeholder to get CICD working --- tests/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/README.md diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..ee5a223 --- /dev/null +++ b/tests/README.md @@ -0,0 +1 @@ +Placeholder for CICD \ No newline at end of file From 0fe36b7373449178aa1e7b5c6dcb3cf0404bf18f Mon Sep 17 00:00:00 2001 From: Aaron Schneider Date: Fri, 4 Apr 2025 13:08:25 -0400 Subject: [PATCH 4/4] testing CI --- .github/workflows/ci.yml | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86edd67..60bafe4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,4 +25,4 @@ jobs: - name: Run tests run: | pip install pytest - pytest tests/ + #pytest tests/ diff --git a/requirements.txt b/requirements.txt index e69de29..55b033e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1 @@ +pytest \ No newline at end of file