Skip to content

Commit

Permalink
update black to 24.1.0 (#122)
Browse files Browse the repository at this point in the history
* update black to 24.1.0 and pin python to 3.11

There is a bug with using conda (3.12) and a removed dependency
that is needed for setuptools. The solution for now is to use the install
python action and pin to 3.11.

Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch authored Jan 26, 2024
1 parent 88bad1f commit 3c4d421
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pre-commit
black==23.3.0
black==24.1.0
isort
flake8
mypy==0.961
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: gh-pages

- name: Create conda environment
run: conda create --quiet -c conda-forge --name oraspy
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Oras and Dependencies
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
root=$PWD
source activate oraspy
cd /tmp
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check Spelling
uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0
with:
files: ./docs ./README.md

- name: Setup Environment
run: conda create --quiet --name oras pre-commit
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Lint Oras Python
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate oras
python --version
python3 -m pip install pre-commit
python3 -m pip install black
make develop
make lint
Expand All @@ -30,16 +33,15 @@ jobs:
- 5000:5000
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: conda create --quiet --name oras requests
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Test Oras Python
env:
registry_host: localhost
registry_port: ${{ job.services.registry.ports[5000] }}
REGISTRY_STORAGE_DELETE_ENABLED: "true"
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate oras
pip install --upgrade pip setuptools
make install
make test
13 changes: 5 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Install
run: conda create --quiet --name oras twine
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate oras
pip install -e .
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }}
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate oras
python setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit 3c4d421

Please sign in to comment.