diff --git a/build_natlinkcore.ps1 b/build_natlinkcore.ps1 deleted file mode 100644 index 80e5d33..0000000 --- a/build_natlinkcore.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#powershell to run the tests, then build the python package. -$ErrorActionPreference = "Stop" -pytest --capture=tee-sys -flit build --format sdist \ No newline at end of file diff --git a/publish_natlinkcore.ps1 b/publish_natlinkcore.ps1 deleted file mode 100644 index 91f3236..0000000 --- a/publish_natlinkcore.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#powershell to run the tests, then build the python package. -$ErrorActionPreference = "Stop" -py -m pytest -py -m flit publish \ No newline at end of file diff --git a/readme.md b/readme.md index 312d2e5..7326716 100644 --- a/readme.md +++ b/readme.md @@ -9,6 +9,8 @@ You can install from [The Python Package Index (PyPI)](https://pypi.org/) with `py -m pip install natlinkcore` +Note that natlinkcore will not install if you have not installed Natlink first. Natlink is installed through running an installer. + ## Test Framework Tests use the [pytest](https://docs.pytest.org/) framework. @@ -20,37 +22,15 @@ Mandy Python IDEs such as [Visual Studio Code](https://code.visualstudio.com/) h ## Building the Python Package Locally -The build happens through a powershell script. You don't have to know much powershell. -The powershell script runs the tests using [pytest](https://docs.pytest.org/). - -The package is built with [Flit](https://flit.pypa.io/). The package will be produced in -dist/natlinkcore-x.y.z-py3-none-any.whl. To install it `py -m pip install dist/natlinkcore-x.y.z-py3-none-any.whl` replacing x.y with the version numbers. - -Normally if you are developing natlinkcore, you will with instead to install with `py -m pip install -e .`, which will -let you make and test changes without reinstalling natlinkcore with pip. **Note the flit install --symlink or --pth-file options are problematic so just use pip.** - - -To start a powershell from the command prompt, type `powershell`. - -To build the package: - +`py -m build` to build the Python package locally. -`py -m flit build` from powershell or command prompt, which will run the the tests in natlinkcore/test, then build the the package. - - -To publish the package to [The Python Package Index (PyPI)](https://pypi.org/) - -`publish_natlinkcore` from powershell. - - - +Publishing to PyPi is done through the [trusted publisher mechanism](https://docs.pypi.org/trusted-publishers/using-a-publisher/) when a release is created on github using github actions. ## Publishing checklist Before you bump the version number in __init__.py and publish: - Check the pyroject.toml file for package dependancies. Do you need a specfic or newer version of a dependancy such as dtactions? Then add or update the version # requirement in dtactions. -- don't publish if the tests are failing. The `publish_natlinkcore` will prevent this, please don't work around it. ## Debugging Instructions