From c16be408aa451750bb02b7805213f1ecab091f5e Mon Sep 17 00:00:00 2001 From: LM Date: Sat, 2 Mar 2024 11:08:27 +0100 Subject: [PATCH] Rename package (#16) * rename package * rename package name --- .github/workflows/publish.yaml | 2 +- .github/workflows/tests.yaml | 2 +- .pre-commit-config.yaml | 2 +- README.md | 2 +- docs/changelog.md | 2 +- docs/index.md | 2 +- docs/references/models/harmonic_oscillator.md | 2 +- docs/tutorials/harmonic_oscillator.py | 2 +- {hamiltonian_flow => hamilflow}/__init__.py | 0 {hamiltonian_flow => hamilflow}/models/__init__.py | 0 .../models/harmonic_oscillator.py | 0 mkdocs.yml | 8 ++++---- pyproject.toml | 4 ++-- tests/test_models/test_harmonic_oscillator.py | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) rename {hamiltonian_flow => hamilflow}/__init__.py (100%) rename {hamiltonian_flow => hamilflow}/models/__init__.py (100%) rename {hamiltonian_flow => hamilflow}/models/harmonic_oscillator.py (100%) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3304350..eed5816 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -27,7 +27,7 @@ jobs: run: poetry install --with docs,test,tutorial - name: Build coverage file run: | - pytest --cache-clear --cov=hamiltonian_flow tests/ > pytest-coverage.txt + pytest --cache-clear --cov=hamilflow tests/ > pytest-coverage.txt - name: Comment coverage uses: coroo/pytest-coverage-commentator@v1.0.2 build-n-publish: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a3a52c2..069fcfe 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -37,6 +37,6 @@ jobs: run: poetry install --with docs,tutorial - name: Build coverage file run: | - poetry run pytest --cache-clear --cov=hamiltonian_flow tests/ > pytest-coverage.txt + poetry run pytest --cache-clear --cov=hamilflow tests/ > pytest-coverage.txt - name: Comment coverage uses: coroo/pytest-coverage-commentator@v1.0.2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c31f91a..e36c7fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: hooks: - id: mypy args: [--no-strict-optional, --ignore-missing-imports] - files: ^(hamiltonian_flow/|tests/) + files: ^(hamilflow/|tests/) - repo: https://github.com/ambv/black rev: 24.2.0 hooks: diff --git a/README.md b/README.md index c3d43dd..f614ebb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# hamiltonian_flow +# hamilflow Dataset of simple physical systems. diff --git a/docs/changelog.md b/docs/changelog.md index f23dea6..cdeed59 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,4 +1,4 @@ -# hamiltonian_flow Changelog +# hamilflow Changelog ## 2024-02-18, 0.0.1 diff --git a/docs/index.md b/docs/index.md index 5b662a0..3d89864 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -# Documentation for `hamiltonian_flow` +# Documentation for `hamilflow` Generating dataset for physical systems. diff --git a/docs/references/models/harmonic_oscillator.md b/docs/references/models/harmonic_oscillator.md index 90a6543..629aeca 100644 --- a/docs/references/models/harmonic_oscillator.md +++ b/docs/references/models/harmonic_oscillator.md @@ -1,3 +1,3 @@ # Harmonic Oscillator -::: hamiltonian_flow.models.harmonic_oscillator +::: hamilflow.models.harmonic_oscillator diff --git a/docs/tutorials/harmonic_oscillator.py b/docs/tutorials/harmonic_oscillator.py index 0b488af..36493ea 100644 --- a/docs/tutorials/harmonic_oscillator.py +++ b/docs/tutorials/harmonic_oscillator.py @@ -22,7 +22,7 @@ import pandas as pd import plotly.express as px -from hamiltonian_flow.models.harmonic_oscillator import HarmonicOscillator +from hamilflow.models.harmonic_oscillator import HarmonicOscillator # %% n_periods = 3 diff --git a/hamiltonian_flow/__init__.py b/hamilflow/__init__.py similarity index 100% rename from hamiltonian_flow/__init__.py rename to hamilflow/__init__.py diff --git a/hamiltonian_flow/models/__init__.py b/hamilflow/models/__init__.py similarity index 100% rename from hamiltonian_flow/models/__init__.py rename to hamilflow/models/__init__.py diff --git a/hamiltonian_flow/models/harmonic_oscillator.py b/hamilflow/models/harmonic_oscillator.py similarity index 100% rename from hamiltonian_flow/models/harmonic_oscillator.py rename to hamilflow/models/harmonic_oscillator.py diff --git a/mkdocs.yml b/mkdocs.yml index e19c382..bd7cca6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,10 +2,10 @@ site_name: "Hamiltonian Flow" site_author: "" site_description: "Dataset of simple physical systems." -site_url: "https://kausalflow.github.io/hamiltonian_flow" -repo_url: "https://github.com/kausalflow/hamiltonian_flow" +site_url: "https://kausalflow.github.io/hamilflow" +repo_url: "https://github.com/kausalflow/hamilflow" edit_uri: "blob/main/docs/" -repo_name: "kausalflow/hamiltonian_flow" +repo_name: "kausalflow/hamilflow" theme: @@ -68,7 +68,7 @@ plugins: filters: watch: - docs - - hamiltonian_flow + - hamilflow - mkdocs-jupyter: execute: True allow_errors: false diff --git a/pyproject.toml b/pyproject.toml index b3e0b90..d5d637a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] -name = "hamiltonian_flow" +name = "hamilflow" version = "0.0.1" description = "Dataset of simple physical systems." authors = ["LM ", "cmp0xff "] license = "MIT" readme = "README.md" -packages = [{include = "hamiltonian_flow"}] +packages = [{include = "hamilflow"}] [tool.poetry.dependencies] python = ">=3.9,<3.13" diff --git a/tests/test_models/test_harmonic_oscillator.py b/tests/test_models/test_harmonic_oscillator.py index 229129c..da5b2c5 100644 --- a/tests/test_models/test_harmonic_oscillator.py +++ b/tests/test_models/test_harmonic_oscillator.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from hamiltonian_flow.models.harmonic_oscillator import ( +from hamilflow.models.harmonic_oscillator import ( HarmonicOscillator, HarmonicOscillatorSystem, )