diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 000000000..0236f4a17 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,33 @@ +# 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: Python application + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + pip install pytest-dependency + pip install pytest-mock + pip install black==22.3.0 + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Check formatting with black + run: | + black --check . diff --git a/README.md b/README.md index e024d4e37..608307b77 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ For testing, make sure to have installed: NOTE: Self-contained unit/functional tests coming soon, will live in `tests` folder +For formatting: + - Currently using black v22.3.0 for format checking + - To install, run `pip install black==22.3.0` + - To check file formatting, in top-level dir run `black --check .` + - To auto-reformat all files, remove the `--check` flag + - To reformat an individual file, run `black ` + To build the python package: - - If poetry is not installed: `pip3 install poetry` + - If poetry is not installed: `pip install poetry` - `poetry build` diff --git a/docs/codeflare_sdk/cluster/cluster.html b/docs/cluster/cluster.html similarity index 100% rename from docs/codeflare_sdk/cluster/cluster.html rename to docs/cluster/cluster.html diff --git a/docs/codeflare_sdk/cluster/config.html b/docs/cluster/config.html similarity index 100% rename from docs/codeflare_sdk/cluster/config.html rename to docs/cluster/config.html diff --git a/docs/codeflare_sdk/cluster/index.html b/docs/cluster/index.html similarity index 100% rename from docs/codeflare_sdk/cluster/index.html rename to docs/cluster/index.html diff --git a/docs/codeflare_sdk/cluster/model.html b/docs/cluster/model.html similarity index 100% rename from docs/codeflare_sdk/cluster/model.html rename to docs/cluster/model.html diff --git a/docs/codeflare_sdk/index.html b/docs/index.html similarity index 100% rename from docs/codeflare_sdk/index.html rename to docs/index.html diff --git a/docs/codeflare_sdk/utils/generate_yaml.html b/docs/utils/generate_yaml.html similarity index 100% rename from docs/codeflare_sdk/utils/generate_yaml.html rename to docs/utils/generate_yaml.html diff --git a/docs/codeflare_sdk/utils/index.html b/docs/utils/index.html similarity index 100% rename from docs/codeflare_sdk/utils/index.html rename to docs/utils/index.html diff --git a/docs/codeflare_sdk/utils/pretty_print.html b/docs/utils/pretty_print.html similarity index 100% rename from docs/codeflare_sdk/utils/pretty_print.html rename to docs/utils/pretty_print.html