Skip to content

Commit

Permalink
Merge branch 'main' into break/restructure-package-both-clients
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Sep 18, 2024
2 parents 24b8afa + 05c41a3 commit 849b440
Show file tree
Hide file tree
Showing 51 changed files with 1,335 additions and 826 deletions.
4 changes: 0 additions & 4 deletions .changes/0.0.10.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
## 0.0.10 - 2022-02-17
### Added

* [#155](https://github.com/edgarrmondragon/citric/pull/155) Experimental support for Python 3.11
* [#165](https://github.com/edgarrmondragon/citric/pull/165) Test in Windows and MacOS


* [#192](https://github.com/edgarrmondragon/citric/pull/192) Implement `copy_survey` in client
* [#190](https://github.com/edgarrmondragon/citric/pull/190) Implement `import_group` in client
* [#196](https://github.com/edgarrmondragon/citric/pull/196) Implement `list_groups` in client
Expand Down
9 changes: 9 additions & 0 deletions .changes/1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## 1.0.0 - 2024-02-12
### Added
* [#1079](https://github.com/edgarrmondragon/citric/issues/1079) Added `get_db_version` method to RPC client
* [#1092](https://github.com/edgarrmondragon/citric/issues/1092) Added a `Session.call` method to allow calling RPC methods without any error handling to get the raw response
### Removed
* [#1093](https://github.com/edgarrmondragon/citric/issues/1093) Removed the `Session._headers` attribute
### Documentation
* [#1057](https://github.com/edgarrmondragon/citric/issues/1057) Documented `conda install` option
* [#1092](https://github.com/edgarrmondragon/citric/issues/1092) Linked unimplemented methods to `Session.call` examples
5 changes: 5 additions & 0 deletions .changes/1.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 1.0.1 - 2024-06-12
### Fixed
* [#1101](https://github.com/edgarrmondragon/citric/issues/1101) fix: Bump min `requests` to `2.25.1` (released 2020-12-16)
### Documentation
* [#1152](https://github.com/edgarrmondragon/citric/issues/1152) Fixed links to LimeSurvey API docs
5 changes: 0 additions & 5 deletions .changes/unreleased/Added-20240117-233210.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/unreleased/Documentation-20231217-085221.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2.1
orbs:
# The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files
# Orb commands and jobs help you with common scripting around a language/tool
# so you dont have to copy and paste it everywhere.
# so you don't have to copy and paste it everywhere.
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
python: circleci/[email protected]

Expand All @@ -21,7 +21,8 @@ jobs:
# The executor is the environment in which the steps below will be executed - below will use a python 3.10.2 container
# Change the version below to your required version of python
docker:
- image: cimg/python:3.11.3
- image: cimg/python:3.11.7
- image: cimg/python:3.12.1
# Checkout the code as the first step. This is a dedicated CircleCI step.
# The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default.
# Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt.
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Global owner
* @edgarrmondragon
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See the contributing guide in the [docs](https://citric.readthedocs.io/en/latest/contributing/code-of-conduct.html) for more information.
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
attributes:
label: Citric Version
description: Version of the package you are using
placeholder: "0.10.0"
placeholder: "1.0.1"
validations:
required: true
- type: dropdown
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/install-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Install tools for Python projects

inputs:
constraints:
default: ".github/workflows/constraints.txt"
default: "${{ github.workspace }}/.github/workflows/constraints.txt"
description: "Path to pip constraints file"
required: true
os:
Expand Down Expand Up @@ -31,18 +31,18 @@ runs:
with open(os.environ["GITHUB_ENV"], mode="a") as io:
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)
- name: Install Hatch
- name: Install Nox
shell: bash
env:
PIP_CONSTRAINT: ${{ inputs.constraints }}
run: |
pipx install hatch --verbose
hatch --version
pipx install nox
nox --version
- name: Install Nox
- name: Install uv
shell: bash
env:
PIP_CONSTRAINT: ${{ inputs.constraints }}
run: |
pipx install nox
nox --version
pipx install uv
uv --version
18 changes: 0 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ updates:
update-types:
- "patch"
- "minor"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
reviewers:
- "edgarrmondragon"
commit-message:
prefix: "ci: "
groups:
artifacts:
patterns:
- "actions/*-load-artifact"
ci-dependencies:
update-types:
- "patch"
- "minor"
exclude-patterns:
- "actions/*-load-artifact"
- package-ecosystem: docker
directory: "/"
schedule:
Expand Down
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

<!-- How was it tested? -->

## Checklist

<!-- Put an `x` in the boxes that apply. You can also fill these out after creating the PR. -->

- [ ] My pull request has a descriptive title.
- [ ] I have read the [CONTRIBUTING] guide.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] If appropriate, I have added necessary documentation.
- [ ] For user-facing changes, refactorings, performance improvements or documentation updates, I have added a changelog entry using [Changie].

For both the title of the PR and the changelog entry, prefer simple past tense or constructions with "now". For example:

- Added `Client.invite_participants()`
- `Client.user_activation_settings()` now accepts a `user_activation_settings` keyword argument

[CONTRIBUTING]: https://citric.readthedocs.io/en/latest/contributing/code-of-conduct.html
[Changie]: https://changie.dev/
9 changes: 4 additions & 5 deletions .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,21 @@ jobs:
NOXSESSION: api
steps:
- name: Check out the repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.12

- name: Install tools
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
python -Im pip install -U pip
pipx install griffe
pipx install nox
pipx install griffe nox uv
pipx list
- name: Set REF
Expand Down
48 changes: 34 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,31 @@ jobs:
name: Build wheel and sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}
- uses: hynek/build-and-inspect-python-package@c9fea028dc9c880c4d00d54727eff3fb1190d082 # v2.0.0
- uses: hynek/build-and-inspect-python-package@2dbbf2b252d3a3c7cec7a810e3ed5983bd17b13a # v2.8.0

upload-to-release:
name: Upload to GitHub Release
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases

steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: Packages
path: dist
- uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
with:
file: dist/**
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: false
file_glob: true

publish:
name: Publish to PyPI
Expand All @@ -38,11 +58,11 @@ jobs:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: Packages
path: dist
- uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # v1.8.11
- uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0

# Move this up when PyPI supports signing
sign:
Expand All @@ -51,22 +71,22 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for attestations
attestations: write # IMPORTANT: mandatory for attestations

steps:
- uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: Packages
path: dist
- uses: sigstore/gh-action-sigstore-python@61f6a500bbfdd9a2a339cf033e5421951fbc1cd2 # v2.1.1
- uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
id: attest
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
subject-path: "./dist/citric*"
- uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
with:
file: dist/**
file: ${{ steps.attest.outputs.bundle-path }}
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: false
file_glob: true
asset_name: attestations.intoto.jsonl
10 changes: 5 additions & 5 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
griffe==0.38.1
hatch==1.9.1
nox==2023.4.22
pip==23.3.2
pip-tools==7.3.0
griffe==1.2.0
nox==2024.4.15
pip==24.2
pip-tools==7.4.1
uv==0.4.1
10 changes: 7 additions & 3 deletions .github/workflows/gen-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ permissions: read-all
jobs:
generate-pr:
runs-on: ubuntu-latest
permissions:
contents: write # to create a github release
pull-requests: write # to create and update PRs
discussions: write # to create a discussion
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Batch changes
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
with:
Expand Down Expand Up @@ -56,7 +60,7 @@ jobs:

- name: Draft Release
id: draft-release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
with:
draft: true
body_path: ".changes/${{ steps.latest.outputs.output }}.md"
Expand All @@ -72,7 +76,7 @@ jobs:
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
token: ${{ steps.generate-token.outputs.token }}
title: "chore: Release ${{ steps.latest.outputs.output }}"
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/gha-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update GitHub Actions

on:
workflow_dispatch:
schedule:
# Monthly
- cron: '0 0 1 * *'

permissions: read-all

jobs:
generate-pr:
runs-on: ubuntu-latest
permissions:
pull-requests: write # to create and update PRs
steps:
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.x'
- uses: hynek/setup-cached-uv@4b4bfa932036976749a9653b0fa4fa10b1a7092b # v2.1.0
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- run: |
uvx gha-update
- uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
token: ${{ steps.generate-token.outputs.token }}
title: "chore: Update GitHub Actions"
branch: chore/update-gha
commit-message: "chore: Update GitHub Actions"
body: |
Update GitHub Actions to the latest versions.
Uses https://github.com/davidism/gha-update.
reviewers: |
edgarrmondragon
assignees: |
edgarrmondragon
delete-branch: true
labels: Release
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -60,14 +60,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
sarif_file: results.sarif
Loading

0 comments on commit 849b440

Please sign in to comment.