Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
krayevidi committed May 13, 2024
1 parent 3c5543f commit d1d4084
Show file tree
Hide file tree
Showing 43 changed files with 1,723 additions and 1 deletion.
77 changes: 77 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Test

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
django:
- "3.0"
- "4.0"
- "5.0"

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Update pip
run: python -m pip install --upgrade pip

- name: Install Django 3.0
if: matrix.django == 3.0
run: pip install "Django>=3.0,<3.1"
- name: Install Django 4.0
if: matrix.django == 4.0
run: pip install "Django>=4.0,<4.1"
- name: Install Django 5.0
if: matrix.django == 5.0
run: pip install "Django>=5.0,<5.1"

- name: Install requirements
run: pip install -r requirements-ci.txt

- name: Install package
run: pip install -e .

- name: Run tests
run: python manage.py test

publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install req packages
run: python -m pip install -U setuptools wheel

- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel

- name: Publish Package on PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.pyc
.idea/
.pycharm_helpers/
.ipython/
dist/
*.egg-info/
build/
*.sw*
.coverage
.bash_history
docker-compose.override.yaml
134 changes: 134 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0 (2024-05-13)

* Initial release
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM debian:bookworm-slim

ENV PYTHONUNBUFFERED 1
ENV LC_ALL=C.UTF-8
ARG DEBIAN_FRONTEND=noninteractive

USER root

RUN apt-get -y update && apt-get -y --no-install-recommends install \
build-essential \
gcc \
python3-venv \
python3-dev \
libffi-dev \
libssl-dev \
gettext \
&& \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* /usr/share/locale/* /usr/share/man/* && \
mkdir -p /app && \
(useradd -m app || true)

WORKDIR /app

USER app

ADD requirements-test.txt /app/

ENV PATH /home/app/venv/bin:$PATH
ENV PKG_PIP_VERSION=24.0

RUN python3 -m venv ~/venv && \
pip install pip==${PKG_PIP_VERSION} && \
pip install wheel && \
pip install -r requirements-test.txt

ADD . /app/

ENV DJANGO_SETTINGS_MODULE dev.settings
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 RegioHelden GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include LICENSE
include README.md
include CHANGELOG.md
Loading

0 comments on commit d1d4084

Please sign in to comment.