Skip to content
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

Update dependencies #63

Merged
merged 5 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ https://github.com/getodk/pyodk/blob/master/CONTRIBUTING.md

#### Before submitting this PR, please make sure you have:
- [ ] included test cases for core behavior and edge cases in `tests`
- [ ] run `nosetests` and verified all tests pass
- [ ] run `python bin/pre_commit.py` to format / lint code
- [ ] run `python -m unittest` and verified all tests pass
- [ ] run `ruff format pyxform tests` and `ruff check pyxform tests` to lint code
- [ ] verified that any code or assets from external sources are properly credited in comments
33 changes: 12 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,37 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ['3.8']
python: ['3.12']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

# Install dependencies.
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Python cache with dependencies.
id: python-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev_requirements.pip') }}
key: ${{ env.pythonLocation }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r dev_requirements.pip
pip install -r docs/docs_requirements.pip
pip install -e[docs] .
pip list

# Build.
- name: Build sdist and wheel.
run: |
pip install wheel
python bin/clean_for_build.py
python setup.py sdist bdist_wheel

# Publish.
- name: Publish release to PyPI with twine
# Build and publish.
- name: Publish release to PyPI
if: success()
run: |
pip install twine
twine upload dist/pyodk-*-py3-none-any.whl dist/pyodk-*.tar.gz
pip install flit==3.9.0
flit --debug publish --no-use-vcs
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

# Publish docs.
- name: Publish docs to gh-pages
Expand Down
53 changes: 19 additions & 34 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,85 +7,70 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ['3.8']
python: ['3.12']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

# Install dependencies.
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Python cache with dependencies.
id: python-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev_requirements.pip') }}
key: ${{ env.pythonLocation }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r dev_requirements.pip
pip install -e .[dev]
pip list

# Linters.
- run: black pyodk tests bin --check --diff
- run: isort pyodk tests bin --check-only --diff
- run: flake8 pyodk tests bin
- run: pycodestyle pyodk tests bin
# Linter.
- run: ruff check pyodk tests docs --no-fix
- run: ruff format pyodk tests docs --diff

test:
runs-on: ${{ matrix.os }}
strategy:
# Run all matrix jobs even if one of them fails.
fail-fast: false
matrix:
python: ['3.8']
python: ['3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
windows_nose_args: --traverse-namespace ./tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

# Install dependencies.
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Python cache with dependencies.
id: python-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev_requirements.pip') }}
key: ${{ env.pythonLocation }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
pip install -r dev_requirements.pip
pip install -r docs/docs_requirements.pip
pip install -e .[dev,docs]
pip list

# Tests.
- name: Run tests
env:
PYODK_CONFIG_FILE: ${{ github.workspace }}/tests/resources/.pyodk_config.toml
run: nosetests -v -v ${{ matrix.windows_nose_args }}
run: python -m unittest --verbose

# Build and Upload.
- name: Build sdist and wheel.
if: success()
run: |
pip install wheel
python bin/clean_for_build.py
python setup.py sdist bdist_wheel

# Check.
- name: Check dist with twine
run: |
pip install twine
twine check dist/*
pip install flit==3.9.0
flit --debug build --no-use-vcs
- name: Upload sdist and wheel.
if: success()
uses: actions/upload-artifact@v3
Expand Down
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This library aims to make common data analysis and workflow automation tasks as

## Install

The currently supported Python version for `pyodk` is 3.8.
The currently supported Python version for `pyodk` is 3.12.

### From pip

Expand Down Expand Up @@ -155,26 +155,20 @@ See issues for additions to `pyodk` that are under consideration. Please file ne
Install the source files as described above, then:

```bash
pip install -r dev_requirements.pip
pip install -e .[dev]
```

You can run tests with:

```bash
nosetests
```

On Windows, use:

```bash
nosetests -v -v --traverse-namespace ./tests
python -m unittest
```

## Release

1. Run all linting and tests.
1. Draft a new GitHub release with the list of merged PRs.
1. Check out a release branch from latest upstream master.
1. Update `pyodk/__version__.py` with the new release version number.
1. Update `pyproject.toml` and `pyodk/__version__.py` with the new release version number.
1. Commit, push the branch, and initiate a pull request. Wait for tests to pass, then merge the PR.
1. Tag the release and it will automatically be published (see `release.yml` actions file).
Empty file removed bin/__init__.py
Empty file.
24 changes: 0 additions & 24 deletions bin/clean_for_build.py

This file was deleted.

43 changes: 0 additions & 43 deletions bin/pre_commit.py

This file was deleted.

8 changes: 0 additions & 8 deletions dev_requirements.in

This file was deleted.

38 changes: 0 additions & 38 deletions dev_requirements.pip

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs_requirements.in

This file was deleted.

Loading
Loading