Skip to content

Conversation

@larsks
Copy link
Member

@larsks larsks commented Nov 5, 2025

This commit relocates all of the Python source files into the batchtools
package. This, along with appropriate modifications to pyproject.toml,
mean that:

  • We now have an installable package.

    From within this directory, you can run pip install . to install the
    package on the local system.

    You can also install the package straight from the GitHub repository:

    pip install git+https://github.com/memalhot/python-batchtools
    
  • We install a runnable batchtools script.

    By setting project.scripts in pyproject.toml, we install a
    batchtools command when we install the package. This permits you to run
    the code by simply typing batchtools at the command line, just like any
    other command.

    You can run the script without installing it using the uv run command:

    uv run batchtools
    
  • We have a distributable package.

    Running uv build will produce a distributable Python package (both
    a .tar.gz file and a Python wheel 1) in the dist/ directory. This
    can be uploaded to PyPi using uv publish, or simply copied and
    installed somewhere using pip.

@larsks larsks force-pushed the feature/refactor branch 2 times, most recently from efcf2c3 to d73796b Compare November 5, 2025 13:01
This commit relocates all of the Python source files into the `batchtools`
package. This, along with appropriate modifications to `pyproject.toml`,
mean that:

- We now have an installable package.

  From within this directory, you can run `pip install .` to install the
  package on the local system.

  You can also install the package straight from the GitHub repository:

      pip install git+https://github.com/memalhot/python-batchtools

- We install a runnable `batchtools` script.

  By setting `project.scripts` in `pyproject.toml`, we install a
  `batchtools` command when we install the package. This permits you to run
  the code by simply typing `batchtools` at the command line, just like any
  other command.

  You can run the script without installing it using the `uv run` command:

      uv run batchtools

- We have a distributable package.

  Running `uv build` will produce a distributable Python package (both
  a `.tar.gz` file and a Python wheel [1]) in the `dist/` directory. This
  can be uploaded to PyPi using `uv publish`, or simply copied and
  installed somewhere using `pip`.

[1]: https://pythonwheels.com/
@memalhot memalhot merged commit 9d93398 into OCP-on-NERC:main Nov 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants