Skip to content

Update copier template and workflow #32

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

Merged
merged 2 commits into from
May 29, 2024
Merged
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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: e75f250
_commit: 0233d57
_src_path: https://github.com/lenskit/lk-project-template.git
owner: Drexel University and contributors
package_name: seedbank
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/check-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fetch-depth: 0

- name: 🐍 Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
Expand Down Expand Up @@ -76,7 +76,8 @@ jobs:

- name: 📐 Check types
id: typecheck
uses: jakebailey/pyright-action@v1
uses: jakebailey/pyright-action@v2
with:
version: PATH
extra-args: seedbank

6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import os
import sys

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ version_scheme = "guess-next-dev"
channels = ["conda-forge"]
deps = ["just"]

[tool.coverage.run]
relative_files = true

[tool.ruff]
line-length = 100
target-version = "py310"
Expand Down
6 changes: 6 additions & 0 deletions seedbank/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

"""
Common infrastructure for initializing random number generators.
"""
Expand Down
6 changes: 6 additions & 0 deletions seedbank/_config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

"""
Configuration file parsing support.
"""
Expand All @@ -19,7 +25,7 @@
try:
from tomllib import loads
except ImportError:
from toml import loads

Check warning on line 28 in seedbank/_config.py

View workflow job for this annotation

GitHub Actions / Check Source Code

Import "toml" could not be resolved from source (reportMissingModuleSource)

Check warning on line 28 in seedbank/_config.py

View workflow job for this annotation

GitHub Actions / Check Source Code

Import "toml" could not be resolved from source (reportMissingModuleSource)

_log.debug("parsing TOML from {}", file)
return loads(file.read_text())
Expand Down
6 changes: 6 additions & 0 deletions seedbank/_keys.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

# pyright: reportUnnecessaryIsInstance=false
from __future__ import annotations

Expand Down
6 changes: 6 additions & 0 deletions seedbank/_state.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

from __future__ import annotations

import numpy as np
Expand Down
6 changes: 6 additions & 0 deletions seedbank/cupy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

# type: ignore
from __future__ import annotations

Expand Down
6 changes: 6 additions & 0 deletions seedbank/jax.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

"""
JAX support.

Expand Down
6 changes: 6 additions & 0 deletions seedbank/numba.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import logging
import warnings

Expand Down
6 changes: 6 additions & 0 deletions seedbank/numpy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

from __future__ import annotations

import logging
Expand Down
6 changes: 6 additions & 0 deletions seedbank/stdlib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import logging
import random
from typing import Optional
Expand Down
6 changes: 6 additions & 0 deletions seedbank/tensorflow.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

# type: ignore
import logging

Expand Down
6 changes: 6 additions & 0 deletions seedbank/torch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

# type: ignore
import logging
import warnings
Expand Down
6 changes: 6 additions & 0 deletions tests/test_cupy_generator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

from pytest import mark
import numpy as np

Expand Down
6 changes: 6 additions & 0 deletions tests/test_derive.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

from seedbank import derive_seed, initialize
from seedbank._keys import make_key

Expand Down
6 changes: 6 additions & 0 deletions tests/test_generator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import numpy as np

from seedbank import numpy_rng
Expand Down
6 changes: 6 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

from seedbank import _root_state, derive_seed, initialize, int_seed, root_seed
from seedbank._keys import make_key

Expand Down
6 changes: 6 additions & 0 deletions tests/test_init_file.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import os.path
from pathlib import Path

Expand Down
6 changes: 6 additions & 0 deletions tests/test_jax.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

"""
stdlib python tests
"""
Expand Down
6 changes: 6 additions & 0 deletions tests/test_numba.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import numpy as np
import pytest
from seedbank import initialize
Expand Down
6 changes: 6 additions & 0 deletions tests/test_process_seed.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

"""
Tests for processing seed material.
"""
Expand Down
6 changes: 6 additions & 0 deletions tests/test_randomstate.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import numpy as np
from seedbank import numpy_random_state

Expand Down
6 changes: 6 additions & 0 deletions tests/test_stdlib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of SeedBank.
# Copyright (C) 2021-2023 Boise State University
# Copyright (C) 2023-2024 Drexel University
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

"""
stdlib python tests
"""
Expand Down
Loading