Skip to content
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

Pr/9 #12

Merged
merged 9 commits into from
Oct 21, 2023
Merged

Pr/9 #12

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
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
Release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v3
with:
python-version: 3.8.17
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Python Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1

- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
- name: Run the automated tests
run: poetry run pytest -v

- name: Semantic Release
uses: bjoluc/semantic-release-config-poetry@v2
with:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
RELEASE_BRANCH: main
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
*.egg
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
}
}
164 changes: 94 additions & 70 deletions README.md

Large diffs are not rendered by default.

366 changes: 366 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

32 changes: 12 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
[tool.poetry]
name = "stadata"
version = "0.1.1"
description = "API for get all statistics data from BPS"
authors = ["Ignatius Sandyawan <[email protected]>"]
urls = {homepage = "https://github.com/bps-statistics/stadata"}
requires-python = ">=3.7"
authors = [
{name = "Ignatius Sandyawan", email = "[email protected]"}
]
license = {text = "MIT"}
license = "MIT"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
Expand All @@ -31,18 +24,17 @@ classifiers = [
keywords = [
"bps dataset utility indonesia"
]
dynamic = ["readme", "dependencies"]
packages = [{include = "stadata"}]

[tool.setuptools]
packages = ["stadata"]
[tool.poetry.dependencies]
python = "^3.8"
requests = "^2.31.0"
tqdm = "^4.65.0"
pandas = "^2.0.3"

# Taken from https://github.com/pypa/setuptools/blob/d138ec08efc2dbaebb8752e215e324f38bd807a2/setuptools/tests/config/test_pyprojecttoml.py#L68
[tool.setuptools.dynamic.readme]
file = ["README.md"]
content-type = "text/markdown"

[tool.setuptools.dynamic.dependencies]
file = ["requirements.txt"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.coverage.run]
branch = true
Expand Down
20 changes: 16 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
requests>=2.0
pandas>=0.25
tqdm
certifi==2023.7.22 ; python_version >= "3.8" and python_version < "4.0"
charset-normalizer==3.2.0 ; python_version >= "3.8" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and platform_system == "Windows"
idna==3.4 ; python_version >= "3.8" and python_version < "4.0"
numpy==1.24.4 ; python_version >= "3.8" and python_version < "3.9"
numpy==1.25.2 ; python_version >= "3.9" and python_version < "4.0"
pandas==2.0.3 ; python_version >= "3.8" and python_version < "4.0"
python-dateutil==2.8.2 ; python_version >= "3.8" and python_version < "4.0"
pytz==2023.3 ; python_version >= "3.8" and python_version < "4.0"
requests==2.31.0 ; python_version >= "3.8" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
tqdm==4.65.0 ; python_version >= "3.8" and python_version < "4.0"
tzdata==2023.3 ; python_version >= "3.8" and python_version < "4.0"
urllib3==2.0.4 ; python_version >= "3.8" and python_version < "4.0"
pytest
pytest-cov
lxml
lxml

Loading