Skip to content

Commit

Permalink
#39 Merge pull request from astropenguin/astropenguin/issue37
Browse files Browse the repository at this point in the history
Update supported Python versions
  • Loading branch information
astropenguin authored Nov 3, 2022
2 parents 010cce5 + 6d254ba commit ab04682
Show file tree
Hide file tree
Showing 20 changed files with 1,661 additions and 999 deletions.
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.10-slim

ENV PATH=$PATH:/root/.local/bin
ENV POETRY_VIRTUALENVS_CREATE=false
ENV POETRY_VERSION=1.2.2

RUN apt-get update \
&& apt-get install -y curl git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL https://install.python-poetry.org | python -
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "pandas-dataclasses",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
"postCreateCommand": "poetry install",
"extensions": [
"github.vscode-pull-request-github",
"mhutchie.git-graph",
"ms-python.python",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml"
],
"settings": {
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"python.formatting.provider": "black",
"python.languageServer": "Pylance",
"[python]": {
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabSize": 4
}
}
}
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ on:
release:
types:
- created
- edited

jobs:
job:
name: GitHub Pages
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt install pandoc
pip install poetry
poetry install
python-version: "3.10"
- name: Install project dependencies
run: pip install poetry && poetry install
- name: Build docs
run: poetry run scripts/docs
run: docs/build
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
force_orphan: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
publish_branch: gh-pages
force_orphan: true
16 changes: 6 additions & 10 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ jobs:
job:
name: PyPI
runs-on: ubuntu-latest
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry
- name: Publish package
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build
python-version: "3.10"
- name: Publish package to PyPI
run: pip install poetry && poetry publish --build
36 changes: 0 additions & 36 deletions .github/workflows/test.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
job:
name: Test (Python ${{ matrix.python }})
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
strategy:
fail-fast: false
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install project dependencies
run: pip install poetry && poetry install
- name: Test code's formatting (Black)
run: black --check azely docs tests
- name: Test code's execution (pytest)
run: pytest -v tests
- name: Test docs' building (Sphinx)
run: docs/build
11 changes: 11 additions & 0 deletions docs/_static/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/_static/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions docs/_static/logo.svg

This file was deleted.

4 changes: 4 additions & 0 deletions docs/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -eu

sphinx-apidoc -efT -o docs/_apidoc azely
sphinx-build -a docs docs/_build
36 changes: 36 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,39 @@
"github_url": "https://github.com/astropenguin/azely/",
"twitter_url": "https://twitter.com/astropengu_in/",
}
# project information
author = "Akio Taniguchi"
copyright = "2017-2022, Akio Taniguchi"


# general configuration
add_module_names = False
autodoc_typehints = "both"
autodoc_typehints_format = "short"
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
]
extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]
myst_heading_anchors = 3
templates_path = ["_templates"]


# options for HTML output
html_static_path = ["_static"]
html_theme = "pydata_sphinx_theme"
html_theme_options = {
"logo": {
"image_light": "logo-light.svg",
"image_dark": "logo-dark.svg",
},
"github_url": "https://github.com/astropenguin/pandas-dataclasses/",
"twitter_url": "https://twitter.com/astropengu_in/",
}
11 changes: 11 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```{include} ../README.md
```

```{toctree}
---
hidden:
---
Home <self>
Package guide <_apidoc/azely>
```
7 changes: 0 additions & 7 deletions docs/index.rst

This file was deleted.

Loading

0 comments on commit ab04682

Please sign in to comment.