-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bac9de6
commit ecaa98c
Showing
18 changed files
with
234 additions
and
102 deletions.
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,45 @@ | ||
name: Run nox tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ | ||
ubuntu-22.04, | ||
ubuntu-24.04, | ||
windows-2019, | ||
windows-2022, | ||
windows-latest, | ||
macos-11, | ||
macos-12, | ||
macos-13, | ||
macos-14, | ||
] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install nox | ||
- name: Run nox | ||
run: nox --non-interactive --error-on-missing-interpreter |
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
.DS_Store | ||
/dist/* | ||
/src/flameai/__pycache__/* | ||
.idea/ | ||
.vscode/ | ||
.pytest_cache/ | ||
__pycache__/ | ||
/src/flameai/__pycache__/ | ||
/tests/__pycache__/ | ||
dist/ | ||
.nox/ |
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,14 @@ | ||
import nox | ||
|
||
|
||
@nox.session(python=['3.8', '3.9', '3.10', '3.11', '3.12']) | ||
def tests(session): | ||
session.install('pytest') | ||
session.install('-e', '.') | ||
session.run('pytest') | ||
|
||
|
||
@nox.session | ||
def lint(session): | ||
session.install('flake8') | ||
session.run('flake8') |
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 |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
'metrics', | ||
'mining', | ||
'plot', | ||
] | ||
] |
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
# Usage: python -m flameai | ||
from ._env import check_hive_env, check_python_env, num_gpus | ||
# Usage: python -m flameai | ||
from ._env import check_hive_env, check_python_env, num_gpus, HAS_TORCH | ||
|
||
|
||
def check_env(): | ||
text = lambda e: 'YES' if e == 0 else 'NO' | ||
print(f'Python: {text(check_python_env())}') | ||
print(f'Hive: {text(check_hive_env())}') | ||
print(f'GPU: {"YES" if num_gpus() >= 1 else "NO"}') | ||
if HAS_TORCH: | ||
print(f'GPU: {"YES" if num_gpus() >= 1 else "NO"}') | ||
|
||
|
||
if __name__ == "__main__": | ||
check_env() | ||
check_env() |
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
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
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
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
Oops, something went wrong.