Skip to content

Commit

Permalink
Merge pull request #218 from lsst-sqre/tickets/DM-42967
Browse files Browse the repository at this point in the history
DM-42967: Add setuptools as a dependency
  • Loading branch information
jonathansick committed Feb 21, 2024
2 parents 7ae0a07 + 1847636 commit a2cb229
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 23 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci-cron.yaml
Expand Up @@ -16,16 +16,17 @@ jobs:
matrix:
python-version:
- "3.11"
- "3.12"
sphinx-version:
- "7"
- "dev"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

Expand All @@ -51,26 +52,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm

- name: Build docs in tox
uses: lsst-sqre/run-tox@v1
with:
python-version: "3.11"
python-version: "3.12"
tox-envs: "docs,docs-lint"
use-cache: false

pypi:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

Expand All @@ -88,5 +89,5 @@ jobs:
- name: Build and publish
uses: lsst-sqre/build-and-publish-to-pypi@v2
with:
python-version: "3.11"
python-version: "3.12"
upload: false
25 changes: 13 additions & 12 deletions .github/workflows/ci.yaml
Expand Up @@ -19,15 +19,15 @@ jobs:
lint:
runs-on: 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: '3.11'
python-version: '3.12'

- name: Run pre-commit
uses: pre-commit/action@v3.0.0
uses: pre-commit/action@v3.0.1

test:
runs-on: ubuntu-latest
Expand All @@ -36,15 +36,16 @@ jobs:
matrix:
python-version:
- '3.11'
- '3.12'
sphinx-version:
- '7'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:
- name: Run tox
uses: lsst-sqre/run-tox@v1
with:
python-version: '3.11'
python-version: '3.12'
tox-envs: 'docs,docs-lint'

# Only attempt documentation uploads for tagged releases and pull
Expand All @@ -102,14 +103,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm

- name: Build and publish
uses: lsst-sqre/build-and-publish-to-pypi@v2
with:
python-version: "3.11"
python-version: "3.12"
upload: "false"

pypi-publish:
Expand All @@ -124,11 +125,11 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand All @@ -141,4 +142,4 @@ jobs:
- name: Build and publish
uses: lsst-sqre/build-and-publish-to-pypi@v2
with:
python-version: '3.11'
python-version: '3.12'
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yaml
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Run neophile
uses: lsst-sqre/run-neophile@v1
with:
python-version: '3.11'
python-version: '3.12'
mode: pr
types: pre-commit
app-id: ${{ secrets.NEOPHILE_APP_ID }}
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,17 @@

<!-- scriv-insert-here -->

<a id='changelog-1.1.1'></a>
## 1.1.1 (2024-02-21)

### Bug fixes

- `setuptools` is now included in the core package dependencies. The `documenteer.ext.bibtex` extension uses `pybtex`, which is turn uses `pkg_resources` from `setuptools`. In Python 3.12, setuptools is not available in Python environments by default. This direct dependency can be removed once `pybtex` is updated to use `importlib.metadata`.

### Other changes

- Update to the Python project configuration guide for `documenteer.toml` to use an example project other than "Documenteer" in the examples. Also emphasize the requirement that the project must be installed to use the `[project.python]` configuration in `documenteer.toml`.

<a id='changelog-1.1.0'></a>
## 1.1.0 (2024-01-30)

Expand Down
3 changes: 0 additions & 3 deletions changelog.d/20240213_094921_jsick_guide_examples.md

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -30,6 +30,7 @@ dependencies = [
"requests",
"click",
"sphinxcontrib-bibtex>=2.0.0", # for pybtex extension
"setuptools", # for pkg_resources, used by pybtex
"pydantic >= 2.0.0",
"urllib3",
"pylatexenc",
Expand Down

0 comments on commit a2cb229

Please sign in to comment.