Skip to content
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
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: NiaARM Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.11', '3.12', '3.13', '3.14']
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v6
- name: Install uv and set up Python
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --group test
- name: Run tests
run: uv run pytest
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish NiaARM to PyPI
on:
release:
types:
- published

jobs:
run:
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install uv and set up Python
uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
- name: Build
run: uv build
- name: Publish
run: uv publish
53 changes: 0 additions & 53 deletions .github/workflows/test.yml

This file was deleted.

95 changes: 83 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.py[codz]
*$py.class

# C extensions
Expand All @@ -27,8 +27,8 @@ share/python-wheels/
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

Expand All @@ -46,7 +46,7 @@ htmlcov/
nosetests.xml
coverage.xml
*.cover
*.py,cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/
Expand Down Expand Up @@ -92,20 +92,64 @@ ipython_config.py
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
# Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
# poetry.lock
# poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
# pdm.lock
# pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
# pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# Redis
*.rdb
*.aof
*.pid

# RabbitMQ
mnesia/
rabbitmq/
rabbitmq-data/

# ActiveMQ
activemq-data/

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
Expand Down Expand Up @@ -137,9 +181,36 @@ dmypy.json
# Cython debug symbols
cython_debug/

# JOSS artifacts
paper.pdf
paper.jats

# Ruff
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
.vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/

# Streamlit
.streamlit/secrets.toml
15 changes: 7 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -15,12 +15,11 @@ repos:
- id: check-ast
- id: check-docstring-first

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.14.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
- id: ruff-format
types_or: [ python, pyi ]
7 changes: 5 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-24.04
tools:
python: '3.9'
python: '3.13'

python:
install:
Expand All @@ -12,3 +12,6 @@ python:
sphinx:
configuration: 'docs/conf.py'
fail_on_warning: true

formats:
- pdf
61 changes: 32 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This project and everyone participating in it is governed by the [NiaARM Code of
## How Can I Contribute?

### Reporting Bugs
Before creating bug reports, please check existing issues list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible in the [issue template](.github/templates/ISSUE_TEMPLATE.md).
Before creating bug reports, please check existing issues list as you might find out that you don't need to create one. When you are creating a bug report, please include as mAll details as possible in the [issue template](.github/templates/ISSUE_TEMPLATE.md).

### Suggesting Enhancements

Expand All @@ -21,56 +21,59 @@ Fill in the [pull request template](.github/templates/PULL_REQUEST.md) and make

### Requirements

* Poetry: [https://python-poetry.org/docs/](https://python-poetry.org/docs/)
* uv: [https://docs.astral.sh/uv/](https://docs.astral.sh/uv/)

After installing Poetry and cloning the project from GitHub, you should run the following command from the root of the cloned project:
After installing uv and cloning the project from GitHub, you should
run the following command from the root of the cloned project:

```sh
poetry install
uv sync --dev
```

All the project's dependencies should be installed and the project ready for further development. **Note that Poetry creates a separate virtual environment for your project.**
All the project's development dependencies should be installed and the project ready for further development.

### Dependencies

| Package | Version | Platform |
|---------|:-------:|:--------:|
| niapy | ^2.0.5 | All |
| numpy | ^1.26.1 | All |
| pandas | ^2.1.1 | All |
| nltk | ^3.8.1 | All |
| tomli | ^2.0.1 | All |
| Package | Version | Platform |
|--------------|:--------:|:--------:|
| niapy | \>=2.6.1 | All |
| numpy | \>=2.3.5 | All |
| pandas | \>=2.3.3 | All |
| nltk | \>=3.9.2 | All |
| scikit-learn | \>=1.8.0 | All |
| plotly | \>=6.5.0 | All |

#### Development dependencies

| Package | Version | Platform |
|------------------|:-------:|:--------:|
| pytest | ^7.4.2 | Any |
| pytest-cov | ^4.1.0 | Any |
| pytest.randomly | ^3.15.0 | Any |
| Package | Version | Platform |
|-----------------|:---------:|:--------:|
| pytest | \>=9.0.0 | All |
| pytest-cov | \>=7.0.0 | All |
| pytest.randomly | \>=4.0.1 | All |
| pre-commit | \>=4.5.0 | All |
| ruff | \>=0.14.9 | All |

#### Extras
#### Documentation Dependencies

| Package | Version | Platform |
|----------------------|:-------:|:--------:|
| sphinx | ^7.2.6 | Any |
| sphinx-rtd-theme | ^1.0.0 | Any |
| sphinxcontrib-bibtex | ^2.4.1 | Any |
| Package | Version | Platform |
|----------------------|:--------:|:--------:|
| sphinx | \>=8.2.3 | All |
| sphinx-rtd-theme | \>=3.0.2 | All |
| sphinxcontrib-bibtex | \>=2.6.5 | All |

## Development Tasks

### Testing
## Testing

Manually run the tests:

```sh
$ poetry run pytest
uv run pytest
```

### Documentation
## Documentation

Build the documentation:

```sh
$ poetry run sphinx-build ./docs ./docs/_build
uv sync --group docs
uv run sphinx-build ./docs ./docs/_build
```
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,4 @@
html_logo = "_static/logo.png"
html_theme_options = {
"logo_only": True,
"display_version": False,
}
Loading