Skip to content

Commit

Permalink
Make setup.py consistent with conda recipe (#395)
Browse files Browse the repository at this point in the history
* Make `setup.py` consistent with conda recipe

Inconsistencies in `setup.py` can cause `pip check` to fail
on the conda package.

* Update GH Actions actions versions

* Bump `isort` version to fix poetry error

---------

Co-authored-by: Tom Vo <[email protected]>
  • Loading branch information
xylar and tomvothecoder authored Feb 2, 2023
1 parent 2bff738 commit c3f70dc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ jobs:
timeout-minutes: 2
steps:
- name: Checkout Code Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9

# 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
- name: Install and Run Pre-commit
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v3.0.0

build:
needs: check-jobs-to-skip
Expand All @@ -49,10 +49,10 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache Conda
uses: actions/cache@v2
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
Expand Down Expand Up @@ -99,12 +99,12 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache Conda
uses: actions/cache@v2
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
Expand Down Expand Up @@ -62,18 +62,18 @@ jobs:
shell: bash -l {0}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ repos:
- id: black

# Can run individually with `pre-commit run isort --all-files`
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def package_files(directory, prefixes, extensions):
author_email="[email protected], [email protected]",
description="Post-processing software for E3SM",
python_requires=">=3.6",
intall_requires=["configobj", "jinja2"],
intall_requires=["configobj>=5.0.0,<6.0.0", "jinja2>=2.0.0"],
packages=find_packages(include=["zppy", "zppy.*"]),
package_data={"": data_files},
entry_points={"console_scripts": ["zppy=zppy.__main__:main"]},
Expand Down

0 comments on commit c3f70dc

Please sign in to comment.