A Python library for reading and writing CFF files.
Note that this is an early prototype. Please do not use this for anything beyond playing with things, it is completely untested and probably buggy.
Here we provide some details about the project setup. Most of the choices are explained in the guide. Links to the relevant sections are included below. Feel free to remove this text when the development of the software package takes off.
For a quick reference on software development, we refer to the software guide checklist.
Once your Python package is created, put it under version control! We recommend using git and github.
cd pycff
git init
git add -A
git commit
To put your code on github, follow this tutorial.
This repository is set up with Python versions:
- 3.5
- 3.6
- 3.7
Add or remove Python versions based on project requirements. The guide contains more information about Python versions and writing Python 2 and 3 compatible code.
You can use either pip or conda for installing dependencies and package management. This repository does not force you to use one or the other, as project requirements differ. For advice on what to use, please check the relevant section of the guide.
- Dependencies should be added to setup.py in the install_requires list.
You can distribute your code using pipy or conda. Again, the project template does not enforce the use of either one. The guide can help you decide which tool to use for packaging.
- Tests should be put in the
tests
folder. - The testing framework used is PyTest
- Tests can be run with
python setup.py test
- This is configured in
setup.py
andsetup.cfg
- This is configured in
- Use Travis CI to automatically run tests and to test using multiple Python versions
- Configuration can be found in
.travis.yml
- Getting started with Travis CI
- Configuration can be found in
- TODO: add something about code quality/coverage tool?
- Relevant section in the guide
- Documentation should be put in the
docs
folder. The contents have been generated usingsphinx-quickstart
(Sphinx version 1.6.5). - We recommend writing the documentation using Restructured Text (reST) and Google style docstrings.
- To generate html documentation run
python setup.py build_sphinx
- This is configured in
setup.cfg
- Alternatively, run
make html
in thedocs
folder.
- This is configured in
- The
docs/_static
anddocs/_templates
contain an (empty).gitignore
file, to be able to add them to the repository. These two files can be safely removed (or you can just leave them there). - To put the documentation on Read the Docs, log in to your Read the Docs account, and import the repository (under 'My Projects').
- Include the link to the documentation in this README.
- Relevant section in the guide
- Check your code style with
prospector
- You may need run
pip install .[dev]
first, to install the required dependencies - You can use
yapf
to fix the readability of your code style andisort
to format and group your imports - Relevant section in the guide
- Document changes to your software package
- Relevant section in the guide
- To allow others to cite your software, add a
CITATION.cff
file - It only makes sense to do this once there is something to cite (e.g., a software release with a DOI).
- To generate a CITATION.cff file given a DOI, use doi2cff.
- Relevant section in the guide
- Information about how to behave professionally
- Relevant section in the guide
- Information about how to contribute to this software package
- Relevant section in the guide
- List non-Python files that should be included in a source distribution
- Relevant section in the guide
- List of licenses of the project and dependencies
- Relevant section in the guide
To install pycff, do:
git clone https://github.com/NLeSC/pycff.git
cd pycff
pip install .
Run tests (including coverage) with:
python setup.py test
Include a link to your project's full documentation here.
If you want to contribute to the development of PyCFF, have a look at the contribution guidelines.
Copyright (c) 2018, Netherlands eScience Center
Apache Software License 2.0
This package was created with Cookiecutter and the NLeSC/python-template.