Skip to content

Commit

Permalink
Add project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Aug 17, 2024
1 parent fd37616 commit ad17336
Show file tree
Hide file tree
Showing 20 changed files with 1,408 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributor covenant code of conduct

## Our pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age,
body size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual
identity and orientation.

## Our standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an
appointed representative at an online or offline event. Representation of a
project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <[email protected]>. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated
to maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project’s leadership.

## Attribution

This Code of Conduct is adapted from the
[Contributor Covenant](https://contributor-covenant.org), version 1.4,
available at
[https://contributor-covenant.org/version/1/4](https://contributor-covenant.org/version/1/4/)
23 changes: 23 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
---
version: 2
updates:

- package-ecosystem: "pip"
directory: "/"
versioning-strategy: increase-if-necessary
schedule:
interval: "daily"
labels:
- "📦 dependencies"
assignees:
- "kdeldycke"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "📦 dependencies"
assignees:
- "kdeldycke"
2 changes: 2 additions & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
github: kdeldycke
20 changes: 20 additions & 0 deletions .github/workflows/autofix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Autofix
"on":
push:
# Only targets main branch to avoid amplification effects of auto-fixing
# the exact same stuff in multiple non-rebased branches.
branches:
- main

# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true

jobs:

autofix:
uses: kdeldycke/workflows/.github/workflows/[email protected]
11 changes: 11 additions & 0 deletions .github/workflows/autolock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Autolock
"on":
schedule:
# Run weekly, every Monday at 8:43.
- cron: "43 8 * * 1"

jobs:

autolock:
uses: kdeldycke/workflows/.github/workflows/[email protected]
23 changes: 23 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Changelog & versions
"on":
push:
branches:
- main
paths:
- changelog.md
- pyproject.toml
- .github/workflows/changelog.yaml
- .github/workflows/release.yaml

# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true

jobs:

changelog:
uses: kdeldycke/workflows/.github/workflows/[email protected]
56 changes: 56 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: Docs
"on":
push:
# Only targets main branch to avoid amplification effects of auto-fixing
# the exact same stuff in multiple non-rebased branches.
branches:
- main

# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true

jobs:

docs:
uses: kdeldycke/workflows/.github/workflows/[email protected]

update-docs:
needs: docs
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.12"
- name: Install uv
run: |
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/v4.4.3/requirements/uv.txt
- name: Install project
run: |
uv --no-progress venv --system
uv --no-progress pip install --all-extras --requirement pyproject.toml .
- name: Generate dynamic doc
run: |
uv --no-progress run --frozen -- python -m extra_platforms.docs_update
- uses: peter-evans/[email protected]
with:
assignees: ${{ github.actor }}
commit-message: "[autofix] Regenerate documentation."
title: "[autofix] Regenerate documentation"
body: >
<details><summary><code>Workflow metadata</code></summary>
> [Auto-generated on run `#${{ github.run_id }}`](${{ github.event.repository.html_url }}/actions/runs/${{
github.run_id }}) by `${{ github.job }}` job from [`docs.yaml`](${{ github.event.repository.html_url
}}/blob/${{ github.sha }}/.github/workflows/docs.yaml) workflow.
</details>
labels: "📚 documentation"
branch: update-docs
14 changes: 14 additions & 0 deletions .github/workflows/label-sponsors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Label sponsors
"on":
pull_request:
types:
- opened
issues:
types:
- opened

jobs:

label-sponsors:
uses: kdeldycke/workflows/.github/workflows/[email protected]
19 changes: 19 additions & 0 deletions .github/workflows/labeller-content-based.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Labeller (content-based)
"on":
issues:
types: [opened]
pull_request:
types: [opened]

# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true

jobs:

labeller:
uses: kdeldycke/workflows/.github/workflows/[email protected]
16 changes: 16 additions & 0 deletions .github/workflows/labeller-file-based.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Labeller (file-based)
"on":
pull_request:

# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true

jobs:

labeller:
uses: kdeldycke/workflows/.github/workflows/[email protected]
18 changes: 18 additions & 0 deletions .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Labels
"on":
push:
branches:
- main

# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true

jobs:

labels:
uses: kdeldycke/workflows/.github/workflows/[email protected]
19 changes: 19 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Lint
"on":
push:
branches:
- main
pull_request:

# XXX Concurrency detection sucks and jobs gets killed randonmly.
# concurrency:
# # Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# # Source: https://mail.python.org/archives/list/[email protected]/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true

jobs:

lint:
uses: kdeldycke/workflows/.github/workflows/[email protected]
15 changes: 15 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Build & release
"on":
# Target are chosen so that all commits get a chance to have their build tested.
push:
branches:
- main
pull_request:

jobs:

release:
uses: kdeldycke/workflows/.github/workflows/[email protected]
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Loading

0 comments on commit ad17336

Please sign in to comment.