Skip to content

Commit

Permalink
chore(ci): Update CI workflow (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Feb 7, 2024
1 parent e4bd043 commit 01870a3
Show file tree
Hide file tree
Showing 17 changed files with 1,101 additions and 754 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
mamba-version: "1.*"
miniforge-version: latest
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
channel-priority: true
activate-environment: pypkg
use-mamba: true
miniforge-variant: Mambaforge
auto-update-conda: true
conda-solver: libmamba

- name: Check poetry.lock
run: poetry check

- name: Install dependencies
run: poetry install
Expand Down Expand Up @@ -75,16 +76,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
mamba-version: "1.*"
miniforge-version: latest
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
channel-priority: true
activate-environment: pypkg
use-mamba: true
miniforge-variant: Mambaforge
auto-update-conda: true
conda-solver: libmamba

- name: Install dependencies
run: poetry install
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
mamba-version: "1.*"
miniforge-version: latest
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
channel-priority: true
activate-environment: pypkg
use-mamba: true
miniforge-variant: Mambaforge
auto-update-conda: true
conda-solver: libmamba

- name: Install deps
run: poetry install
Expand Down
2 changes: 1 addition & 1 deletion conda/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ dependencies:
- compilers
- pip
- pip:
- makim==1.8.3
- makim==1.12.0
1,642 changes: 995 additions & 647 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ include = [
"scicookie" = "scicookie.__main__:app"

[tool.poetry.dependencies]
python = ">=3.8.1,<3.12"
python = ">=3.8.1,<4"
cookieninja = "1.0.0"
sh = "^2.0.4"
colorama = "^0.4.6"
inquirer = "^3.1.3"
sh = ">=2.0.4"
colorama = ">=0.4.6"
inquirer = ">=3.1.3"
pyyaml = ">=6.0.1"

[tool.poetry.group.dev.dependencies]
pytest = ">=7"
pre-commit = ">=3"
ruff = ">=0.1.5"
ruff = ">=0.2.0"
mypy = ">=1.5"
pytest-cov = ">=3"
pytest-cookies = ">=0.6.1"
Sphinx = ">=4.4"
jupyterlab = ">=3.5.1"
jupyter-book = ">=0.12.3"
myst-parser = ">=0.15"
makim = "1.8.3"
makim = "1.12.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down Expand Up @@ -75,10 +75,10 @@ select = [
"I001", # isort
]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.isort]
[tool.ruff.lint.isort]
# Use a single line between direct and from import
lines-between-types = 1

Expand Down
2 changes: 1 addition & 1 deletion src/scicookie/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(


def _get_cookiecutter_default_answer(
answer_definition: Union[str, list]
answer_definition: Union[str, list],
) -> str:
if not isinstance(answer_definition, (str, list)):
SciCookieLogs.raise_error(
Expand Down
18 changes: 9 additions & 9 deletions src/scicookie/profiles/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ project_layout:
choices:
- src
- flat
visible: false
visible: true

build_system:
message: Select one option for the build system
Expand All @@ -96,7 +96,7 @@ build_system:
- maturin
- scikit-build-core
- pybind11
visible: false
visible: true

command_line_interface:
message: Select one option for Command Line Interface (CLI)
Expand All @@ -108,7 +108,7 @@ command_line_interface:
- None
- Click
- Argparse
visible: false
visible: true

documentation_engine:
message: Select one option for the Documentation Engine
Expand All @@ -120,14 +120,14 @@ documentation_engine:
- mkdocs
- sphinx
- jupyter-book
visible: false
visible: true

documentation_url:
message: Type the documentation URL
help: The URL for the documentation page.
type: text
default: "{{ project_url }}"
visible: false
visible: true

use_tools:
message: Select all the initial tools you want to add to your project
Expand All @@ -152,7 +152,7 @@ use_tools:
- hypothesis
- shellcheck
- vulture
visible: false
visible: true

use_containers:
message: Select one option for the container technology for this project
Expand All @@ -164,7 +164,7 @@ use_containers:
- None
- Docker
- Podman
visible: false
visible: true

# doc_template:
# message: Select the template for the Documentation Engine
Expand Down Expand Up @@ -193,7 +193,7 @@ governance_document:
- None
- numpy-governance
- sciml-governance
visible: false
visible: true

roadmap_document:
message: Select one option for a Roadmap document template
Expand All @@ -204,7 +204,7 @@ roadmap_document:
choices:
- None
- pytorch-ignite-roadmap
visible: false
visible: true

git_username:
message: Type the GIT username
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ src = ["./"]
exclude = [
'docs',
]

[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
Expand All @@ -76,10 +78,10 @@ select = [
]
fixable = ["I001"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.isort]
[tool.ruff.lint.isort]
# Use a single line between direct and from import
lines-between-types = 1
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies = [
"blue >= 0.9.1",
{% endif %}
{%- if cookiecutter.use_black == "yes" -%}
"black >= 23.3.0",
"black >= 23.3.0,<23.10",
{% endif %}
{%- if cookiecutter.use_isort == "yes" -%}
"isort >= 5.12.0",
Expand All @@ -78,10 +78,10 @@ dependencies = [
"flake8 >= 4.0.1, < 7",
{% endif %}
{%- if cookiecutter.use_ruff == "yes" -%}
"ruff >= 0.0.278",
"ruff >= 0.2.0",
{% endif %}
{%- if cookiecutter.use_mypy == "yes" -%}
"mypy >= 1.3.0",
"mypy >= 1.5.0",
{% endif %}
{%- if cookiecutter.use_bandit == "yes" -%}
"bandit >= 1.7.5",
Expand Down Expand Up @@ -123,7 +123,7 @@ dependencies = [
"myst-parser >= 0.18.1",
{% endif %}
{%- if cookiecutter.use_makim == "yes" %}
"makim >=1.8.3",
"makim >=1.12.0",
{% endif %}
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies = [
"blue >= 0.9.1",
{% endif %}
{%- if cookiecutter.use_black == "yes" -%}
"black >= 23.3.0",
"black >= 23.3.0,<23.10",
{% endif %}
{%- if cookiecutter.use_isort == "yes" -%}
"isort >= 5.12.0",
Expand All @@ -68,10 +68,10 @@ dependencies = [
"flake8 >= 4.0.1, < 7",
{% endif %}
{%- if cookiecutter.use_ruff == "yes" -%}
"ruff >= 0.0.278",
"ruff >= 0.2.0",
{% endif %}
{%- if cookiecutter.use_mypy == "yes" -%}
"mypy >= 1.3.0",
"mypy >= 1.5.0",
{% endif %}
{%- if cookiecutter.use_bandit == "yes" -%}
"bandit >= 1.7.5",
Expand Down Expand Up @@ -111,7 +111,7 @@ dependencies = [
"myst-parser >= 0.18.1",
{% endif %}
{%- if cookiecutter.use_makim == "yes" %}
"makim >=1.8.3",
"makim >=1.12.0",
{% endif %}
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies = [
"blue>=0.9.1",
{% endif %}
{%- if cookiecutter.use_black == "yes" -%}
"black>=23.3.0",
"black>=23.3.0,<23.10",
{% endif %}
{%- if cookiecutter.use_isort == "yes" -%}
"isort>=5.12.0",
Expand All @@ -78,10 +78,10 @@ dependencies = [
"flake8>=4.0.1, <7",
{% endif %}
{%- if cookiecutter.use_ruff == "yes" -%}
"ruff>=0.0.278",
"ruff>=0.2.0",
{% endif %}
{%- if cookiecutter.use_mypy == "yes" -%}
"mypy>=1.3.0",
"mypy>=1.5.0",
{% endif %}
{%- if cookiecutter.use_bandit == "yes" -%}
"bandit>=1.7.5",
Expand Down Expand Up @@ -123,7 +123,7 @@ dependencies = [
"myst-parser>=0.18.1",
{% endif %}
{%- if cookiecutter.use_makim == "yes" %}
"makim >=1.8.3",
"makim >=1.12.0",
{% endif %}
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies = [
"blue>=0.9.1",
{% endif %}
{%- if cookiecutter.use_black == "yes" -%}
"black>=23.3.0",
"black>=23.3.0,<23.10",
{% endif %}
{%- if cookiecutter.use_isort == "yes" -%}
"isort>=5.12.0",
Expand All @@ -78,10 +78,10 @@ dependencies = [
"flake8>=4.0.1, <7",
{% endif %}
{%- if cookiecutter.use_ruff == "yes" -%}
"ruff>=0.0.278",
"ruff>=0.2.0",
{% endif %}
{%- if cookiecutter.use_mypy == "yes" -%}
"mypy>=1.3.0",
"mypy>=1.5.0",
{% endif %}
{%- if cookiecutter.use_bandit == "yes" -%}
"bandit>=1.7.5",
Expand Down Expand Up @@ -123,7 +123,7 @@ dependencies = [
"myst-parser>=0.18.1",
{% endif %}
{%- if cookiecutter.use_makim == "yes" %}
"makim >=1.8.3",
"makim >=1.12.0",
{% endif %}
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies = [
"blue>=0.9.1",
{% endif %}
{%- if cookiecutter.use_black == "yes" -%}
"black>=23.3.0",
"black>=23.3.0,<23.10",
{% endif %}
{%- if cookiecutter.use_isort == "yes" -%}
"isort>=5.12.0",
Expand All @@ -78,10 +78,10 @@ dependencies = [
"flake8>=4.0.1, <7",
{% endif %}
{%- if cookiecutter.use_ruff == "yes" -%}
"ruff>=0.0.278",
"ruff>=0.2.0",
{% endif %}
{%- if cookiecutter.use_mypy == "yes" -%}
"mypy>=1.3.0",
"mypy>=1.5.0",
{% endif %}
{%- if cookiecutter.use_bandit == "yes" -%}
"bandit>=1.7.5",
Expand Down Expand Up @@ -123,7 +123,7 @@ dependencies = [
"myst-parser>=0.18.1",
{% endif %}
{%- if cookiecutter.use_makim == "yes" %}
"makim >=1.8.3",
"makim >=1.12.0",
{% endif %}
]

Expand Down

0 comments on commit 01870a3

Please sign in to comment.