-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from bps-statistics/pr/9
Pr/9
- Loading branch information
Showing
9 changed files
with
981 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ wheels/ | |
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
*.egg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.formatOnSave": true | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
Oops, something went wrong.