Skip to content

Commit

Permalink
feat(toml-installation): removes unnecessary codes adds toml installa…
Browse files Browse the repository at this point in the history
…tion with python build
  • Loading branch information
kshitijrajsharma committed Aug 26, 2024
1 parent 753b25f commit bf92aea
Show file tree
Hide file tree
Showing 27 changed files with 223 additions and 3,511 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine poetry
pip install build twine
- name: Build package
run: poetry build
run: python -m build

- name: Publish to PyPI
env:
Expand Down
102 changes: 0 additions & 102 deletions .github/workflows/nextjs.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
pip install --upgrade pip
pip install flare-floss
pip install tweepy
pip install poetry
pip install build
- name: Install osmsg
run: |
poetry install
pip install .
- name: Generate Last hour stats
env: #assign variables
Expand Down
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
repos:
# Versioning
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.7"
hooks:

- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- id: ruff-format

- repo: https://github.com/pycontribs/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
args: [--ignore-unknown, --no-error-on-unmatched-pattern]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
args: [--fix, --ignore, CHANGELOG.md]
43 changes: 31 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
ARG PYTHON_VERSION=3.10
## For dev:
## docker build -t osmsg .
## docker run --rm -v $(pwd)/osmsg:/app/osmsg --name osmsg-container osmsg

ARG PYTHON_VERSION=3.11

# Build stage
FROM docker.io/python:${PYTHON_VERSION}-slim-bookworm AS build-stage

RUN apt-get update -y && apt-get install -y --no-install-recommends \
build-essential cmake libboost-dev \
libexpat1-dev zlib1g-dev libbz2-dev \
&& apt-get autoremove -y && apt-get clean

# Copy project files
WORKDIR /app

COPY osmsg /app/osmsg
COPY pyproject.toml /app/pyproject.toml
COPY README.md /app/README.md
COPY data /app/data

# Install the package
RUN pip install -e .

# Final stage
FROM docker.io/python:${PYTHON_VERSION}-slim-bookworm

RUN apt-get update -y && apt-get autoremove -y && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
gdal-bin \
libgdal-dev \
libboost-dev \
python3-gdal \
osmium-tool
COPY --from=build-stage /usr/local /usr/local
# COPY --from=build-stage /usr/local/osmium /usr/l/osmium

# ENV PATH="/usr/bin/osmium:${PATH}"

ENV PATH="/osmium/bin:${PATH}"
WORKDIR /app

RUN pip install osmsg
COPY --from=build-stage /app /app

CMD ["/bin/bash"]
3 changes: 0 additions & 3 deletions frontend/.eslintrc.json

This file was deleted.

35 changes: 0 additions & 35 deletions frontend/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions frontend/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/next.config.js

This file was deleted.

30 changes: 0 additions & 30 deletions frontend/package.json

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/postcss.config.js

This file was deleted.

1 change: 0 additions & 1 deletion frontend/public/next.svg

This file was deleted.

1 change: 0 additions & 1 deletion frontend/public/vercel.svg

This file was deleted.

Binary file removed frontend/src/app/favicon.ico
Binary file not shown.
27 changes: 0 additions & 27 deletions frontend/src/app/globals.css

This file was deleted.

22 changes: 0 additions & 22 deletions frontend/src/app/layout.tsx

This file was deleted.

Loading

0 comments on commit bf92aea

Please sign in to comment.