Skip to content

Add a linter workflow #18

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
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
15 changes: 15 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2",
"language": "en",
"dictionaries": ["en-gb", "companies", "softwareTerms", "misc", "python", "bash", "filetypes"],
"words": [
"Kenney",
"commandline",
"pyproject",
"pydantic",
"pipx"
],
"ignorePaths": [
".gitignore"
]
}
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# 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: "poetry" # See documentation for possible values
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
13 changes: 9 additions & 4 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# cspell: ignore marvinpinto, pypa
name: Build and publish

on:
Expand Down Expand Up @@ -34,12 +36,15 @@ jobs:

- run: poetry install

- run: PKG_VERSION=$(poetry version --short) && echo $PKG_VERSION && echo "value=$PKG_VERSION" >> $GITHUB_OUTPUT
- run: |
PKG_VERSION=$(poetry version --short) && \
echo "$PKG_VERSION" && \
echo "value=$PKG_VERSION" >> "$GITHUB_OUTPUT"
id: pkg_version

- run: poetry build

- run: echo "value=$(ls dist/*.tar.gz | sed 's/.tar.gz//' | xargs basename)" >> $GITHUB_OUTPUT
# shellcheck disable=SC2012
- run: echo "value=$(ls dist/*.tar.gz | sed 's/.tar.gz//' | xargs basename)" >> "$GITHUB_OUTPUT"
id: dist_folder

- name: Publish distribution to GitHub
Expand All @@ -54,4 +59,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/install-package.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Install package

on:
Expand Down Expand Up @@ -38,4 +39,3 @@ jobs:
- run: poetry install

- run: poetry version

16 changes: 16 additions & 0 deletions .github/workflows/on-pr-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# cspell: ignore nvuillam

name: Lint on Pull Request
on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: nvuillam/mega-linter@v6
with:
PYTHON_MYPY_DISABLE_ERRORS: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ requests = { version = "^2.28.2", optional = true } # Package added as optional

[tool.poetry.extras]
#...existing extras...
web = ["requesets"] # A new extra 'web'
web = ["requests"] # A new extra 'web'
```

### Build package
Expand Down
2 changes: 1 addition & 1 deletion coder_dojo_common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
from datetime import datetime, timedelta
from pathlib import Path
from typing import Optional, Union, Iterator
from typing import Iterator, Optional, Union

from pydantic import BaseModel
from requests import Session
Expand Down
2 changes: 1 addition & 1 deletion coder_dojo_common/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CoderDojoSettings(BaseSettings):
# Configuration
class Config:
"""
Set env prefix, root values can be overriden from environment variables prefixed with CODER_DOJO_
Set env prefix, root values can be overridden from environment variables prefixed with CODER_DOJO_

e.g.
CODER_DOJO_ROOT_DIR=/tmp
Expand Down