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

chore: Use Hatch #1022

Merged
merged 15 commits into from
Dec 16, 2023
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
10 changes: 3 additions & 7 deletions .github/actions/install-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,18 @@ runs:
with open(os.environ["GITHUB_ENV"], mode="a") as io:
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)

- name: Install Poetry
- name: Install Hatch
shell: bash
env:
PIP_CONSTRAINT: ${{ inputs.constraints }}
run: |
pipx install poetry --verbose
pipx inject poetry poetry-plugin-export
pipx inject poetry poetry-dynamic-versioning[plugin]
poetry --version
poetry self show plugins
pipx install hatch --verbose
hatch --version

- name: Install Nox
shell: bash
env:
PIP_CONSTRAINT: ${{ inputs.constraints }}
run: |
pipx install nox
pipx inject nox nox-poetry
nox --version
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ updates:
update-types:
- "patch"
- "minor"
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: monthly
timezone: "America/Mexico_City"
reviewers:
- "edgarrmondragon"
labels:
- "dependencies"
commit-message:
prefix: "docs: "
groups:
docs-dependencies:
update-types:
- "patch"
- "minor"
- package-ecosystem: github-actions
directory: "/"
schedule:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
pip install pip
pipx install griffe
pipx install nox
pipx inject nox nox-poetry
pipx list

- name: Set REF
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
griffe==0.38.0
pip==23.3.1
griffe==0.36.9
hatch==1.8.1
nox==2023.4.22
nox-poetry==1.0.3
poetry==1.7.1
poetry-plugin-export==1.6.0
poetry-dynamic-versioning==1.1.1
pip==23.3.1
pip-tools==7.3.0
14 changes: 2 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- tests/**
- docker-compose*.yml
- noxfile.py
- poetry.lock
- pyproject.toml
- .github/workflows/tests.yml
- .github/workflows/constraints.txt
Expand All @@ -23,7 +22,6 @@ on:
- tests/**
- docker-compose*.yml
- noxfile.py
- poetry.lock
- pyproject.toml
- .github/workflows/tests.yml
- .github/workflows/constraints.txt
Expand Down Expand Up @@ -112,9 +110,6 @@ jobs:
architecture: x64
allow-prereleases: true
cache: pip
cache-dependency-path: |
poetry.lock
.github/workflows/constraints.txt

- name: Setup Python ${{ matrix.python-version }} (nightly)
if: "${{ matrix.nightly }}"
Expand Down Expand Up @@ -164,9 +159,6 @@ jobs:
architecture: x64
allow-prereleases: true
cache: pip
cache-dependency-path: |
poetry.lock
.github/workflows/constraints.txt

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down Expand Up @@ -283,11 +275,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: pip
allow-prereleases: true
cache-dependency-path: |
poetry.lock
.github/workflows/constraints.txt
cache: pip

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down Expand Up @@ -354,6 +343,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ci:
autofix_prs: true
autoupdate_schedule: monthly
autoupdate_commit_msg: 'chore(deps): pre-commit autoupdate'
skip:
- pip-compile

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -64,3 +66,11 @@ repos:
rev: "1.5.3"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.9"]

- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
hooks:
- id: pip-compile
files: ^pyproject\.toml$
args: ["--extra", "docs", "-o", "docs/requirements.txt"]
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ python:
install:
- method: pip
path: .
extra_requirements:
- docs
- requirements: docs/requirements.txt
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<a href="https://github.com/wntrblm/nox">
<img alt="Nox" src="https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg"/>
</a>
<a href="https://python-poetry.org/">
<img alt="Poetry" src="https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json"/>
<a href="https://github.com/pypa/hatch">
<img alt="Hatch project" src="https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg"/>
</a>
<a href="https://www.bestpractices.dev/projects/8144">
<img src="https://www.bestpractices.dev/projects/8144/badge">
Expand Down Expand Up @@ -66,12 +66,12 @@

Integration tests are run against a LimeSurvey instance, and both PostgreSQL and MySQL backends, using Docker Compose. The following versions of LimeSurvey were tested for this release:

- [6.3.7](https://github.com/LimeSurvey/LimeSurvey/releases/tag/6.3.7%2B231127)
- [6.3.6](https://github.com/LimeSurvey/LimeSurvey/releases/tag/6.3.6%2B231120)
- [6.3.5](https://github.com/LimeSurvey/LimeSurvey/releases/tag/6.3.5%2B231113)
- [5.6.47](https://github.com/LimeSurvey/LimeSurvey/releases/tag/5.6.47%2B231128)
- [5.6.46](https://github.com/LimeSurvey/LimeSurvey/releases/tag/5.6.46%2B231121)
- [5.6.45](https://github.com/LimeSurvey/LimeSurvey/releases/tag/5.6.45%2B231114)
- [6.3.8](https://github.com/LimeSurvey/LimeSurvey/releases/tag/6.3.8+231204)
- [6.3.7](https://github.com/LimeSurvey/LimeSurvey/releases/tag/6.3.7+231127)
- [6.3.6](https://github.com/LimeSurvey/LimeSurvey/releases/tag/6.3.6+231120)
- [5.6.48](https://github.com/LimeSurvey/LimeSurvey/releases/tag/5.6.48+231205)
- [5.6.47](https://github.com/LimeSurvey/LimeSurvey/releases/tag/5.6.47+231128)
- [5.6.46](https://github.com/LimeSurvey/LimeSurvey/releases/tag/5.6.46+231121)

## Installation

Expand Down
15 changes: 2 additions & 13 deletions docs/contributing/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,12 @@ Ready to contribute? Here's how to set up `citric` for local development.
cd citric
```

1. Install [`poetry`][poetry] and the `poetry-dynamic-versioning` plugin:

```shell
poetry self add "poetry-dynamic-versioning[plugin]"
```

1. Install the project dependencies:

```shell
poetry install
```
1. Install [`hatch`][hatch]:

1. Install [`nox`][nox] (used for automation):

```shell
pipx install nox
pipx inject nox nox-poetry
nox -l
```

Expand Down Expand Up @@ -65,7 +54,7 @@ Ready to contribute? Here's how to set up `citric` for local development.
changie new
```

[poetry]: https://python-poetry.org/docs/#installation
[hatch]: https://hatch.pypa.io/latest/install/
[nox]: https://nox.thea.codes/en/stable/
[pre-commit]: https://pre-commit.com/
[changie]: https://changie.dev/
118 changes: 118 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --extra=docs --output-file=docs/requirements.txt
#
alabaster==0.7.13
# via sphinx
anyascii==0.3.2
# via sphinx-autoapi
astroid==3.0.2
# via sphinx-autoapi
babel==2.14.0
# via sphinx
beautifulsoup4==4.12.2
# via furo
certifi==2023.11.17
# via requests
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via sphinx-autobuild
docutils==0.20.1
# via
# myst-parser
# sphinx
furo==2023.9.10
# via citric (pyproject.toml)
idna==3.6
# via requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.2
# via
# myst-parser
# sphinx
# sphinx-autoapi
livereload==2.6.3
# via sphinx-autobuild
markdown-it-py==3.0.0
# via
# mdit-py-plugins
# myst-parser
markupsafe==2.1.3
# via jinja2
mdit-py-plugins==0.4.0
# via myst-parser
mdurl==0.1.2
# via markdown-it-py
myst-parser==2.0.0
# via citric (pyproject.toml)
packaging==23.2
# via sphinx
pygments==2.17.2
# via
# furo
# sphinx
pyyaml==6.0.1
# via
# myst-parser
# sphinx-autoapi
requests==2.31.0
# via
# citric (pyproject.toml)
# sphinx
six==1.16.0
# via livereload
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.5
# via beautifulsoup4
sphinx==7.2.6
# via
# citric (pyproject.toml)
# furo
# myst-parser
# sphinx-autoapi
# sphinx-autobuild
# sphinx-basic-ng
# sphinx-copybutton
# sphinx-hoverxref
# sphinx-notfound-page
# sphinxcontrib-applehelp
# sphinxcontrib-devhelp
# sphinxcontrib-htmlhelp
# sphinxcontrib-jquery
# sphinxcontrib-qthelp
# sphinxcontrib-serializinghtml
sphinx-autoapi==3.0.0
# via citric (pyproject.toml)
sphinx-autobuild==2021.3.14
# via citric (pyproject.toml)
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-copybutton==0.5.2
# via citric (pyproject.toml)
sphinx-hoverxref==1.3.0
# via citric (pyproject.toml)
sphinx-notfound-page==1.0.0
# via citric (pyproject.toml)
sphinxcontrib-applehelp==1.0.7
# via sphinx
sphinxcontrib-devhelp==1.0.5
# via sphinx
sphinxcontrib-htmlhelp==2.0.4
# via sphinx
sphinxcontrib-jquery==4.1
# via sphinx-hoverxref
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.6
# via sphinx
sphinxcontrib-serializinghtml==1.1.9
# via sphinx
tornado==6.4
# via livereload
urllib3==2.1.0
# via requests
Loading