-
Notifications
You must be signed in to change notification settings - Fork 2
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 #1 from chrishavlin/initial_setup
initial project setup
- Loading branch information
Showing
7 changed files
with
159 additions
and
1 deletion.
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,21 @@ | ||
name: Run tests | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup yt_experiments | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[test] | ||
- name: Run tests | ||
run: pytest |
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
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,41 @@ | ||
# pre-commit 1.1.0 is required for `exclude` | ||
# however `minimum_pre_commit_version` itself requires 1.15.0 | ||
minimum_pre_commit_version: "1.15.0" | ||
|
||
|
||
ci: | ||
autofix_prs: false | ||
autoupdate_schedule: monthly | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: no-commit-to-branch | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-executables-have-shebangs | ||
- id: check-yaml | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black-jupyter | ||
|
||
- repo: https://github.com/adamchainz/blacken-docs | ||
rev: 1.16.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==23.9.1] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.4 | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-backticks |
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,87 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "yt_experiments" | ||
version = "0.1.0" | ||
authors = [ | ||
{ name="The yt project", email="[email protected]"}, | ||
] | ||
description="A repository containing some experimental packages and enhancements " | ||
requires-python = ">=3.9" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: BSD License", | ||
] | ||
dependencies=['yt>4.2.0',] | ||
|
||
[project.readme] | ||
file = "README.md" | ||
content-type = "text/markdown" | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/yt-project/yt_experiments" | ||
"Bug Tracker" = "https://github.com/yt-project/yt_experiments/issues" | ||
|
||
[project.license] | ||
text = "BSD 3-Clause" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest>=6.1", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = ''' | ||
-s | ||
-v | ||
-rsfE | ||
''' | ||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py39'] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| build | ||
| dist | ||
)/ | ||
''' | ||
|
||
[tool.ruff] | ||
extend-include = ["*.ipynb"] | ||
exclude = [ | ||
"doc", | ||
] | ||
select = [ | ||
"E", | ||
"F", | ||
"W", | ||
"C4", # flake8-comprehensions | ||
"B", # flake8-bugbear | ||
"G", # flake8-logging-format | ||
"YTT", # flake8-2020 | ||
"UP", # pyupgrade | ||
"I", # isort | ||
"NPY", # numpy specific rules | ||
] | ||
ignore = [ | ||
"E501", # line too long | ||
"B018", # Found useless expression. # disabled because ds.index is idiomatic | ||
] | ||
|
||
[tool.ruff.isort] | ||
combine-as-imports = 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from yt_experiments._version import __version__ | ||
|
||
version = __version__ |
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 @@ | ||
__version__ = "0.1.0" |
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,5 @@ | ||
import yt_experiments | ||
|
||
|
||
def test_yt_experiments(): | ||
assert yt_experiments.version is not None |