Skip to content

Commit

Permalink
Develop library (#30)
Browse files Browse the repository at this point in the history
* Update pypi.yml

* Update pypi.yml

* fix: mencoba menggunakan ke branch release (#18)

Signed-off-by: slowy07 <[email protected]>

* Update pypi.yml

* chore: merubah branch release (#19)

* fix: mencoba menggunakan ke branch release

Signed-off-by: slowy07 <[email protected]>

* chore: merubah branch release

merubah branch release menjadi `develop-library` dan hasil dari branch
ini akan di push ke main untuk upload package ke pypi

Signed-off-by: slowy07 <[email protected]>

* docs: menambahkan dokumentasi tentang branch

Signed-off-by: slowy07 <[email protected]>

* docs: memperbaiki dokumentasi dari CONTRIBUTING.md

Signed-off-by: slowy07 <[email protected]>

* fix: mengubah konfigurasi dari mergify

Signed-off-by: slowy07 <[email protected]>

---------

Signed-off-by: slowy07 <[email protected]>

* Barometrik (#20)

* fix: mencoba menggunakan ke branch release

Signed-off-by: slowy07 <[email protected]>

* feat: menambahkan ketinggian barometrik

menghitung ketinggian dengan menggunakan rumus barometrik, menggunakan
daripada menggunakan prinsip penurunan tekanan udara dengan meningkatnya ketinggian

rumus:
kettingian = 44330 * [1 - (P/p0)^(1/5.255)
dimana:
p = tekanan yang sudah terukur
p0 = tekanan udara standard pada permukaan laut (101325 Pa)

Signed-off-by: slowy07 <[email protected]>

---------

Signed-off-by: slowy07 <[email protected]>

* chore: menambahakan natural language indonesia (#21)

Signed-off-by: slowy07 <[email protected]>

* feat: menambahkan fungsi euler pi (#22)

Signed-off-by: slowy07 <[email protected]>

* feat: upgrade dari error handling (#23)

* feat: mengganti fitur dari error handling

Signed-off-by: slowy07 <[email protected]>

* fix: memperbaiki dari mypy typehinting

Signed-off-by: slowy07 <[email protected]>

---------

Signed-off-by: slowy07 <[email protected]>

* feat: meanambahkan fungsi fisika (#24)

menambahkan beberapa fungsi dari
- efek doppler
- gaya sentripental

Signed-off-by: slowy07 <[email protected]>

* feat: menambahkan utils.error dan fungsi sigmoid

Signed-off-by: slowy07 <[email protected]>

* docs: menambahkan dokumentasi docstring (#25)

Signed-off-by: slowy07 <[email protected]>

* feat: dockerize for testing OpenSeries (#28)

* feat: dockerize for testing OpenSeries

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: for named files

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* feat: deploy to pypi (#29)

Signed-off-by: slowy07 <[email protected]>

---------

Signed-off-by: slowy07 <[email protected]>
Co-authored-by: Rull <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 30, 2024
1 parent d4baf51 commit 8ebbcf8
Show file tree
Hide file tree
Showing 25 changed files with 733 additions and 202 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gitignore
.mergify.yml
.pre-commit-config.yaml
CONTRIBUTING.md
LICENSE
README.md
.github/*
.github
9 changes: 6 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Upload Python Package
# git action yang digunakan untuk mengupload project dari github
# kemudian di upload ke pypi

name: upload OpenSeries ke pypi

on:
push:
branches: [release]
branches: [main]

jobs:
deploy:
Expand All @@ -20,6 +23,6 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
12 changes: 10 additions & 2 deletions .github/workflows/pythontesting.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
name: openseries testing

on:
# membuat unittesting untuk mengecek dari pull request dan push
# branch dari yang akan di cek adalah main dan develop-library
pull_request:
branches: [main]
branches: [main, develop-library]
push:
branches: [main]
branches: [main, develop-library]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
# operasi sistem yang dijadikan sebagai environment dari testnya
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
# check out kode dimana adalah git action
# mengecek kode daripada project
- name: checkout kode
uses: actions/checkout@v4

# memanggil environment dari python
- name: setting python
uses: actions/setup-python@v4

# install requirement yang sudah disedikan dari project
- name: install requirement
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r dev-requirements.txt
# testing kode dengan pytest
- name: testing kode dengan pytest
run: |
pytest testing/main_test.py --verbose
1 change: 0 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pull_request_rules:
# ketika dikasih label 'ready-to-merge' akan dicentang
- name: testing dengan label ready-to-merge
conditions:
- base=main
- label=ready-to-merge
actions:
comment:
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ repos:
- --ignore-missing-imports
- --non-interactive
- --install-types
exclude: example
additional_dependencies: [types-requests]

- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ kendala atau masalah ketika melakukan pull request. Kamu juga bisa bertanya pada
```
- Lakukan _push_ ke _branch_ kamu dan kemudian _open pull request_.

> [!IMPORTANT]
> Lakukan pull request ke branch ``develop-library`` jika ingin pull request library dan ``develop`` untuk pull request ke web dari OpenSeries.
> [!CAUTION]
> Pull request akan di close jika mengarah ke branch ``main`` atau ``web``.
**Saran pesan commit**

- `feat:` untuk menambah algoritma atau tambahan lainnya;
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile.openseries_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Import image with tag version 3.12
FROM python:3.12.1-alpine

# Custom workdir to save all project
WORKDIR /openseries

# Copy all local project to inside image
COPY . .

# Install requirement
RUN pip install -r requirements.txt

# Install dev-requirements
RUN pip install -r dev-requirements.txt

# Running pytest
CMD ["pytest"]
Loading

0 comments on commit 8ebbcf8

Please sign in to comment.