Sample package including general package structure, testing with pytest and documentation with sphinx.
If you want to create your own package, you can use this package as a starting point.
Note, that the repository is under current development!
Please fill out the codemeta.json file. It describes the metadata of your package according to the CodeMeta Project.
If you use anaconda
, you may first create an environment:
::
conda create -n sampleprojet python=3.8
conda activate samplepackage
Here's a conda cheatsheet.
Navigate to the repository directory.
For development: ::
pip install -e ".[complete]"
otherwise ::
pip install ".[complete]"
To only install special functionality, e.g. only vtk support in addition to core dependencies, run: ::
pip install (-e) ".[docs]"
Documentation can be build following the README.md in the doc/ folder
Go here for instructions on how to run tests.
Feel free to contribute.
See here for more information. Here's a quick summary: ::
# generate distribution packages
python -m pip install --upgrade build
python -m build
# upload to pypi
python -m pip install --upgrade twine
python -m twine upload --repository testpypi dist/*
# Install from testpypi:
py -m pip install --index-url https://test.pypi.org/simple/ --no-deps example-package-YOUR-USERNAME-HERE
# If everything worked until here, upload to pip:
python -m twine upload dist/*
To get code coverage, you need register at codecov.io and add a token to your repository secrets. Everything will be explained here Then add the image to your README file.