-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Initial version #1
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
Merged
Changes from all commits
Commits
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 hidden or 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,192 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - '*.*.*' | ||
|
|
||
| pull_request: | ||
| branches: | ||
| - main | ||
| - '*.*.*' | ||
|
|
||
| release: | ||
| types: [ published ] | ||
|
|
||
| jobs: | ||
|
|
||
| autoflake: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@master | ||
| with: | ||
| python-version: '3.14' | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
|
|
||
| - name: Install packages | ||
| run: poetry install --with=dev --no-root | ||
|
|
||
| - name: Autoflake | ||
| run: | | ||
| poetry run autoflake kasm/ -r --check-diff | ||
|
|
||
| black: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
|
qcoumes marked this conversation as resolved.
|
||
| uses: actions/setup-python@master | ||
| with: | ||
| python-version: '3.14' | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
|
|
||
| - name: Install packages | ||
| run: poetry install --with=dev --no-root | ||
|
|
||
| - name: Black | ||
| run: | | ||
| poetry run black --check -l 120 kasm/ | ||
|
|
||
| isort: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
qcoumes marked this conversation as resolved.
|
||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@master | ||
| with: | ||
| python-version: '3.14' | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
|
|
||
| - name: Install packages | ||
| run: poetry install --with=dev --no-root | ||
|
|
||
| - name: Isort | ||
| run: | | ||
| poetry run isort --check kasm/ | ||
|
|
||
| pycodestyle: | ||
|
qcoumes marked this conversation as resolved.
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@master | ||
| with: | ||
| python-version: '3.14' | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
|
|
||
| - name: Install packages | ||
| run: poetry install --with=dev --no-root | ||
|
|
||
| - name: Pycodestyle | ||
| run: | | ||
| poetry run pycodestyle kasm/ | ||
|
|
||
| pydocstyle: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@master | ||
| with: | ||
| python-version: '3.14' | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
|
|
||
| - name: Install packages | ||
| run: poetry install --with=dev --no-root | ||
|
|
||
| - name: Pydocstyle | ||
| run: | | ||
| poetry run pydocstyle --count kasm/ | ||
|
|
||
| mypy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@master | ||
| with: | ||
| python-version: '3.14' | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
|
qcoumes marked this conversation as resolved.
|
||
|
|
||
| - name: Install packages | ||
| run: poetry install --with=dev --no-root | ||
|
|
||
| - name: Mypy | ||
| run: | | ||
| poetry run mypy kasm --disallow-untyped-def | ||
|
|
||
| bandit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@master | ||
| with: | ||
| python-version: '3.14' | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
|
|
||
| - name: Install packages | ||
| run: poetry install --with=dev --no-root | ||
|
|
||
| - name: Bandit | ||
| run: | | ||
| poetry run bandit --ini=setup.cfg -ll 2> /dev/null | ||
|
|
||
| # publish: | ||
| # needs: [ autoflake, black, isort, pycodestyle, pydocstyle, mypy, bandit ] | ||
| # if: github.event_name == 'release' && github.event.action == 'published' | ||
| # runs-on: ubuntu-latest | ||
| # continue-on-error: true | ||
| # environment: | ||
| # name: pypi | ||
| # url: https://pypi.org/p/pykasm | ||
| # permissions: | ||
| # id-token: write | ||
| # | ||
| # steps: | ||
| # - uses: actions/checkout@master | ||
| # | ||
| # - name: Set up Python 3.13 | ||
| # uses: actions/setup-python@v4 | ||
| # with: | ||
| # python-version: '3.14' | ||
| # | ||
| # - name: Install Poetry | ||
| # run: | | ||
| # curl -sSL https://install.python-poetry.org | python3 - | ||
| # echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
| # | ||
| # - name: Build the package | ||
| # run: poetry build | ||
| # | ||
| # - name: Verify metadata | ||
| # run: | | ||
| # python -m pip install twine | ||
| # python -m twine check dist/* | ||
| # | ||
| # - name: Publish distribution to PyPI | ||
| # uses: pypa/gh-action-pypi-publish@release/v1 | ||
This file contains hidden or 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 hidden or 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,99 @@ | ||
| # Contributing | ||
|
|
||
| Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. | ||
|
|
||
| You can contribute in many ways: | ||
|
|
||
| ## Types of Contributions | ||
|
|
||
| ### Report Bugs | ||
|
|
||
| Report bugs at https://github.com/Codoc-os/pykasm. | ||
|
|
||
| If you are reporting a bug, please include: | ||
|
|
||
| * Your operating system name and version. | ||
| * Any details about your local setup that might be helpful in troubleshooting. | ||
| * Detailed steps to reproduce the bug. | ||
|
|
||
| ### Fix Bugs | ||
|
|
||
| Look through the GitHub issues for bugs. Anything tagged with "bug" | ||
| is open to whoever wants to implement it. | ||
|
|
||
| ### Implement Features | ||
|
|
||
| Look through the GitHub issues for features. Anything tagged with "feature" | ||
| is open to whoever wants to implement it. | ||
|
|
||
| ### Write Documentation | ||
|
|
||
| PyKasm could always use more documentation, whether as part of the official PyKasm docs, | ||
| in docstrings, or even on the web in blog posts, articles, and such. | ||
|
|
||
| ### Submit Feedback | ||
|
|
||
| The best way to send feedback is to file an issue at https://github.com/Codoc-os/pykasm/issues. | ||
|
|
||
| If you are proposing a feature: | ||
|
|
||
| * Explain in detail how it would work. | ||
| * Keep the scope as narrow as possible, to make it easier to implement. | ||
| * Remember that this is a volunteer-driven project, and that contributions are welcome :) | ||
|
|
||
| --- | ||
|
|
||
| ## Setting up local environment | ||
|
|
||
| Ready to contribute? Here's how to set up `pykasm` for local development. | ||
|
|
||
| 1. Fork the `pykasm` repo on GitHub. | ||
|
|
||
| 2. Clone your fork locally: | ||
|
|
||
| * `git clone git@github.com:<your_name_here>/pykasm.git` | ||
|
|
||
| 3. Install your local copy into a virtualenv. | ||
|
|
||
| ```shell | ||
| python3 -m venv venv | ||
| source venv/bin/activate | ||
| pip3 install poetry | ||
| poetry install --with=dev --no-root | ||
| ``` | ||
|
|
||
| 4. Create a branch for local development: | ||
|
|
||
| * `git checkout -b name-of-your-bugfix-or-feature` | ||
|
|
||
| Now you can make your changes locally. | ||
|
|
||
| ## Submitting your changes | ||
|
|
||
| 1. Ensure your code is correctly formatted and documented: | ||
|
|
||
| ```sh | ||
| poetry run ./bin/lint.sh | ||
| ``` | ||
|
|
||
| 2. Commit your changes and push your branch to GitHub: | ||
|
|
||
| ```sh | ||
| git add . | ||
| git commit -m "Your detailed description of your changes." | ||
| git push origin name-of-your-bugfix-or-feature | ||
| ``` | ||
|
|
||
| 3. Submit a pull request through the GitHub website. | ||
|
|
||
| ## Pull Request Guidelines | ||
|
|
||
| Before you submit a pull request, check that it meets these guidelines: | ||
|
|
||
| 1. The pull request should include tests | ||
|
|
||
| 2. If the pull request adds functionality, the documentation should be updated. | ||
|
|
||
| 3. The pull request should pass all checks and tests. Check | ||
| https://github.com/qcoumes/pykasm/actions | ||
| and make sure that the tests pass for all supported Python versions. |
This file contains hidden or 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,11 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Reset | ||
| Color_Off=$'\e[0m' # Text Reset | ||
|
|
||
| # Regular Colors | ||
| Red=$'\e[0;31m' # Red | ||
| Green=$'\e[0;32m' # Green | ||
| Yellow=$'\e[0;33m' # Yellow | ||
| Purple=$'\e[0;35m' # Purple | ||
| Cyan=$'\e[0;36m' # Cyan |
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.
Uh oh!
There was an error while loading. Please reload this page.