-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
471 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "maven" # See documentation for possible values | ||
directory: "/data/local/test_basic/layout_maven/ms-101" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build PyPI | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
linting: | ||
name: Reuse linting job | ||
uses: ./.github/workflows/lint.yml | ||
|
||
build: | ||
needs: linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 #full history | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: pip install hatch | ||
- name: Run unit and integrations tests | ||
run: hatch run test:pytest --cov=reqstool-python-decorators --cov-report=xml --cov-report=html | ||
- name: Build project | ||
run: hatch build | ||
# Upload artifacts for later use | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Lint (black and flake8) | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
check-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check branch and tag | ||
if: github.event_name == 'push' && !(github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')) | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Lint (black and flake8) | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install pip package(s) | ||
run: pip install hatch | ||
- name: Run black formatter check | ||
run: hatch run lint:black --check --verbose src tests | ||
- name: Run flake8 linter | ||
run: hatch run lint:flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish to GitHub Pages | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: github-pages | ||
cancel-in-progress: false | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Configure Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
- name: Install Antora | ||
run: npm i antora | ||
- name: Install Asciidoctor Kroki extension | ||
run: npm i asciidoctor asciidoctor-kroki | ||
- name: Generate Site | ||
run: npx antora docs/antora-playbook.yml | ||
- name: Create site folders | ||
run: mkdir -p docs/build/site | ||
- name: Upload Artifacts | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/build/site | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build and publish to PyPI | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
check-release: | ||
name: Reuse check release | ||
uses: ./.github/workflows/check_release.yml | ||
build: | ||
name: Reuse build | ||
uses: ./.github/workflows/build.yml | ||
|
||
|
||
publish-to-pypi: | ||
needs: | ||
- check-release | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: prod | ||
url: https://pypi.org/p/reqstool-client | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
# Download artifacts from the build job | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Publish distribution 📦 to PyPI | ||
# if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
sign-artifacts: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build and publish to Test PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Reuse build | ||
uses: ./.github/workflows/build.yml | ||
|
||
publish-to-test-pypi: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
# Specifying a GitHub environment is optional, but strongly encouraged | ||
environment: | ||
name: test | ||
url: https://test.pypi.org/p/reqstool-client | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
# Download artifacts from the build job | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Publish distribution 📦 to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
sign-artifacts: true | ||
skip-existing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Description | ||
|
||
This documentation provides information on how to use the Reqstool Hatch Plugin. The plugin is designed to be used with the Hatch build tool and facilitates the integration of the Reqstool Decorators in your project. | ||
|
||
## Installation | ||
|
||
To use the Reqstool Hatch Plugin, follow these steps: | ||
|
||
- Update your project dependencies in the `pyproject.toml` file and | ||
ensure that the Reqstool Decorators' dependency is listed as follows; | ||
``` | ||
dependencies = ["reqstool-decorators == <version>"] | ||
``` | ||
|
||
When you declare this in the pyproject.toml file, you are specifying the required versions for the dependency of the Reqstool Decorators. This ensures that the correct version of the dependencies are used when installing and running your project. | ||
|
||
|
||
|
||
## Usage | ||
|
||
|
||
|
||
### Configuration | ||
|
||
The plugin can be configured through the `pyproject.toml` file. Configure plugin in `pyproject.toml`as follows; | ||
|
||
``` | ||
[tool.hatch.build.targets.wheel.hooks.decorators] | ||
dependencies = ["reqstool-hatch-plugin == <version>"] | ||
path = ["src","tests"] | ||
``` | ||
It specifies that the reqstool-hatch-plugin is a dependency for the build process, and it should be of a specific version. | ||
|
||
Further it defines the paths where the plugin should be applied. In this case, it specifies that the plugin should be applied to files in the src and tests directories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/asciidoctor/asciidoctor-intellij-plugin/main/src/main/resources/jsonSchemas/antoraPlaybookSchema.json | ||
|
||
site: | ||
title: Reqstool Python Hatch Plugin Documentation | ||
url: https://github.com/luftfartsverket/reqstool-python-hatch-plugin | ||
start_page: reqstool-python-hatch-plugin::index.adoc | ||
|
||
content: | ||
sources: | ||
- url: ~+ | ||
branches: HEAD | ||
start_path: docs | ||
ui: | ||
bundle: | ||
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable | ||
snapshot: true | ||
asciidoc: | ||
attributes: | ||
kroki-server-url: https://kroki.io | ||
kroki-fetch-diagram: true | ||
extensions: | ||
- asciidoctor-kroki | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/asciidoctor/asciidoctor-intellij-plugin/main/src/main/resources/jsonSchemas/antoraComponentSchema.json | ||
|
||
name: reqstool-python-hatch-plugin | ||
title: Reqstool Python Hatch Plugin | ||
version: 0.0.1 | ||
nav: | ||
- modules/ROOT/nav.adoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* xref:index.adoc[Start] | ||
* xref:usage.adoc[Usage] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
== Description | ||
|
||
This documentation provides information on how to use the Reqstool Python Hatch Plugin. The plugin is designed to be used with the Hatch build tool and facilitates the integration of the Reqstool Python Decorators in your project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
= Reqstool Python Hatch Plugin | ||
|
||
include::description.adoc[] | ||
|
||
include::installation.adoc[] | ||
|
||
include::license.adoc[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
== Installation | ||
|
||
To use the Reqstool Python Hatch Plugin, follow these steps: | ||
|
||
- Update your project dependencies in the `pyproject.toml` file and | ||
ensure that the Reqstool Decorators' dependency is listed as follows; | ||
``` | ||
dependencies = ["reqstool-python-decorators == <version>"] | ||
``` | ||
When you declare this in the pyproject.toml file, you are specifying the required versions for the dependency of the Reqstool Decorators. This ensures that the correct version of the dependencies are used when installing and running your project. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
== License | ||
|
||
This project is licensed under the MIT License - see the LICENSE.md file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
== Usage | ||
|
||
|
||
=== Configuration | ||
|
||
The plugin can be configured through the `pyproject.toml` file. Configure plugin in `pyproject.toml`as follows; | ||
|
||
``` | ||
[tool.hatch.build.targets.wheel.hooks.decorators] | ||
dependencies = ["reqstool-python-hatch-plugin == <version>"] | ||
path = ["src","tests"] | ||
|
||
``` | ||
It specifies that the reqstool-hatch-plugin is a dependency for the build process, and it should be of a specific version. | ||
|
||
Further it defines the paths where the plugin should be applied. In this case, it specifies that the plugin should be applied to files in the src and tests directories. |
Oops, something went wrong.