-
Notifications
You must be signed in to change notification settings - Fork 10
Update Python support #384
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
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6cc19d4
Update Python support
forsyth2 20ba7b9
Add explicit sqlite dependency
forsyth2 8a76833
Address comments
forsyth2 117f695
Add matrix testing
forsyth2 942f96e
Additional fixes
forsyth2 b97745e
Fixes 3rd try
forsyth2 be1b66b
Fixes 4th try
forsyth2 eaa7870
Fixes 5th try
forsyth2 b53fadf
Address comments but pip install fails
forsyth2 5439c10
Implement suggestions from Claude
forsyth2 c028292
Functionality changes suggested by Claude
forsyth2 884e994
Doc version fix plus hpss_util fixes from Claude
forsyth2 2caba4e
Address further comments
forsyth2 cc37237
Fix add_file
forsyth2 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 |
|---|---|---|
|
|
@@ -19,21 +19,24 @@ jobs: | |
| - name: Checkout Code Repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up Python 3.9 | ||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.9 | ||
| python-version: "3.13" | ||
|
|
||
| # Run all pre-commit hooks on all the files. | ||
| # Getting only staged files can be tricky in case a new PR is opened | ||
| # since the action is run on a branch in detached head state. | ||
| # This is the equivalent of running "pre-commit run --all-files" locally. | ||
| # If you commit with the `--no-verify` flag, this check may fail. | ||
| - name: Install and Run Pre-commit | ||
| uses: pre-commit/[email protected].0 | ||
| uses: pre-commit/[email protected].1 | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.11", "3.12", "3.13"] | ||
| defaults: | ||
| run: | ||
| shell: bash -l {0} | ||
|
|
@@ -44,11 +47,11 @@ jobs: | |
| - name: Cache Conda | ||
| uses: actions/cache@v3 | ||
| env: | ||
| CACHE_NUMBER: 0 | ||
| CACHE_NUMBER: 1 # Increment this to invalidate cache | ||
| with: | ||
| path: ~/conda_pkgs_dir | ||
| key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ | ||
| hashFiles('conda/dev.yml') }} | ||
| hashFiles('conda/dev.yml') }}-python${{ matrix.python-version }} | ||
|
|
||
| - name: Build Conda Environment | ||
| uses: conda-incubator/setup-miniconda@v3 | ||
|
|
@@ -57,13 +60,27 @@ jobs: | |
| miniforge-variant: Miniforge3 | ||
| miniforge-version: latest | ||
| environment-file: conda/dev.yml | ||
| channel-priority: strict | ||
| channel-priority: flexible # Changed from strict to flexible | ||
| auto-update-conda: true | ||
| python-version: ${{ matrix.python-version }} | ||
| channels: conda-forge | ||
| use-only-tar-bz2: true | ||
|
|
||
| - name: Verify Environment and Fix Dependencies | ||
| run: | | ||
| conda info | ||
| conda list | ||
| # Ensure we have the right Python version | ||
| python --version | ||
| # Fix pip issues for Python 3.12+ | ||
| if [[ "${{ matrix.python-version }}" == "3.12" ]] || [[ "${{ matrix.python-version }}" == "3.13" ]]; then | ||
| python -m ensurepip --upgrade || true | ||
| python -m pip install --upgrade --force-reinstall pip setuptools wheel | ||
| fi | ||
|
|
||
| - name: Install `zstash` Package | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install . | ||
| python -m pip install . | ||
|
|
||
| - name: Run Tests | ||
| run: | | ||
|
|
@@ -77,7 +94,7 @@ jobs: | |
| defaults: | ||
| run: | ||
| shell: bash -l {0} | ||
| timeout-minutes: 5 | ||
| timeout-minutes: 10 # Increased timeout for docs | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
|
|
@@ -87,11 +104,11 @@ jobs: | |
| - name: Cache Conda | ||
| uses: actions/cache@v3 | ||
| env: | ||
| CACHE_NUMBER: 0 | ||
| CACHE_NUMBER: 1 # Match the build job cache number | ||
| with: | ||
| path: ~/conda_pkgs_dir | ||
| key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ | ||
| hashFiles('conda/dev.yml') }} | ||
| hashFiles('conda/dev.yml') }}-docs | ||
|
|
||
| - name: Build Conda Environment | ||
| uses: conda-incubator/setup-miniconda@v3 | ||
|
|
@@ -100,8 +117,9 @@ jobs: | |
| miniforge-variant: Miniforge3 | ||
| miniforge-version: latest | ||
| environment-file: conda/dev.yml | ||
| channel-priority: strict | ||
| channel-priority: flexible # Changed from strict to flexible | ||
| auto-update-conda: true | ||
| python-version: "3.13" # Use stable Python version for docs | ||
|
|
||
| # sphinx-multiversion allows for version docs. | ||
| - name: Build Sphinx Docs | ||
|
|
||
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 |
|---|---|---|
| @@ -1,31 +1,30 @@ | ||
| name: zstash_dev | ||
| channels: | ||
| - conda-forge | ||
| - defaults | ||
| dependencies: | ||
| # Base | ||
| # ================= | ||
| - pip=22.2.2 | ||
| - python=3.9.13 | ||
| - six=1.16.0 | ||
| - globus-sdk=3.15.0 | ||
| - pip | ||
| - python >=3.11,<3.14 | ||
| - sqlite | ||
| - six >=1.16.0 | ||
| - globus-sdk >=3.15.0 | ||
| # Developer Tools | ||
| # ================= | ||
| # If versions are updated, also update 'rev' in `.pre-commit.config.yaml` | ||
| - black=24.10.0 | ||
| - flake8=7.1.1 | ||
| - flake8-isort=6.1.1 | ||
| - mypy=1.11.2 | ||
| - pre-commit=4.0.1 | ||
| - tbump=6.9.0 | ||
| - black ==25.1.0 | ||
| - flake8 ==7.3.0 | ||
| - isort ==6.0.1 | ||
| - mypy ==1.18.2 | ||
| - pre-commit ==4.3.0 | ||
| - tbump >=6.9.0 | ||
| # Documentation | ||
| # ================= | ||
| # If versions are updated, also update in `.github/workflows/workflow.yml` | ||
| - jinja2<3.1 | ||
| - sphinx=5.2.3 | ||
| - sphinx-multiversion=0.2.4 | ||
| - sphinx_rtd_theme=1.0.0 | ||
| - jinja2 <3.1 | ||
| - sphinx >=5.2.0 | ||
| - sphinx-multiversion >=0.2.4 | ||
| - sphinx_rtd_theme >=1.0.0 | ||
| # Need to pin docutils because 0.17 has a bug with unordered lists | ||
| # https://github.com/readthedocs/sphinx_rtd_theme/issues/1115 | ||
| - docutils=0.16 | ||
| prefix: /opt/miniconda3/envs/zstash_dev | ||
| - docutils >=0.16,<0.17 | ||
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ exclude = | |
| venv | ||
|
|
||
| [mypy] | ||
| python_version = 3.9 | ||
| python_version = 3.13 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do we choose the specific version for this?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest stable version of Python. |
||
| check_untyped_defs = True | ||
| ignore_missing_imports = True | ||
| warn_unused_ignores = True | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -7,6 +7,6 @@ | |
| author_email="[email protected], [email protected], [email protected]", | ||
| description="Long term HPSS archiving software for E3SM", | ||
| packages=find_packages(include=["zstash", "zstash.*"]), | ||
| python_requires=">=3.9", | ||
| python_requires=">=3.11,<3.14", | ||
| entry_points={"console_scripts": ["zstash=zstash.main:main"]}, | ||
| ) | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomvothecoder How do we determine the constraints (
=,>=, etc.)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is based on the conda-forge recipe and compatibility with other packages. If things break with new package versions, that suggests updating the constraints accordingly.