Reorganize project following standard Python conventions#17
Merged
memalhot merged 1 commit intoOCP-on-NERC:mainfrom Nov 5, 2025
Merged
Reorganize project following standard Python conventions#17memalhot merged 1 commit intoOCP-on-NERC:mainfrom
memalhot merged 1 commit intoOCP-on-NERC:mainfrom
Conversation
efcf2c3 to
d73796b
Compare
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/
d73796b to
ca0ca5d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit relocates all of the Python source files into the
batchtoolspackage. 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 thepackage on the local system.
You can also install the package straight from the GitHub repository:
We install a runnable
batchtoolsscript.By setting
project.scriptsinpyproject.toml, we install abatchtoolscommand when we install the package. This permits you to runthe code by simply typing
batchtoolsat the command line, just like anyother command.
You can run the script without installing it using the
uv runcommand:We have a distributable package.
Running
uv buildwill produce a distributable Python package (botha
.tar.gzfile and a Python wheel 1) in thedist/directory. Thiscan be uploaded to PyPi using
uv publish, or simply copied andinstalled somewhere using
pip.