From 9df2c9652f6307b31475ad31fb19daef1fd7c1fb Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Tue, 16 Jan 2024 23:04:27 -0400 Subject: [PATCH] feat: rename project to umlizer --- .github/ISSUE_TEMPLATE.md | 2 +- .github/workflows/main.yaml | 4 ++-- .github/workflows/release.yaml | 2 +- .pre-commit-config.yaml | 4 ++-- .releaserc.json | 6 +++--- README.md | 6 +++--- conda/dev.yaml | 2 +- docs/api/references.md | 2 +- docs/api/references.rst | 4 ++-- docs/changelog.md | 12 ++++++------ docs/contributing.md | 20 ++++++++++---------- docs/example.ipynb | 6 +++--- docs/index.md | 6 +++--- docs/installation.md | 16 ++++++++-------- docs/mkdocs.yaml | 14 +++++++------- pyproject.toml | 8 ++++---- src/{pyuml => umlizer}/__init__.py | 2 +- src/{pyuml => umlizer}/__main__.py | 2 +- src/{pyuml => umlizer}/class_graph.py | 0 src/{pyuml => umlizer}/cli.py | 4 ++-- src/{pyuml => umlizer}/py.typed | 0 tests/notebooks/Idea.ipynb | 2 +- tests/notebooks/test_pyuml.py | 6 +++--- 23 files changed, 65 insertions(+), 65 deletions(-) rename src/{pyuml => umlizer}/__init__.py (92%) rename src/{pyuml => umlizer}/__main__.py (77%) rename src/{pyuml => umlizer}/class_graph.py (100%) rename src/{pyuml => umlizer}/cli.py (95%) rename src/{pyuml => umlizer}/py.typed (100%) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 7000770..0c56372 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ -- PyUML version: +- UMLizer version: - Python version: - Operating System: diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3828027..fb37d02 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -87,7 +87,7 @@ jobs: environment-file: conda/dev.yaml channels: conda-forge,nodefaults channel-priority: true - activate-environment: pyuml + activate-environment: umlizer auto-update-conda: true conda-solver: libmamba @@ -118,7 +118,7 @@ jobs: miniconda-version: "latest" environment-file: conda/dev.yaml channels: conda-forge,nodefaults - activate-environment: pyuml + activate-environment: umlizer auto-update-conda: true conda-solver: libmamba diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 95f8f6c..b3fd6c8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,7 +31,7 @@ jobs: environment-file: conda/dev.yaml channels: conda-forge,nodefaults channel-priority: true - activate-environment: pyuml + activate-environment: umlizer auto-update-conda: true conda-solver: libmamba diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3429f32..b37b22e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -79,7 +79,7 @@ repos: name: vulture entry: vulture --min-confidence 80 language: system - files: "src/pyuml" + files: "src/umlizer" description: Find unused Python code. pass_filenames: true types: @@ -89,7 +89,7 @@ repos: name: mccabe entry: python -m mccabe --min 10 language: system - files: "src/pyuml" + files: "src/umlizer" pass_filenames: true types: - python diff --git a/.releaserc.json b/.releaserc.json index d3fe3cf..aa33fe0 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -13,12 +13,12 @@ { "replacements": [ { - "files": ["src/pyuml/__init__.py"], + "files": ["src/umlizer/__init__.py"], "from": "return \".*\" # semantic-release", "to": "return \"${nextRelease.version}\" # semantic-release", "results": [ { - "file": "src/pyuml/__init__.py", + "file": "src/umlizer/__init__.py", "hasChanged": true, "numMatches": 1, "numReplacements": 1 @@ -70,7 +70,7 @@ "assets": [ "pyproject.toml", "docs/changelog.md", - "src/pyuml/__init__.py" + "src/umlizer/__init__.py" ], "message": "chore(release): ${nextRelease.version}" } diff --git a/README.md b/README.md index 55ba6fc..09e9643 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# PyUML +# UMLizer Python tools for UML - LICENSE: BSD 3 Clause -- Documentation: https://osl-incubator.github.io/pyuml +- Documentation: https://osl-incubator.github.io/umlizer ## Features @@ -12,5 +12,5 @@ TBD ## Class Diagram ```bash -$ pyuml class --source ./src/pyuml --target ./docs/uml/class_graph --verbose +$ umlizer class --source ./src/umlizer --target ./docs/uml/class_graph --verbose ``` diff --git a/conda/dev.yaml b/conda/dev.yaml index 129845a..889b47f 100644 --- a/conda/dev.yaml +++ b/conda/dev.yaml @@ -1,4 +1,4 @@ -name: pyuml +name: umlizer channels: - nodefaults - conda-forge diff --git a/docs/api/references.md b/docs/api/references.md index 6d55dad..ad9efae 100644 --- a/docs/api/references.md +++ b/docs/api/references.md @@ -1,3 +1,3 @@ # Api references -::: pyuml +::: umlizer diff --git a/docs/api/references.rst b/docs/api/references.rst index fb95784..b220fcd 100644 --- a/docs/api/references.rst +++ b/docs/api/references.rst @@ -1,8 +1,8 @@ API references ============== -.. automodule:: pyuml +.. automodule:: umlizer :members: -.. automodule:: pyuml.pyuml +.. automodule:: umlizer.umlizer :members: diff --git a/docs/changelog.md b/docs/changelog.md index 3c11948..6181ff0 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,19 +2,19 @@ --- -# [0.3.0](https://github.com/osl-incubator/pyuml/compare/0.2.0...0.3.0) (2023-12-22) +# [0.3.0](https://github.com/osl-incubator/umlizer/compare/0.2.0...0.3.0) (2023-12-22) ### Features -- Separate data.lock per profile and fix small issues ([#8](https://github.com/osl-incubator/pyuml/issues/8)) ([91a8b3d](https://github.com/osl-incubator/pyuml/commit/91a8b3d8b0fa2900fc35e3149352a77d0fd40b2b)) +- Separate data.lock per profile and fix small issues ([#8](https://github.com/osl-incubator/umlizer/issues/8)) ([91a8b3d](https://github.com/osl-incubator/umlizer/commit/91a8b3d8b0fa2900fc35e3149352a77d0fd40b2b)) -# [0.2.0](https://github.com/osl-incubator/pyuml/compare/0.1.0...0.2.0) (2023-12-15) +# [0.2.0](https://github.com/osl-incubator/umlizer/compare/0.1.0...0.2.0) (2023-12-15) ### Bug Fixes -- Fix release workflow ([#5](https://github.com/osl-incubator/pyuml/issues/5)) ([8ba1407](https://github.com/osl-incubator/pyuml/commit/8ba1407ea27fb6e1a8712608f7f8af4ee1850475)) -- Fix release workflow ([#6](https://github.com/osl-incubator/pyuml/issues/6)) ([38e9d7c](https://github.com/osl-incubator/pyuml/commit/38e9d7c5ce45a83f6d50bdc9e98fcb76b6a34caf)) +- Fix release workflow ([#5](https://github.com/osl-incubator/umlizer/issues/5)) ([8ba1407](https://github.com/osl-incubator/umlizer/commit/8ba1407ea27fb6e1a8712608f7f8af4ee1850475)) +- Fix release workflow ([#6](https://github.com/osl-incubator/umlizer/issues/6)) ([38e9d7c](https://github.com/osl-incubator/umlizer/commit/38e9d7c5ce45a83f6d50bdc9e98fcb76b6a34caf)) ### Features -- Implement option for passing password as a stdin ([#4](https://github.com/osl-incubator/pyuml/issues/4)) ([4ab5ba8](https://github.com/osl-incubator/pyuml/commit/4ab5ba8ee54e98b6f580dbd3f7659af77e9a72c3)) +- Implement option for passing password as a stdin ([#4](https://github.com/osl-incubator/umlizer/issues/4)) ([4ab5ba8](https://github.com/osl-incubator/umlizer/commit/4ab5ba8ee54e98b6f580dbd3f7659af77e9a72c3)) diff --git a/docs/contributing.md b/docs/contributing.md index 2063c2a..b926562 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -3,7 +3,7 @@ In order to be able to contribute, it is important that you understand the project layout. This project uses the _src layout_, which means that the package code is located -at `./src/pyuml`. +at `./src/umlizer`. For my information, check the official documentation: https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/ @@ -25,7 +25,7 @@ You can contribute in many ways: ### Report Bugs -Report bugs at https://github.com/osl-incubator/pyuml/issues. +Report bugs at https://github.com/osl-incubator/umlizer/issues. If you are reporting a bug, please include: @@ -47,14 +47,14 @@ it. ### Write Documentation -PyUML could always use more documentation, -whether as part of the official PyUML docs, +UMLizer could always use more documentation, +whether as part of the official UMLizer docs, in docstrings, or even on the web in blog posts, articles, and such. ### Submit Feedback The best way to send feedback is to file an issue at -https://github.com/osl-incubator/pyuml/issues. +https://github.com/osl-incubator/umlizer/issues. If you are proposing a feature: @@ -66,20 +66,20 @@ If you are proposing a feature: ## Get Started! -Ready to contribute? Here’s how to set up `pyuml` for local development. +Ready to contribute? Here’s how to set up `umlizer` for local development. -1. Fork the `pyuml` repo on GitHub. +1. Fork the `umlizer` repo on GitHub. 2. Clone your fork locally:: - $ git clone git@github.com:your_name_here/pyuml.git + $ git clone git@github.com:your_name_here/umlizer.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: - $ mkvirtualenv pyuml - $ cd pyuml/ + $ mkvirtualenv umlizer + $ cd umlizer/ $ python setup.py develop 4. Create a branch for local development:: diff --git a/docs/example.ipynb b/docs/example.ipynb index e5b5271..abc3e9e 100644 --- a/docs/example.ipynb +++ b/docs/example.ipynb @@ -4,9 +4,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# PyUML\n", + "# UMLizer\n", "\n", - "PyUML is Python library that aims to do ...\n", + "UMLizer is Python library that aims to do ...\n", "\n", "## Getting Started\n", "\n", @@ -21,7 +21,7 @@ "metadata": {}, "outputs": [], "source": [ - "import pyuml" + "import umlizer" ] }, { diff --git a/docs/index.md b/docs/index.md index faba0cc..84b9854 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,8 +1,8 @@ ![LOGO](/images/logo.png) -# PyUML +# UMLizer -PyUML is a tool for creating UML diagrams from python source code. +UMLizer is a tool for creating UML diagrams from python source code. - License: BSD 3 Clause -- Documentation: https://osl-incubator.github.io/pyuml +- Documentation: https://osl-incubator.github.io/umlizer diff --git a/docs/installation.md b/docs/installation.md index 22ed6dc..d0f9387 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,14 +2,14 @@ ## Stable release -To install PyUML, run this command in your +To install UMLizer, run this command in your terminal: ```bash -$ pip install pyuml +$ pip install umlizer ``` -This is the preferred method to install PyUML, +This is the preferred method to install UMLizer, as it will always install the most recent stable release. If you don't have [pip](https://pip.pypa.io) installed, this @@ -18,20 +18,20 @@ can guide you through the process. ## From sources -The sources for PyUML can be downloaded from -the [Github repo](https://github.com/osl-incubator/pyuml). +The sources for UMLizer can be downloaded from +the [Github repo](https://github.com/osl-incubator/umlizer). You can either clone the public repository: ```bash -$ git clone https://github.com/osl-incubator/pyuml +$ git clone https://github.com/osl-incubator/umlizer ``` Or download the -[tarball](https://github.com/osl-incubator/pyuml/tarball/main): +[tarball](https://github.com/osl-incubator/umlizer/tarball/main): ```bash -$ curl -OJL https://github.com/osl-incubator/pyuml/tarball/main +$ curl -OJL https://github.com/osl-incubator/umlizer/tarball/main ``` Once you have a copy of the source, you can install it with: diff --git a/docs/mkdocs.yaml b/docs/mkdocs.yaml index d916ff1..d1902da 100644 --- a/docs/mkdocs.yaml +++ b/docs/mkdocs.yaml @@ -1,6 +1,6 @@ -site_name: PyUML -site_url: https://osl-incubator.github.io/pyuml -repo_url: https://github.com/osl-incubator/pyuml +site_name: UMLizer +site_url: https://osl-incubator.github.io/umlizer +repo_url: https://github.com/osl-incubator/umlizer docs_dir: ./ site_dir: ../build # extra_css: @@ -123,7 +123,7 @@ markdown_extensions: - tables - toc extra: - project_name: "PyUML" + project_name: "UMLizer" team: - name: "Active maintainers" members: @@ -135,11 +135,11 @@ extra: - icon: fontawesome/brands/twitter link: https://twitter.com/xmnlab - icon: fontawesome/brands/github - link: https://github.com/osl-incubator/pyuml + link: https://github.com/osl-incubator/umlizer support_levels: supported: icon: :material-check-decagram:{ .verified } - description: Tested in CI. If this doesn't work for you, please [file an issue](https://github.com/osl-incubator/pyuml/issues/new). + description: Tested in CI. If this doesn't work for you, please [file an issue](https://github.com/osl-incubator/umlizer/issues/new). bug: icon: :material-bug:{ .bug } description: Should work but doesn't because upstream is broken. Supported on a best-effort basis. @@ -147,4 +147,4 @@ extra: icon: :material-cancel:{ .cancel } description: Unlikely to ever be supported or no upstream support. -copyright: "Copyright © 2022, PyUML Team" +copyright: "Copyright © 2022, UMLizer Team" diff --git a/pyproject.toml b/pyproject.toml index 691e1aa..c66584e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "pyuml" +name = "umlizer" version = "0.1.0" description = "Tool for creating UML from project files" authors = ["Ivan Ogasawara "] @@ -10,12 +10,12 @@ exclude = [ ".env*", ] packages = [ - {include = "pyuml", from="src"}, + {include = "umlizer", from="src"}, ] -include = ["src/pyuml/py.typed"] +include = ["src/umlizer/py.typed"] [tool.poetry.scripts] -"pyuml" = "pyuml.__main__:app" +"umlizer" = "umlizer.__main__:app" [tool.poetry.dependencies] python = ">=3.8.1,<4" diff --git a/src/pyuml/__init__.py b/src/umlizer/__init__.py similarity index 92% rename from src/pyuml/__init__.py rename to src/umlizer/__init__.py index e1f2e1b..515dfe9 100644 --- a/src/pyuml/__init__.py +++ b/src/umlizer/__init__.py @@ -1,4 +1,4 @@ -"""Top-level package for PyUML.""" +"""Top-level package for UMLizer.""" # mypy: disable-error-code="attr-defined" from importlib import metadata as importlib_metadata diff --git a/src/pyuml/__main__.py b/src/umlizer/__main__.py similarity index 77% rename from src/pyuml/__main__.py rename to src/umlizer/__main__.py index ae68795..365b135 100644 --- a/src/pyuml/__main__.py +++ b/src/umlizer/__main__.py @@ -1,5 +1,5 @@ """The definition of the action for `python -m` command.""" -from pyuml.cli import app +from umlizer.cli import app if __name__ == '__main__': app() diff --git a/src/pyuml/class_graph.py b/src/umlizer/class_graph.py similarity index 100% rename from src/pyuml/class_graph.py rename to src/umlizer/class_graph.py diff --git a/src/pyuml/cli.py b/src/umlizer/cli.py similarity index 95% rename from src/pyuml/cli.py rename to src/umlizer/cli.py index 6412c48..cf45953 100644 --- a/src/pyuml/cli.py +++ b/src/umlizer/cli.py @@ -8,7 +8,7 @@ from typer import Context, Option from typing_extensions import Annotated -from pyuml import __version__, class_graph +from umlizer import __version__, class_graph app = typer.Typer() @@ -24,7 +24,7 @@ def main( help='Show the version and exit.', ), ) -> None: - """Run pyuml.""" + """Run umlizer.""" if version: typer.echo(f'Version: {__version__}') raise typer.Exit() diff --git a/src/pyuml/py.typed b/src/umlizer/py.typed similarity index 100% rename from src/pyuml/py.typed rename to src/umlizer/py.typed diff --git a/tests/notebooks/Idea.ipynb b/tests/notebooks/Idea.ipynb index e463f3d..6fd4555 100644 --- a/tests/notebooks/Idea.ipynb +++ b/tests/notebooks/Idea.ipynb @@ -454,7 +454,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "=========== /home/xmn/dev/xmnlab/pyuml/tests/notebooks/class_base.py ===========\n", + "=========== /home/xmn/dev/xmnlab/umlizer/tests/notebooks/class_base.py ===========\n", "No module named 'dataclass'\n", "................................................................................\n" ] diff --git a/tests/notebooks/test_pyuml.py b/tests/notebooks/test_pyuml.py index 6c9c777..fbf720d 100644 --- a/tests/notebooks/test_pyuml.py +++ b/tests/notebooks/test_pyuml.py @@ -1,8 +1,8 @@ -"""Main tests for pyuml.""" +"""Main tests for umlizer.""" def test_import() -> None: """Test import.""" - import pyuml + import umlizer - assert pyuml + assert umlizer