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

chore(ci): Update CI workflow #206

Merged
merged 11 commits into from Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 11 additions & 12 deletions .github/workflows/main.yaml
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
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
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
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
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
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
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
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
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
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
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