-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue/105 improvments fixes #138
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9754f87
fix license
Paul-B98 6c337b7
add devcontainer
Paul-B98 0d7f27b
add vscode settings
Paul-B98 aaae150
fix authors
Paul-B98 ae8c945
clean up gitignore
Paul-B98 ad0f74b
fix devcontainer
Paul-B98 1754007
add tool configs
Paul-B98 6927135
add project config
Paul-B98 b5f65db
move tests
Paul-B98 90466fb
fix tests
Paul-B98 fa8b38c
set version to 3.12
Paul-B98 aae7aeb
update deps
Paul-B98 22fd47d
update dependabot
Paul-B98 b9e80fb
python ci
Paul-B98 6992967
clean up
Paul-B98 aedbe8c
fix tests
Paul-B98 d04d9cc
add script
Paul-B98 398e489
umpdate pyaki
Paul-B98 cbe779c
update pipeline
Paul-B98 c8d9902
update pipeline
Paul-B98 19e7e83
fix mypy
Paul-B98 85ee214
update github actions
Paul-B98 5fd8116
update readme
Paul-B98 1d65f3b
clean up
Paul-B98 ed9eec6
update readme
Paul-B98 71678c4
fix install from source in readme
Paul-B98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mcr.microsoft.com/devcontainers/python:3.12 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Install Python Deps | ||
RUN pip install --upgrade pip pre-commit poetry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "pyAKI", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "pyaki", | ||
"workspaceFolder": "/workspaces", | ||
"remoteUser": "vscode", | ||
"postCreateCommand": "bash .devcontainer/scripts/post-create.sh", | ||
"postStartCommand": "bash .devcontainer/scripts/post-start.sh", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.mypy-type-checker", | ||
"tamasfe.even-better-toml", | ||
"charliermarsh.ruff", | ||
"ryanluker.vscode-coverage-gutters", | ||
"GitHub.copilot", | ||
"GitHub.copilot-chat", | ||
"ms-vsliveshare.vsliveshare", | ||
"GitHub.vscode-pull-request-github", | ||
"github.vscode-github-actions", | ||
"ms-toolsai.jupyter" | ||
], | ||
"settings": { | ||
"[python]": { | ||
"editor.defaultFormatter": "charliermarsh.ruff", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.organizeImports": true | ||
}, | ||
"files.eol": "\n" | ||
}, | ||
"mypy-type-checker.importStrategy": "fromEnvironment", | ||
"mypy-type-checker.args": [ | ||
"--config-file=${workspaceFolder}/pyproject.toml" | ||
], | ||
"python.analysis.typeCheckingMode": "basic", | ||
"coverage-gutters.coverageBaseDir": "/workspaces/pyAKI", | ||
"coverage-gutters.coverageFileNames": [ | ||
"coverage.xml" | ||
] | ||
} | ||
} | ||
}, | ||
"forwardPorts": [], | ||
"initializeCommand": "bash .devcontainer/scripts/initialize.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3.8' | ||
|
||
services: | ||
pyaki: | ||
container_name: pyaki | ||
|
||
init: true | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
environment: | ||
- no_proxy="127.0.0.1,localhost" | ||
- NO_PROXY="127.0.0.1,localhost" | ||
volumes: | ||
- ..:/workspaces:cached | ||
# Overrides default command so things don't shut down after the process ends. | ||
command: sleep infinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker pull mcr.microsoft.com/devcontainers/python:3.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Add bash-completion's | ||
echo "source /usr/share/bash-completion/completions/git" >> ~/.bashrc | ||
|
||
# install deps | ||
pre-commit install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
poetry install --with dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Continuous Delivery (Python) | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
environment: pyaki | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] # Add more Python versions to test here | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache Virtual Environment | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.venv | ||
~/.cache/pip | ||
~/.cache/pypoetry | ||
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --with dev | ||
|
||
- name: Build and publish Package | ||
run: | | ||
poetry version ${{ github.ref_name }} | ||
poetry publish --skip-existing --build | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Continuous Integration (Python) | ||
on: | ||
push: | ||
branches: [ main, develop ] | ||
pull_request: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
build: | ||
environment: pyaki | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] # Add more Python versions to test here | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache Virtual Environment | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.venv | ||
~/.cache/pip | ||
~/.cache/pypoetry | ||
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --with dev | ||
|
||
- name: Lint with ruff | ||
run: poetry run ruff check . | ||
- name: Check types with mypy | ||
run: poetry run mypy . | ||
- name: Test with pytest | ||
run: poetry run pytest . | ||
|
||
- name: Coveralls | ||
run: poetry run coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# https://pre-commit.com/ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: fix-byte-order-marker | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: detect-private-key | ||
- id: check-case-conflict | ||
- id: check-toml | ||
- id: check-json | ||
- id: check-yaml | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.2.1 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
exclude: "^tests/.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".hg", | ||
".ipynb_checkpoints", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pyenv", | ||
".pytest_cache", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
".vscode", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"site-packages", | ||
"venv", | ||
] | ||
|
||
line-length = 120 | ||
indent-width = 4 | ||
|
||
# Assume Python 3.12 | ||
target-version = "py312" | ||
|
||
[lint] | ||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. | ||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or | ||
# McCabe complexity (`C901`) by default. | ||
select = ["E4", "E7", "E9", "F"] | ||
ignore = [] | ||
|
||
# Allow fix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["ALL"] | ||
unfixable = [] | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
[format] | ||
# Like Black, use double quotes for strings. | ||
quote-style = "double" | ||
|
||
# Like Black, indent with spaces, rather than tabs. | ||
indent-style = "space" | ||
|
||
# Like Black, respect magic trailing commas. | ||
skip-magic-trailing-comma = false | ||
|
||
# Like Black, automatically detect the appropriate line ending. | ||
line-ending = "auto" | ||
|
||
# Enable auto-formatting of code examples in docstrings. Markdown, | ||
# reStructuredText code/literal blocks and doctests are all supported. | ||
# | ||
# This is currently disabled by default, but it is planned for this | ||
# to be opt-out in the future. | ||
docstring-code-format = false | ||
|
||
# Set the line length limit used when formatting code snippets in | ||
# docstrings. | ||
# | ||
# This only has an effect when the `docstring-code-format` setting is | ||
# enabled. | ||
docstring-code-line-length = "dynamic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "run pre-commit", | ||
"type": "shell", | ||
"command": "pre-commit run --all-files", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "update pre-commit", | ||
"type": "shell", | ||
"command": "pre-commit autoupdate", | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
Christian Porschen <[email protected]> | ||
Jan Ernsting <[email protected]> | ||
Paul <[email protected]> | ||
Paul-B98 <[email protected]> | ||
aegis301 <[email protected]> | ||
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to add your full name here?