Skip to content

Latest commit

 

History

History
99 lines (80 loc) · 3.57 KB

File metadata and controls

99 lines (80 loc) · 3.57 KB

Contributing

This section assumes you've completed the Requirements section on the front page.

Development Requirements

  • macOS

    • Install HomeBrew Package Manager
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • Install required packages with HomeBrew
      brew install make
  • Windows

    • Install Chocolatey Package Manager

    • Install required packages with Choco

      IMPORTANT: Open a PowerShell window with elevated permissions (As Administrator)

      choco install -y make

From now on, we'll use make commands to develop and build this Python package locally.

  1. Fork this repository on GitHub

  2. Git clone your forked repository

  3. Prepare .VENV directory - This step also installs the latest version of pip and wheel

    make venv-prepare
  4. IMPORTANT: The Makefile activates .VENV for any venv- target.

  5. Install this package's development requirements.txt in .VENV

    make venv-install
  6. Install this package in edit mode

    IMPORTANT: For any change in ./src/audacity_scripting/cli/, it's best to re-run this command to update the CLI commands; see Click Framework.

    make venv-install-edit

You can now start the development process!

Development Process

  1. Checkout to a new branch feature/my-awesome-feature
  2. (Optional) Add a new Python package and update ./requirements.txt accordingly
    make venv-install PACKAGE_NAME=click==8.1.7
    make venv-requirements-update
  3. Add tests on your feature in ./tests; all tests are based on the Python's unittest framework
  4. Run tests - This wrapper command kills existing Audacity instances, cleans up test outputs, starts Audacity, and then starts the tests.
    make wrapper-run-test
  5. Commit changes to your cloned fork
    git commit -am "added an awesome feature"
  6. Create a GitHub Pull Request from your fork to the source repository.

Syncing with the "source" code

  1. Add this repository as a "source" remote

    cd audacity-scripting
    git remote add source https://github.com/unfor19/audacity-scripting.git
  2. Check git remotes

    git remote -v

    Assuming you are willywonka, here's the desired output:

    origin https://github.com/willywonka/audacity-scripting.git (fetch)
    origin https://github.com/willywonka/audacity-scripting.git (push)
    source https://github.com/unfor19/audacity-scripting.git (fetch)
    source https://github.com/unfor19/audacity-scripting.git (push)
    
  3. To sync from source (this project's source repo) to your current branch, execute this command:

    git pull source main

NOTE: Following that, you might need to handle some merge conflicts, but that's it; you're up-to-date with the latest version of the source code.