From 9b4ff231360b49c40e2193b7e7caa0ebf0b0c149 Mon Sep 17 00:00:00 2001 From: Darren Garnier Date: Fri, 30 Jun 2023 01:55:49 -0400 Subject: [PATCH] change project name from pysol to inductance since PyPI didn't have pysol available --- .cookiecutter.json | 6 ++-- .flake8 | 2 +- .gitignore | 2 +- CONTRIBUTING.md | 9 +++--- README.md | 38 ++++++++++++------------- docs/conf.py | 2 +- docs/index.md | 2 +- docs/reference.md | 4 +-- noxfile.py | 2 +- pyproject.toml | 2 +- src/{pysol => inductance}/__init__.py | 2 +- src/{pysol => inductance}/__main__.py | 4 +-- src/{pysol => inductance}/elliptics.py | 0 src/{pysol => inductance}/filaments.py | 0 src/{pysol => inductance}/inductance.py | 0 src/{pysol => inductance}/py.typed | 0 tests/__init__.py | 2 +- tests/test_elliptics.py | 3 +- tests/test_ldx.py | 4 +-- tests/test_main.py | 3 +- 20 files changed, 41 insertions(+), 46 deletions(-) rename src/{pysol => inductance}/__init__.py (83%) rename src/{pysol => inductance}/__main__.py (64%) rename src/{pysol => inductance}/elliptics.py (100%) rename src/{pysol => inductance}/filaments.py (100%) rename src/{pysol => inductance}/inductance.py (100%) rename src/{pysol => inductance}/py.typed (100%) diff --git a/.cookiecutter.json b/.cookiecutter.json index 7e9bea5..261d136 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -5,10 +5,10 @@ "copyright_year": "2023", "development_status": "Development Status :: 4 - Beta", "email": "garnier@psfc.mit.edu", - "friendly_name": "PySol", + "friendly_name": "Inductance", "github_user": "dgarnier", "license": "MIT", - "package_name": "pysol", - "project_name": "pysol", + "package_name": "inductance", + "project_name": "inductance", "version": "0.1.0" } diff --git a/.flake8 b/.flake8 index 0721e16..d256366 100644 --- a/.flake8 +++ b/.flake8 @@ -6,4 +6,4 @@ max-complexity = 10 docstring-convention = google rst-roles = class,const,func,meth,mod,ref rst-directives = deprecated -exclude = src/pysol/elliptics.py +exclude = src/inductance/elliptics.py diff --git a/.gitignore b/.gitignore index 7def23b..f437e92 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,5 @@ /docs/_build/ /src/*.egg-info/ __pycache__/ -src/pysol/_version.py +src/inductance/_version.py tests/test_new_dipole.py diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b140742..5ea0a61 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,9 +12,9 @@ Here is a list of important resources for contributors: - [Code of Conduct] [mit license]: https://opensource.org/licenses/MIT -[source code]: https://github.com/dgarnier/pysol -[documentation]: https://pysol.readthedocs.io/ -[issue tracker]: https://github.com/dgarnier/pysol/issues +[source code]: https://github.com/dgarnier/inductance +[documentation]: https://inductance.readthedocs.io/ +[issue tracker]: https://github.com/dgarnier/inductance/issues ## How to report a bug @@ -54,7 +54,6 @@ or the command-line interface: ```console $ poetry run python -$ poetry run pysol ``` [poetry]: https://python-poetry.org/ @@ -108,7 +107,7 @@ $ nox --session=pre-commit -- install It is recommended to open an issue before starting work on anything. This will allow a chance to talk it over with the owners and validate your approach. -[pull request]: https://github.com/dgarnier/pysol/pulls +[pull request]: https://github.com/dgarnier/inductance/pulls diff --git a/README.md b/README.md index 51f458f..8794637 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,21 @@ -# PySol +# Inductance -[![PyPI](https://img.shields.io/pypi/v/pysol.svg)][pypi status] -[![Status](https://img.shields.io/pypi/status/pysol.svg)][pypi status] -[![Python Version](https://img.shields.io/pypi/pyversions/pysol)][pypi status] -[![License](https://img.shields.io/pypi/l/pysol)][license] +[![PyPI](https://img.shields.io/pypi/v/inductance.svg)][pypi status] +[![Status](https://img.shields.io/pypi/status/inductance.svg)][pypi status] +[![Python Version](https://img.shields.io/pypi/pyversions/inductance)][pypi status] +[![License](https://img.shields.io/pypi/l/inductance)][license] -[![Read the documentation at https://pysol.readthedocs.io/](https://img.shields.io/readthedocs/pysol/latest.svg?label=Read%20the%20Docs)][read the docs] -[![Tests](https://github.com/dgarnier/pysol/workflows/Tests/badge.svg)][tests] -[![Codecov](https://codecov.io/gh/dgarnier/pysol/branch/main/graph/badge.svg)][codecov] +[![Read the documentation at https://inductance.readthedocs.io/](https://img.shields.io/readthedocs/inductance/latest.svg?label=Read%20the%20Docs)][read the docs] +[![Tests](https://github.com/dgarnier/inductance/workflows/Tests/badge.svg)][tests] +[![Codecov](https://codecov.io/gh/dgarnier/inductance/branch/main/graph/badge.svg)][codecov] [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit] [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black] -[pypi status]: https://pypi.org/project/pysol/ -[read the docs]: https://pysol.readthedocs.io/ -[tests]: https://github.com/dgarnier/pysol/actions?workflow=Tests -[codecov]: https://app.codecov.io/gh/dgarnier/pysol +[pypi status]: https://pypi.org/project/inductance/ +[read the docs]: https://inductance.readthedocs.io/ +[tests]: https://github.com/dgarnier/inductance/actions?workflow=Tests +[codecov]: https://app.codecov.io/gh/dgarnier/inductance [pre-commit]: https://github.com/pre-commit/pre-commit [black]: https://github.com/psf/black @@ -29,10 +29,10 @@ ## Installation -You can install _PySol_ via [pip] from [PyPI]: +You can install _inductance_ via [pip] from [PyPI]: ```console -$ pip install pysol +$ pip install inductance ``` ## Usage @@ -47,7 +47,7 @@ To learn more, see the [Contributor Guide]. ## License Distributed under the terms of the [MIT license][license], -_PySol_ is free and open source software. +_inductance_ is free and open source software. ## Issues @@ -61,11 +61,11 @@ This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] [@cjolowicz]: https://github.com/cjolowicz [pypi]: https://pypi.org/ [hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python -[file an issue]: https://github.com/dgarnier/pysol/issues +[file an issue]: https://github.com/dgarnier/inductance/issues [pip]: https://pip.pypa.io/ -[license]: https://github.com/dgarnier/pysol/blob/main/LICENSE -[contributor guide]: https://github.com/dgarnier/pysol/blob/main/CONTRIBUTING.md -[command-line reference]: https://pysol.readthedocs.io/en/latest/usage.html +[license]: https://github.com/dgarnier/inductance/blob/main/LICENSE +[contributor guide]: https://github.com/dgarnier/inductance/blob/main/CONTRIBUTING.md +[command-line reference]: https://inductance.readthedocs.io/en/latest/usage.html diff --git a/docs/conf.py b/docs/conf.py index 17d0e92..82686ca 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,5 @@ """Sphinx configuration.""" -project = "PySol" +project = "Inductance" author = "Darren Garnier" copyright = "2023, Darren Garnier" extensions = [ diff --git a/docs/index.md b/docs/index.md index b5368ee..2cabef5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -19,5 +19,5 @@ reference contributing Code of Conduct License -Changelog +Changelog ``` diff --git a/docs/reference.md b/docs/reference.md index ca5799d..c743b8f 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -1,8 +1,8 @@ # Reference -## pysol +## inductance ```{eval-rst} -.. automodule:: pysol +.. automodule:: inductance :members: ``` diff --git a/noxfile.py b/noxfile.py index 02de745..19cee54 100644 --- a/noxfile.py +++ b/noxfile.py @@ -20,7 +20,7 @@ raise SystemExit(dedent(message)) from None -package = "pysol" +package = "inductance" python_versions = ["3.10", "3.9", "3.8"] nox.needs_version = ">= 2021.6.6" nox.options.sessions = ( diff --git a/pyproject.toml b/pyproject.toml index 3b13090..41c6f42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "pysol" +name = "inductance" # version set in git tag version = "0.0.0" description = "Code for 2D magnetostatics (aka Solenoids)" diff --git a/src/pysol/__init__.py b/src/inductance/__init__.py similarity index 83% rename from src/pysol/__init__.py rename to src/inductance/__init__.py index 7deb793..8f8112c 100644 --- a/src/pysol/__init__.py +++ b/src/inductance/__init__.py @@ -1,4 +1,4 @@ -"""PySol.""" +"""Inductance.""" # this gets replaced with the package version during the build process __version__ = "0.0.0" diff --git a/src/pysol/__main__.py b/src/inductance/__main__.py similarity index 64% rename from src/pysol/__main__.py rename to src/inductance/__main__.py index 05e5249..3b4323b 100644 --- a/src/pysol/__main__.py +++ b/src/inductance/__main__.py @@ -5,8 +5,8 @@ @click.command() @click.version_option() def main() -> None: - """PySol.""" + """Inductance.""" if __name__ == "__main__": - main(prog_name="pysol") # pragma: no cover + main(prog_name="inductance") # pragma: no cover diff --git a/src/pysol/elliptics.py b/src/inductance/elliptics.py similarity index 100% rename from src/pysol/elliptics.py rename to src/inductance/elliptics.py diff --git a/src/pysol/filaments.py b/src/inductance/filaments.py similarity index 100% rename from src/pysol/filaments.py rename to src/inductance/filaments.py diff --git a/src/pysol/inductance.py b/src/inductance/inductance.py similarity index 100% rename from src/pysol/inductance.py rename to src/inductance/inductance.py diff --git a/src/pysol/py.typed b/src/inductance/py.typed similarity index 100% rename from src/pysol/py.typed rename to src/inductance/py.typed diff --git a/tests/__init__.py b/tests/__init__.py index 95b3eed..9e3943c 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1 @@ -"""Test suite for the pysol package.""" +"""Test suite for the inductance package.""" diff --git a/tests/test_elliptics.py b/tests/test_elliptics.py index cc16da4..d9695a6 100644 --- a/tests/test_elliptics.py +++ b/tests/test_elliptics.py @@ -1,8 +1,7 @@ """Test the elliptics module.""" import unittest - -from pysol.elliptics import ellipke +from inductance.elliptics import ellipke class TestElliptics(unittest.TestCase): diff --git a/tests/test_ldx.py b/tests/test_ldx.py index 19d28df..6b7882a 100644 --- a/tests/test_ldx.py +++ b/tests/test_ldx.py @@ -1,10 +1,8 @@ """Test filamentation and inducatance of LDX coils.""" import unittest - import numpy as np - -from pysol.filaments import ( +from inductance.filaments import ( FilamentCoil, Lfil, LLyle4, diff --git a/tests/test_main.py b/tests/test_main.py index 120c61a..a816bda 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,8 +1,7 @@ """Test cases for the __main__ module.""" import pytest from click.testing import CliRunner - -from pysol import __main__ +from inductance import __main__ @pytest.fixture