From be88c49baecce7f19ee2f458f7d07a3741fd492d Mon Sep 17 00:00:00 2001 From: Anastasia Mayer Date: Sun, 21 Jan 2024 04:46:10 -0600 Subject: [PATCH 1/4] Fix Samedec bug When this was written, SAMEDEC development was slow and on 0.2.3, and we didn't estimate a 3.0 launch then. Changed the string to check for 0.1.X, instead of 0.2.X, meaning that anything greater than V1 will work. Needs compatibility checking with V3. --- asmara.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/asmara.py b/asmara.py index 7390981..f5d8f8b 100644 --- a/asmara.py +++ b/asmara.py @@ -243,21 +243,13 @@ def __decoder__(self): sev=severity.trace, ) try: - if ( - "samedec 0.2." + if not ( + "samedec 0.1." in Popen(["samedec", "-V"], stdout=PIPE) .communicate()[0] .decode("UTF-8") .strip() ): - self.__decode__ = Popen( - ["samedec", "-r", "24000"], - stdout=PIPE, - stdin=PIPE, - stderr=PIPE, - bufsize=1, - ) - else: utilities.autoPrint( text=f"SAMEDEC is not version 0.2 or higher! Recommended version is 0.2.3.", classType="DECODER", @@ -265,6 +257,14 @@ def __decoder__(self): ) AS_MAN.killAsmara() exit(1) + else: + self.__decode__ = Popen( + ["samedec", "-r", "24000"], + stdout=PIPE, + stdin=PIPE, + stderr=PIPE, + bufsize=1, + ) except FileNotFoundError: utilities.autoPrint( text=f"Samedec is not installed on the computer. Please install SAMEDEC 0.2.3 or higher.", From cf61fb84148863f52798c005ae83990e6eb9381a Mon Sep 17 00:00:00 2001 From: Anastasia Mayer Date: Thu, 25 Jan 2024 13:23:12 -0600 Subject: [PATCH 2/4] Create Runner (#6) * Create Runner This is Github runner that will be used for testing when ready. * Update and rename python-app.yml to main_runner.yml Added Flake8 as a dependency for the runner Renamed runner * Fix Flake8 execution Let's get it right this time, hopefully. * Flake8 is being annoying. Come on man, just work please. --- .github/workflows/main_runner.yml | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/main_runner.yml diff --git a/.github/workflows/main_runner.yml b/.github/workflows/main_runner.yml new file mode 100644 index 0000000..ac6bcb6 --- /dev/null +++ b/.github/workflows/main_runner.yml @@ -0,0 +1,62 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install Dependancies + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: python3-pip python3-pyaudio ffmpeg curl git + version: 1.0 + - name: Install Python Requirements + run: | + if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi + python3 -m pip install flake8 + - name: Install SAMEDEC Decoder + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -q -y --profile default + git clone https://github.com/cbs228/sameold.git + cd sameold + cargo install --path crates/samedec + source $HOME/.cargo/env + cd .. + rm -rf sameold + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + python3 -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + python3 -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + # TODO: Wrtie Pytest files + # - name: Test with pytest + # run: | + # pytest + - name: Check ASMARA Version + run: python3 asmara.py -V + # TODO: Make a new config exit after startup due to no inputs/outputs + # - name: Run ASMARA + # run: python3 asmara.py -d + - name: 'Cleanup build folder' + run: | + ls -la ./ + rm -rf ./* || true + rm -rf ./.??* || true + ls -la ./ From 44969c79c6e47e8ff7b2cdec1e9a4ad47e95b298 Mon Sep 17 00:00:00 2001 From: Anastasia Mayer Date: Thu, 25 Jan 2024 13:26:20 -0600 Subject: [PATCH 3/4] Create CODEOWNERS Actually allow me to do checks properly --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..c6cc0f7 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @A-c0rN From 57a1add921a50984384bb91d83f26f330ef8b7c0 Mon Sep 17 00:00:00 2001 From: Reggie Torres <156597761+reggietorres@users.noreply.github.com> Date: Sun, 28 Jan 2024 01:57:05 -0500 Subject: [PATCH 4/4] Add Contribution Tutorial (#12) * Add Contribution Tutorial * Update CONTRIBUTING.md --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..75bf367 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contributing Guidelines + +Thank you for considering contributing to our project! We appreciate your efforts to improve our codebase. Please follow these guidelines to ensure smooth collaboration and efficient handling of pull requests. + +## Pull Request Process + +1. **Fork the Repository**: If you haven't already, fork the repository to your GitHub account. + +2. **Create a Branch**: Create a new branch for your feature or bug fix. Use a descriptive name that reflects the purpose of your changes. + +3. **Make Changes**: Make your changes to the codebase. Ensure that your modifications adhere to the project's coding standards and guidelines. + +4. **Test Your Changes**: Before submitting a pull request, test your changes locally to ensure they function as expected. If applicable, write tests to cover your code changes. + +5. **Commit Your Changes**: Commit your changes with clear and concise commit messages. Include details about what you have changed and why, Include in-depth documentation on changes both in the commits and in the pull requests, including any relevant context or reasoning. + + ```bash + git add . + git commit -m "Descriptive commit message" + ``` +6. **Push Your Changes**: Once you are satisfied with your changes, push your branch to your forked repository. + ```bash + git push origin + ``` +7. **Submit a Pull Request**: Go to the original repository (upstream) and create a pull request from your forked branch. Include in-depth documentation on changes both in the commits and in the pull requests, including any relevant context or reasoning. +8. **Review Process**: After submitting your pull request, a project maintainer will review your changes. Be responsive to any feedback or requests for revisions. +9. **Address Feedback**: If requested changes are needed, make the necessary updates to your branch and push the changes. Your pull request will be re-evaluated after the updates. +10. Merge: Once your pull request is approved and all checks pass, it will be merged into the main branch, Congratulations on your contribution!