From dcb43c30820b939822e5dc83cc0fb2c149619c66 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 3 Jan 2025 18:54:55 -0500 Subject: [PATCH 1/5] ci: rename projects in github ci yml --- .../workflows/build-wheel-release-upload.yml | 2 +- .github/workflows/check-news-item.yml | 2 +- .../matrix-and-codecov-on-merge-to-main.yml | 2 +- .github/workflows/publish-docs-on-release.yml | 6 +-- .github/workflows/tests-on-pr.yml | 2 +- AUTHORS.rst | 2 +- README.rst | 40 +++++++++---------- doc/Makefile | 2 +- doc/source/conda_forge_guide.rst | 2 +- doc/source/conf.py | 22 +++++----- doc/source/frequently_asked_questions.rst | 2 +- doc/source/getting_started.rst | 8 ++-- doc/source/index.rst | 16 ++++---- environment.yml | 2 +- news/cookiecut.rst | 2 +- news/demo-gif.rst | 2 +- news/migrate-cookiecutter.rst | 2 +- news/scikit-package.rst | 23 +++++++++++ news/statement-of-need.rst | 4 +- pyproject.toml | 8 ++-- src/__init__.py | 23 ----------- .../__init__.py | 6 +-- .../version.py | 4 +- src/version.py | 25 ------------ tests/test_version.py | 7 ++-- 25 files changed, 95 insertions(+), 121 deletions(-) create mode 100644 news/scikit-package.rst delete mode 100644 src/__init__.py rename src/{bg_cookiecutter => scikit_package}/__init__.py (79%) rename src/{bg_cookiecutter => scikit_package}/version.py (87%) delete mode 100644 src/version.py diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml index ebdbcdd..4856c78 100644 --- a/.github/workflows/build-wheel-release-upload.yml +++ b/.github/workflows/build-wheel-release-upload.yml @@ -10,7 +10,7 @@ jobs: release: uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 with: - project: bg-cookiecutter + project: scikit-package secrets: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml index 5955cf0..b7c6a29 100644 --- a/.github/workflows/check-news-item.yml +++ b/.github/workflows/check-news-item.yml @@ -9,4 +9,4 @@ jobs: check-news-item: uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0 with: - project: bg-cookiecutter + project: scikit-package diff --git a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml index feda4b9..7a4f98c 100644 --- a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml +++ b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml @@ -14,7 +14,7 @@ jobs: matrix-coverage: uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 with: - project: bg-cookiecutter + project: scikit-package c_extension: false headless: false secrets: diff --git a/.github/workflows/publish-docs-on-release.yml b/.github/workflows/publish-docs-on-release.yml index 8b7a594..c6168d5 100644 --- a/.github/workflows/publish-docs-on-release.yml +++ b/.github/workflows/publish-docs-on-release.yml @@ -1,14 +1,12 @@ -name: Deploy Documentation on Release +name: Deploy Documentation on: - release: - types: [published] workflow_dispatch: jobs: docs: uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0 with: - project: bg-cookiecutter + project: scikit-package c_extension: false headless: false diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index bbed77d..1b76afe 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -11,7 +11,7 @@ jobs: tests-on-pr: uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0 with: - project: bg-cookiecutter + project: scikit-package c_extension: false headless: false secrets: diff --git a/AUTHORS.rst b/AUTHORS.rst index b578c79..8a17d71 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -11,4 +11,4 @@ Contributors ------------ For a list of contributors, visit -https://github.com/Billingegroup/cookiecutter/graphs/contributors +https://github.com/Billingegroup/scikit_package/graphs/contributors diff --git a/README.rst b/README.rst index 542982c..22e919d 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,11 @@ |Icon| |title|_ =============== -.. |title| replace:: bg-cookiecutter -.. _title: https://Billingegroup.github.io/cookiecutter +.. |title| replace:: scikit-package +.. _title: https://Billingegroup.github.io/scikit-package .. |Icon| image:: https://avatars.githubusercontent.com/Billingegroup - :target: https://Billingegroup.github.io/cookiecutter + :target: https://Billingegroup.github.io/scikit-package :height: 100px |PyPi| |Forge| |PythonVersion| |PR| @@ -15,27 +15,27 @@ .. |Black| image:: https://img.shields.io/badge/code_style-black-black :target: https://github.com/psf/black -.. |CI| image:: https://github.com/Billingegroup/cookiecutter/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg - :target: https://github.com/Billingegroup/cookiecutter/actions/workflows/matrix-and-codecov-on-merge-to-main.yml +.. |CI| image:: https://github.com/Billingegroup/scikit-package/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg + :target: https://github.com/Billingegroup/scikit-package/actions/workflows/matrix-and-codecov-on-merge-to-main.yml -.. |Codecov| image:: https://codecov.io/gh/Billingegroup/cookiecutter/branch/main/graph/badge.svg - :target: https://codecov.io/gh/Billingegroup/cookiecutter +.. |Codecov| image:: https://codecov.io/gh/Billingegroup/scikit-package/branch/main/graph/badge.svg + :target: https://codecov.io/gh/Billingegroup/scikit-package -.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/bg-cookiecutter - :target: https://anaconda.org/conda-forge/bg-cookiecutter +.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/scikit-package + :target: https://anaconda.org/conda-forge/scikit-package .. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff -.. |PyPi| image:: https://img.shields.io/pypi/v/bg-cookiecutter - :target: https://pypi.org/project/bg-cookiecutter/ +.. |PyPi| image:: https://img.shields.io/pypi/v/scikit-package + :target: https://pypi.org/project/scikit-package/ -.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/bg-cookiecutter - :target: https://pypi.org/project/bg-cookiecutter/ +.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/scikit-package + :target: https://pypi.org/project/scikit-package/ .. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue - :target: https://github.com/Billingegroup/cookiecutter/issues + :target: https://github.com/Billingegroup/scikit-package/issues -``bg-cookiecutter`` is a Python package standard and generator for scientific code. Use ``bg-cookiecutter`` to launch a new project or migrate existing ones to support the latest Python versions and streamline the process of distributing and maintaining your software package. +``scikit-package`` is a Python package standard and generator for scientific code. Use ``scikit-package`` to launch a new project or migrate existing ones to support the latest Python versions and streamline the process of distributing and maintaining your software package. - Automated `PEP8 `_ and `PEP256 `_ standard checks. - Automated PyPI/GitHub release, testing, documentation, and CHANGELOG updates. @@ -48,17 +48,17 @@ Demo ---- .. image:: doc/source/gif/demo.gif - :alt: bg-cookiecutter demo + :alt: scikit-package demo :align: center Getting started --------------- -Are you interested in amplifying your scientific contribution by standarlizing and distributing your Python code? Begin with the ``Getting started`` page in our online documentation at https://Billingegroup.github.io/cookiecutter! +Are you interested in amplifying your scientific contribution by standarlizing and distributing your Python code? Begin with the ``Getting started`` page in our online documentation at https://Billingegroup.github.io/scikit-package! -How to cite bg-cookiecutter +How to cite scikit-package --------------------------- -If you use ``bg-cookiecutter`` to standardize your Python software, we would like you to cite bg-cookiecutter as follows: +If you use ``scikit-package`` to standardize your Python software, we would like you to cite scikit-package as follows: - bg-cookiecutter, https://github.com/Billingegroup/cookiecutter + scikit-package, https://github.com/Billingegroup/scikit-package diff --git a/doc/Makefile b/doc/Makefile index fe27200..a09dcbc 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -6,7 +6,7 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build -BASENAME = $(subst .,,$(subst $() $(),,bg-cookiecutter)) +BASENAME = $(subst .,,$(subst $() $(),,scikit-package)) # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) diff --git a/doc/source/conda_forge_guide.rst b/doc/source/conda_forge_guide.rst index 3e13961..5ad23fa 100644 --- a/doc/source/conda_forge_guide.rst +++ b/doc/source/conda_forge_guide.rst @@ -20,7 +20,7 @@ Hence, in Step 1, we will generate ``meta.yaml`` using the Billinge group's temp If you are interested in learning more about each component within ``meta.yaml``, read :ref:`Appendix 1 ` located at the end of this document. -1. Install ``cookiecutter`` via ``pip install cookiecutter`` and run ``cookiecutter https://github.com/billingegroup/staged-recipes-cookiecutter`` +1. Install ``scikit-package`` via ``pip install scikit-package`` and run ``scikit-package https://github.com/billingegroup/staged-recipes-cookiecutter`` 2. Answer the following questions. Default values in parentheses are used if no value is provided. diff --git a/doc/source/conf.py b/doc/source/conf.py index c98c0d0..d0d4a38 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# bg-cookiecutter documentation build configuration file, created by +# scikit-package documentation build configuration file, created by # sphinx-quickstart on Thu Jan 30 15:49:41 2014. # # This file is execfile()d with the current directory set to its @@ -71,7 +71,7 @@ master_doc = "index" # General information about the project. -project = "bg-cookiecutter" +project = "scikit-package" copyright = "%Y, The Trustees of Columbia University in the City of New York" # The version info for the project you're documenting, acts as replacement for @@ -121,7 +121,7 @@ pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. -modindex_common_prefix = ["bg-cookiecutter"] +modindex_common_prefix = ["scikit-package"] # Display all warnings for missing links. nitpicky = True @@ -212,7 +212,7 @@ # html_file_suffix = None # Output file base name for HTML help builder. -basename = "bg-cookiecutter".replace(" ", "").replace(".", "") +basename = "scikit-package".replace(" ", "").replace(".", "") htmlhelp_basename = basename + "doc" @@ -233,8 +233,8 @@ latex_documents = [ ( "index", - "bg-cookiecutter.tex", - "bg-cookiecutter Documentation", + "scikit-package.tex", + "scikit-package Documentation", ab_authors, "manual", ), @@ -268,8 +268,8 @@ man_pages = [ ( "index", - "bg-cookiecutter", - "bg-cookiecutter Documentation", + "scikit-package", + "scikit-package Documentation", ab_authors, 1, ) @@ -287,10 +287,10 @@ texinfo_documents = [ ( "index", - "bg-cookiecutter", - "bg-cookiecutter Documentation", + "scikit-package", + "scikit-package Documentation", ab_authors, - "bg-cookiecutter", + "scikit-package", "One line description of project.", "Miscellaneous", ), diff --git a/doc/source/frequently_asked_questions.rst b/doc/source/frequently_asked_questions.rst index 283770a..d94ead9 100644 --- a/doc/source/frequently_asked_questions.rst +++ b/doc/source/frequently_asked_questions.rst @@ -8,7 +8,7 @@ Frequently asked questions (FAQ) ================================ -Here, you will learn how to customize the ``bg-cookiecutter`` template for your own project, such as setting the line-width and including/excluding files for PyPI distribution. We also provide design decisions for the current setup of the ``bg-cookiecutter`` template. +Here, you will learn how to customize the ``scikit-package`` template for your own project, such as setting the line-width and including/excluding files for PyPI distribution. We also provide design decisions for the current setup of the ``scikit-package`` template. Formatting ---------- diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst index a871b29..a30555d 100644 --- a/doc/source/getting_started.rst +++ b/doc/source/getting_started.rst @@ -11,13 +11,13 @@ Getting started Are you here for cookiecutting? ------------------------------- -1. Do you already have a Python package you want to standardize with ``bg-cookiecutter``? Please follow the full instructions :ref:`here `. +1. Do you already have a Python package you want to standardize with ``scikit-package``? Please follow the full instructions :ref:`here `. -2. Do you already have a bg-cookiecuttered package and you want to use the latest version? Please follow the instructions in :ref:`here `. +2. Do you already have a scikit-packageed package and you want to use the latest version? Please follow the instructions in :ref:`here `. -3. Do you want to start a new Python repository with ``bg-cookiecutter``? Start from the Cookiecutter workflow section :ref:`here `. +3. Do you want to start a new Python repository with ``scikit-package``? Start from the Cookiecutter workflow section :ref:`here `. Are you here for release? ------------------------- -You already have a bg-cookiecuttered package. Do you want to release your package to ``GitHub``, ``PyPI``, and ``conda-forge`` by creating a tag to your GitHub repository? Start from :ref:`here `. +You already have a package standardized with ``scikit-package``. Do you want to release your package to ``GitHub``, ``PyPI``, and ``conda-forge`` by creating a tag to your GitHub repository? Start from :ref:`here `. diff --git a/doc/source/index.rst b/doc/source/index.rst index dcb51ba..6091c5a 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -2,7 +2,7 @@ |title| ####### -.. |title| replace:: bg-cookiecutter documentation +.. |title| replace:: scikit-package documentation | Software version |release|. | Last updated |today|. @@ -12,14 +12,14 @@ Welcome to Billinge Group's Python cookiecutter documentation! Statement of need ----------------- -Your research impact can be amplified by distributing your contributions through well-documented software packages. However, creating these packages requires time dedicated to software infrastructure and ongoing maintenance. ``bg-cookiecutter`` is a Python package standard and generator that helps you launch new scientific code or migrate existing ones. +Your research impact can be amplified by distributing your contributions through well-documented software packages. However, creating these packages requires time dedicated to software infrastructure and ongoing maintenance. ``scikit-package`` is a Python package standard and generator that helps you launch new scientific code or migrate existing ones. -``bg-cookiecutter`` provides research-quality documents suitable for open-source development and supports Python versions compatible with the `SPEC0 `_ proposal through automated workflows. Additionally, it offers a streamlined process for building and distributing your scientific software, ensuring reproducibility across all major operating systems. With ``bg-cookiecutter``, you can focus on developing your scientific code while ensuring it reaches a broader audience. +``scikit-package`` provides research-quality documents suitable for open-source development and supports Python versions compatible with the `SPEC0 `_ proposal through automated workflows. Additionally, it offers a streamlined process for building and distributing your scientific software, ensuring reproducibility across all major operating systems. With ``scikit-package``, you can focus on developing your scientific code while ensuring it reaches a broader audience. What are the useful features? ----------------------------- -To help increase your research impact, ``bg-cookiecutter`` offers the following features: +To help increase your research impact, ``scikit-package`` offers the following features: - Automated `PEP8 `_ and `PEP256 `_ standard checks. - Automated PyPI/GitHub release, testing, documentation, and CHANGELOG updates. @@ -52,7 +52,7 @@ How can I contribute? Do you have any new features? Please make an issue via the GitHub issue tracker for further discussions. For a minor typo or grammatically incorrect sentence, please make a pull request. Before making a PR, please run ``pre-commit run --all-files`` to ensure the code is formatted. -Who are using ``bg-cookiecutter``? +Who are using ``scikit-package``? ---------------------------------- The full list of packages is as follows: @@ -73,16 +73,16 @@ The full list of packages is as follows: Authors ======= -bg-cookiecutter is developed by Billinge Group and its community contributors. +scikit-package is developed by Billinge Group and its community contributors. For a detailed list of contributors, see -https://github.com/Billingegroup/cookiecutter/graphs/contributors. +https://github.com/Billingegroup/scikit-package/graphs/contributors. ================ Acknowledgements ================ -The Billinge Group's cookiecutter has been modified from the NSLS-II scientific cookiecutter: https://github.com/nsls-ii/scientific-python-cookiecutter +The Billinge Group's scikit-package has been modified from the NSLS-II scientific cookiecutter: https://github.com/nsls-ii/scientific-python-cookiecutter ================= Table of contents diff --git a/environment.yml b/environment.yml index d01063e..57f9d35 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: bg-cookiecutter +name: sckit-package channels: - conda-forge dependencies: diff --git a/news/cookiecut.rst b/news/cookiecut.rst index 5e37218..39437a4 100644 --- a/news/cookiecut.rst +++ b/news/cookiecut.rst @@ -4,7 +4,7 @@ **Changed:** -* package structure based on its own Billinge Group's Python bg-cookiecutter template +* package structure based on its own Billinge Group's Python scikit-package template **Deprecated:** diff --git a/news/demo-gif.rst b/news/demo-gif.rst index 29e16c0..93332b5 100644 --- a/news/demo-gif.rst +++ b/news/demo-gif.rst @@ -1,6 +1,6 @@ **Added:** -* Add demo .gif file used in README.rst in generating a package and building documentation with `bg-cookiecutter`. +* Add demo .gif file used in README.rst in generating a package and building documentation with `scikit-package`. **Changed:** diff --git a/news/migrate-cookiecutter.rst b/news/migrate-cookiecutter.rst index 9985dc5..5018da8 100644 --- a/news/migrate-cookiecutter.rst +++ b/news/migrate-cookiecutter.rst @@ -1,6 +1,6 @@ **Added:** -* Sphinx documentation for cookiecutter +* Sphinx documentation for `scikit-package` **Changed:** diff --git a/news/scikit-package.rst b/news/scikit-package.rst new file mode 100644 index 0000000..7627f61 --- /dev/null +++ b/news/scikit-package.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Rename therepositroy and package name to `scikit-package`. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/news/statement-of-need.rst b/news/statement-of-need.rst index 40ed9af..b1253fa 100644 --- a/news/statement-of-need.rst +++ b/news/statement-of-need.rst @@ -1,7 +1,7 @@ **Added:** -* full description of bg-cookiecutter in pyproject.toml -* motivating statements under the Statement of need section in index.rst +* Add full description of ``scikit-package`` in ``pyproject.toml``. +* Add motivating statements under the Statement of need section in ``index.rst``. **Changed:** diff --git a/pyproject.toml b/pyproject.toml index 69f5bc8..903de4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0"] build-backend = "setuptools.build_meta" [project] -name = "bg-cookiecutter" +name = "scikit-package" dynamic=['version', 'dependencies'] authors = [ { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" }, @@ -11,7 +11,7 @@ authors = [ maintainers = [ { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" }, ] -description = "A Python package standard and generator for scientific code. Use bg-cookiecutter to launch a new project or migrate existing ones to support the latest Python versions and streamline the process of distributing and maintaining your software package." +description = "A Python package standard and generator for scientific code. Use scikit-package to launch a new project or migrate existing ones to support the latest Python versions and streamline the process of distributing and maintaining your software package." keywords = ['Package template', 'open-source software'] readme = "README.rst" requires-python = ">=3.11, <3.14" @@ -33,8 +33,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/Billingegroup/cookiecutter/" -Issues = "https://github.com/Billingegroup/cookiecutter/issues/" +Homepage = "https://github.com/Billingegroup/scikit-package/" +Issues = "https://github.com/Billingegroup/scikit-package/issues/" [tool.setuptools-git-versioning] enabled = true diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index bb6aafc..0000000 --- a/src/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/Billingegroup/cookiecutter/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## -"""A package for using Billinge group style files.""" - -# package version -from src.version import __version__ - -# silence the pyflakes syntax checker -assert __version__ or True - -# End of file diff --git a/src/bg_cookiecutter/__init__.py b/src/scikit_package/__init__.py similarity index 79% rename from src/bg_cookiecutter/__init__.py rename to src/scikit_package/__init__.py index c1a3a35..f1607e9 100644 --- a/src/bg_cookiecutter/__init__.py +++ b/src/scikit_package/__init__.py @@ -7,20 +7,20 @@ # File coded by: Billinge Group members and community contributors. # # See GitHub contributions for a more detailed list of contributors. -# https://github.com/Billingegroup/cookiecutter/graphs/contributors +# https://github.com/Billingegroup/scikit-package/graphs/contributors # # See LICENSE.rst for license information. # ############################################################################## """A Python package standard and generator for scientific code. -Use bg-cookiecutter to launch a new project or migrate existing ones to +Use scikit-package to launch a new project or migrate existing ones to support the latest Python versions and streamline the process of distributing and maintaining your software package. """ # package version -from bg_cookiecutter.version import __version__ +from scikit_package.version import __version__ # silence the pyflakes syntax checker assert __version__ or True diff --git a/src/bg_cookiecutter/version.py b/src/scikit_package/version.py similarity index 87% rename from src/bg_cookiecutter/version.py rename to src/scikit_package/version.py index 390dad6..917823f 100644 --- a/src/bg_cookiecutter/version.py +++ b/src/scikit_package/version.py @@ -7,7 +7,7 @@ # File coded by: Billinge Group members and community contributors. # # See GitHub contributions for a more detailed list of contributors. -# https://github.com/Billingegroup/cookiecutter/graphs/contributors +# https://github.com/Billingegroup/scikit-package/graphs/contributors # # See LICENSE.rst for license information. # @@ -20,6 +20,6 @@ # obtain version information from importlib.metadata import version -__version__ = version("bg-cookiecutter") +__version__ = version("scikit_package") # End of file diff --git a/src/version.py b/src/version.py deleted file mode 100644 index 3ceda93..0000000 --- a/src/version.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/Billingegroup/cookiebutter/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## -"""Definition of __version__.""" - -# We do not use the other three variables, but can be added back if needed. -# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] - -# obtain version information -from importlib.metadata import version - -__version__ = version("bg_cookiebutter") - -# End of file diff --git a/tests/test_version.py b/tests/test_version.py index 3d6bfae..c072b05 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,10 +1,11 @@ """Unit tests for __version__.py.""" -import bg_cookiecutter +import scikit_package def test_package_version(): """Ensure the package version is defined and not set to the initial placeholder.""" - assert hasattr(bg_cookiecutter, "__version__") - assert bg_cookiecutter.__version__ != "0.0.0" + assert hasattr(scikit_package, "__version__") + assert scikit_package.__version__ != "0.0.0" + print(scikit_package.__version__) From b4246b8d6adbf4032e9d8e282b3a02bc6a4d8e41 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 3 Jan 2025 18:56:54 -0500 Subject: [PATCH 2/5] chore: fix typo and format news --- doc/source/getting_started.rst | 2 +- news/migrate-cookiecutter.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst index a30555d..0952374 100644 --- a/doc/source/getting_started.rst +++ b/doc/source/getting_started.rst @@ -13,7 +13,7 @@ Are you here for cookiecutting? 1. Do you already have a Python package you want to standardize with ``scikit-package``? Please follow the full instructions :ref:`here `. -2. Do you already have a scikit-packageed package and you want to use the latest version? Please follow the instructions in :ref:`here `. +2. Do you already have a scikit-packaged package and you want to use the latest version? Please follow the instructions in :ref:`here `. 3. Do you want to start a new Python repository with ``scikit-package``? Start from the Cookiecutter workflow section :ref:`here `. diff --git a/news/migrate-cookiecutter.rst b/news/migrate-cookiecutter.rst index 5018da8..f2cd557 100644 --- a/news/migrate-cookiecutter.rst +++ b/news/migrate-cookiecutter.rst @@ -1,6 +1,6 @@ **Added:** -* Sphinx documentation for `scikit-package` +* Add Sphinx documentation for `scikit-package`. **Changed:** From 77f4c1adfb41f171170c4229ab16909fc90dfec6 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 3 Jan 2025 18:59:02 -0500 Subject: [PATCH 3/5] chore: fix typo --- news/scikit-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/scikit-package.rst b/news/scikit-package.rst index 7627f61..a0fd862 100644 --- a/news/scikit-package.rst +++ b/news/scikit-package.rst @@ -4,7 +4,7 @@ **Changed:** -* Rename therepositroy and package name to `scikit-package`. +* Rename repositroy and package name to `scikit-package`. **Deprecated:** From 83f5523502efb7965f852454d40f44763c7329a9 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 3 Jan 2025 19:03:16 -0500 Subject: [PATCH 4/5] chore: format news file based on group standard --- news/add-py-env.rst | 2 +- news/codecov.rst | 2 +- news/conda-forge-doc.rst | 2 +- news/cookiecut.rst | 2 +- news/docformatter.rst | 2 +- news/dynamic-template.rst | 2 +- news/frequently-asked-questions.rst | 2 +- news/getting-started.rst | 6 +++--- news/import-package-dir.rst | 2 +- news/links.rst | 2 +- news/migrate-release.rst | 2 +- news/prettier.rst | 2 +- news/statement-of-need.rst | 4 ++-- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/news/add-py-env.rst b/news/add-py-env.rst index f8a16c5..769fcf5 100644 --- a/news/add-py-env.rst +++ b/news/add-py-env.rst @@ -1,6 +1,6 @@ **Added:** -* support for Billinge group's reusesable workflow by adding requirement files and environment.yml +* Support Billinge group's reusesable workflow by adding requirement files and `environment.yml`. **Changed:** diff --git a/news/codecov.rst b/news/codecov.rst index a57cf02..056c04c 100644 --- a/news/codecov.rst +++ b/news/codecov.rst @@ -1,6 +1,6 @@ **Added:** -* instructions for Codecov setup in cookiecutter guide +* Add instructions for Codecov setup in documentation. **Changed:** diff --git a/news/conda-forge-doc.rst b/news/conda-forge-doc.rst index 897527a..c71f05e 100644 --- a/news/conda-forge-doc.rst +++ b/news/conda-forge-doc.rst @@ -1,6 +1,6 @@ **Added:** -* conda-forge feedstock creation and maintenance guide +* Add conda-forge feedstock creation and maintenance guide. **Changed:** diff --git a/news/cookiecut.rst b/news/cookiecut.rst index 39437a4..f77b127 100644 --- a/news/cookiecut.rst +++ b/news/cookiecut.rst @@ -4,7 +4,7 @@ **Changed:** -* package structure based on its own Billinge Group's Python scikit-package template +* Standarlize the current repository based on `scikit-package` structure. **Deprecated:** diff --git a/news/docformatter.rst b/news/docformatter.rst index 02c075f..2f2fedf 100644 --- a/news/docformatter.rst +++ b/news/docformatter.rst @@ -1,6 +1,6 @@ **Added:** -* automatic docstring linting with PEP 257 compliance with docformatter in pre-commit +* Add automatic docstring linting with PEP 257 compliance with `docformatter` in `pre-commit`. **Changed:** diff --git a/news/dynamic-template.rst b/news/dynamic-template.rst index 7906e8e..85c0a6b 100644 --- a/news/dynamic-template.rst +++ b/news/dynamic-template.rst @@ -1,6 +1,6 @@ **Added:** -* extra metadata of email, name, username, license holder, etc. collected to dynamically populate rendered cookiecuttered files +* Add extra metadata of email, name, username, license holder, etc. collected to dynamically populate rendered cookiecuttered files. **Changed:** diff --git a/news/frequently-asked-questions.rst b/news/frequently-asked-questions.rst index 8d9d38c..b539e59 100644 --- a/news/frequently-asked-questions.rst +++ b/news/frequently-asked-questions.rst @@ -1,6 +1,6 @@ **Added:** -* FAQ section to the documentation on how to customize the template and design decisions for the current setup +* Add FAQ section to the documentation on how to customize the template and design decisions for the current setup. **Changed:** diff --git a/news/getting-started.rst b/news/getting-started.rst index 34cb4bd..d908d4e 100644 --- a/news/getting-started.rst +++ b/news/getting-started.rst @@ -1,8 +1,8 @@ **Added:** -* Getting started page in documentation -* FAQ section on why both pip.txt and conda.txt added -* FAQ section on how version is set and retrieved dynamically +* Add `Getting started`` page in documentation. +* Add FAQ section on why both `pip.txt`` and `conda.txt`` added. +* Add FAQ section on how version is set and retrieved dynamically. **Changed:** diff --git a/news/import-package-dir.rst b/news/import-package-dir.rst index bacf160..2188775 100644 --- a/news/import-package-dir.rst +++ b/news/import-package-dir.rst @@ -4,7 +4,7 @@ **Changed:** -* import package_dir_name in the `__init__.py` instead of `conda_pypi_package_dist_name` to ensure package import is lowercased +* Import `package_dir_name`` in the `__init__.py` instead of `conda_pypi_package_dist_name` to ensure package import is lowercased. **Deprecated:** diff --git a/news/links.rst b/news/links.rst index 4c8f661..21c7daf 100644 --- a/news/links.rst +++ b/news/links.rst @@ -16,7 +16,7 @@ **Fixed:** -* sub section titles in doc to improve readability and navigation working with conda-forge package +* Modified sub-section titles in doc to improve readability and navigation working with conda-forge package. **Security:** diff --git a/news/migrate-release.rst b/news/migrate-release.rst index f4b7264..9c2aafb 100644 --- a/news/migrate-release.rst +++ b/news/migrate-release.rst @@ -1,6 +1,6 @@ **Added:** -* documentation for Python package release with GitHub Actions +* Add documentation for Python package release with GitHub Actions. **Changed:** diff --git a/news/prettier.rst b/news/prettier.rst index 033b3c0..e75de1b 100644 --- a/news/prettier.rst +++ b/news/prettier.rst @@ -1,6 +1,6 @@ **Added:** -* automatic linting of .md, .yml, .rst files via prettier hook in pre-commit +* Add automatic linting of .md, .yml, .rst files via prettier hook in `pre-commit`. **Changed:** diff --git a/news/statement-of-need.rst b/news/statement-of-need.rst index b1253fa..0264898 100644 --- a/news/statement-of-need.rst +++ b/news/statement-of-need.rst @@ -1,7 +1,7 @@ **Added:** -* Add full description of ``scikit-package`` in ``pyproject.toml``. -* Add motivating statements under the Statement of need section in ``index.rst``. +* Add full description of `scikit-package` in `pyproject.toml`. +* Add motivating statements under the Statement of need section in `index.rst`. **Changed:** From 564f7b596406ede80e905313bdd5b09403fc2899 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 3 Jan 2025 19:52:10 -0500 Subject: [PATCH 5/5] chore: remove redundant news --- news/links.rst | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 news/links.rst diff --git a/news/links.rst b/news/links.rst deleted file mode 100644 index 21c7daf..0000000 --- a/news/links.rst +++ /dev/null @@ -1,23 +0,0 @@ -**Added:** - -* - -**Changed:** - -* - -**Deprecated:** - -* - -**Removed:** - -* - -**Fixed:** - -* Modified sub-section titles in doc to improve readability and navigation working with conda-forge package. - -**Security:** - -*