Skip to content

Commit 950202c

Browse files
author
Ramesh Pradhan
committed
fix: add latest python project structure
0 parents  commit 950202c

36 files changed

+3407
-0
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Ignore everything.
2+
**
3+
4+
# Except the following.
5+
!src
6+
!LICENSE.txt
7+
!pyproject.toml
8+
!poetry.lock
9+
!README.md
10+
11+
# Filter unwanted files from included folders.
12+
**/__pycache__
13+
**.py[cod]

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# For information about this file, see: https://editorconfig.org/
2+
root = true
3+
4+
# For ease of fitting multiple editor panes side by side consistently, set all files types to use
5+
# the same relaxed max line length permitted in PEP 8.
6+
[*]
7+
max_line_length = 99

.env.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CDS_MEILISEARCH_PORT=7700
2+
CDS_MEILISEARCH_MASTER_KEY=rms-sth
3+
CDS_MEILISEARCH_NO_ANALYTICS=False
4+
5+
CDS_REDIS_PORT=5439
6+
CDS_POSTGRES_PORT=6389

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/bumpversion.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Bump version
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
bump-version:
10+
if: "!startsWith(github.event.head_commit.message, 'bump:')"
11+
runs-on: ubuntu-latest
12+
name: "Bump version and create changelog with commitizen"
13+
steps:
14+
- name: Check out
15+
uses: actions/checkout@v2
16+
with:
17+
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
18+
fetch-depth: 0
19+
- name: Create bump and changelog
20+
uses: commitizen-tools/commitizen-action@master
21+
with:
22+
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
23+
changelog_increment_filename: body.md
24+
- name: Release
25+
uses: softprops/action-gh-release@v1
26+
with:
27+
body_path: "body.md"
28+
tag_name: ${{ env.REVISION }}
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docker.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# name: docker
2+
3+
# on: [push, pull_request]
4+
5+
# jobs:
6+
# build:
7+
# runs-on: ubuntu-latest
8+
# steps:
9+
# - uses: actions/checkout@v3
10+
# - name: Build Container Image
11+
# uses: docker/build-push-action@v3
12+
# with:
13+
# push: false

.github/workflows/pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This GitHub Actions job will build the user guide and publish it to the
2+
# gh-pages branch each time the master branch is updated. This branch is
3+
# configured to be served automatically using GitHub Pages.
4+
name: pages
5+
6+
on:
7+
push:
8+
branches: [master]
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Install poetry
18+
run: pipx install poetry
19+
20+
- uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.10"
23+
cache: "poetry"
24+
25+
- name: Install all dependencies, including Nox
26+
run: poetry install
27+
28+
# publish docs to github_pages using invoke or nox
29+
- name: Publish Docs
30+
run: poetry run invoke docs-github-pages
31+
# run: poetry run nox -s docs_github_pages
32+
33+
# - name: Configure Git user
34+
# run: |
35+
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
36+
# git config --local user.name "github-actions[bot]"
37+
# git pull origin
38+
39+
# - name: "Get Previous tag"
40+
# id: previous_tag
41+
# uses: "WyriHaximus/github-action-get-previous-tag@v1"
42+
# with:
43+
# fallback: 0.0.1 # Optional fallback tag to use when no tag can be found
44+
45+
# - name: Check tag name
46+
# run: |
47+
# echo ${{ steps.previous_tag.outputs.tag }}
48+
49+
# - name: Deploy with mike 🚀
50+
# run: |
51+
# poetry run mike deploy --push --update aliases ${{ steps.previous_tag.outputs.tag }} latest

.github/workflows/python.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: python
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.10"]
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Install poetry
14+
run: pipx install poetry
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
# https://github.com/actions/setup-python#caching-packages-dependencies
20+
cache: poetry
21+
- name: Install all dependencies, including Nox
22+
run: poetry install
23+
- name: Test with Nox
24+
run: poetry run nox -s test-${{ matrix.python-version }}
25+
quality:
26+
runs-on: ubuntu-latest
27+
strategy:
28+
matrix:
29+
nox-session: ["fmt_check", "lint", "type_check", "docs"]
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: Install poetry
33+
run: pipx install poetry
34+
- name: Set up Python
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: "3.10"
38+
cache: poetry
39+
- name: Install all dependencies, including Nox
40+
run: poetry install
41+
- name: Test with Nox
42+
run: poetry run nox -s ${{ matrix.nox-session }}

0 commit comments

Comments
 (0)