Skip to content

Commit

Permalink
Update template files, reformat with updated ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Dec 14, 2023
1 parent a3bbe2a commit 753b127
Show file tree
Hide file tree
Showing 13 changed files with 1,198 additions and 1,247 deletions.
1 change: 1 addition & 0 deletions .deprecated_files
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.github/workflows/check_mandatory_and_static_files.yaml
.github/workflows/dev_cd.yaml
.github/workflows/unit_and_int_tests.yaml
.github/workflows/cd.yaml

scripts/check_mandatory_and_static_files.py
scripts/update_static_files.py
Expand Down
7 changes: 5 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"editor.rulers": [
88
],
"editor.defaultFormatter": "ms-python.black-formatter",
"ruff.organizeImports": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"licenser.license": "Custom",
"licenser.customHeaderFile": "/workspace/.devcontainer/license_header.txt"
},
Expand All @@ -52,7 +56,6 @@
"visualstudioexptteam.vscodeintellicode",
"ymotongpoo.licenser",
"charliermarsh.ruff",
"ms-python.black-formatter",
"ms-python.mypy-type-checker"
]
}
Expand Down
121 changes: 0 additions & 121 deletions .github/workflows/cd.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci_workflow_dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
fetch-tag:
runs-on: ubuntu-latest
if: ( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'build') ) || ( github.event.action == 'labeled' && github.event.label.name == 'build' )
if: ( github.event.action == 'workflow_dispatch' || github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'build') ) || ( github.event.action == 'labeled' && github.event.label.name == 'build' )
steps:
- id: fetch-tag
uses: ghga-de/gh-action-fetch-tag@v1
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/static_code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
env:
SKIP: no-commit-to-branch
- name: ruff
uses: chartboost/ruff-action@v1
- name: black
run: |
black --check .
ruff check --output-format=github .
ruff format --check .
- name: mypy
run: |
mypy .
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ repos:
- id: debug-statements
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -60,7 +60,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.0
rev: v1.7.1
hooks:
- id: mypy
args: [--no-warn-unused-ignores]
2 changes: 2 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ ignore = [
"D400", # first doc line ends in period
"D401", # non-imperative-mood
"D107", # missing docstring in __init__
"D206", # indent-with-spaces (ignored for formatter)
"D300", # triple-single-quotes (ignored for formatter)
]

line-length = 88
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ We recommend using the provided Docker container.

A pre-build version is available at [docker hub](https://hub.docker.com/repository/docker/ghga/ghga-connector):
```bash
docker pull ghga/ghga-connector:1.1.0
docker pull ghga/ghga-connector:1.1.1
```

Or you can build the container yourself from the [`./Dockerfile`](./Dockerfile):
```bash
# Execute in the repo's root dir:
docker build -t ghga/ghga-connector:1.1.0 .
docker build -t ghga/ghga-connector:1.1.1 .
```

For production-ready deployment, we recommend using Kubernetes, however,
for simple use cases, you could execute the service using docker
on a single server:
```bash
# The entrypoint is preconfigured:
docker run -p 8080:8080 ghga/ghga-connector:1.1.0 --help
docker run -p 8080:8080 ghga/ghga-connector:1.1.1 --help
```

If you prefer not to use containers, you may install the service from source:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ghga_connector"
version = "1.1.0"
version = "1.1.1"
description = "GHGA Connector - A CLI client application for interacting with the GHGA system."
readme = "README.md"
authors = [
Expand Down
2 changes: 0 additions & 2 deletions requirements-dev-common.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ mypy-extensions>=1.0.0

ruff>=0.0.290

black>=23.1.0

click>=8.1.0
typer>=0.7.0

Expand Down
Loading

0 comments on commit 753b127

Please sign in to comment.