Skip to content

Commit

Permalink
Merge pull request #115 from bird-house/upstream-changes
Browse files Browse the repository at this point in the history
Fast-forward changes from upstream, enable testing
  • Loading branch information
Zeitsperre authored Jan 12, 2024
2 parents bc8a389 + 3666937 commit 3c9bbed
Show file tree
Hide file tree
Showing 33 changed files with 443 additions and 462 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build ⚙️
name: Build ⚙️

on:
push:
Expand All @@ -18,25 +18,26 @@ jobs:
python-version: "3.8"
- tox-env: py39
python-version: "3.9"
- tox-env: pypy37
python-version: "pypy-3.7"
- tox-env: pypy38
python-version: "pypy-3.8"
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout repository and submodules
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install packages
run: |
sudo apt-get -y install pandoc
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
run: |
pip install tox
- name: Test with pytest and tox ⚙️
run: tox -e ${{ matrix.tox-env }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Temporary Items
# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
Expand Down Expand Up @@ -99,4 +100,4 @@ python_boilerplate/
cookiecutter-pypackage-env/

# IDE settings
.vscode/
.vscode/
28 changes: 28 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: mambaforge-22.9

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

conda:
environment: environment.yml

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
extra_requirements:
- dev
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ development. Please note this documentation assumes you already have

6. The next step would be to run the test cases. `cookiecutter-pypackage` uses
pytest, you can run PyTest. Before you run pytest you should ensure all
dependancies are installed:
dependencies are installed:

.. code-block:: bash
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include Makefile
include requirements_dev.txt
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ help:
.PHONY: test
test:
@echo "Running all tests"
pytest
@bash -c 'pytest'

.PHONY: test-no-gdal
test-no-gdal:
@echo "Running all tests"
@bash -c 'pytest -m "not requires_gdal"'

.PHONY: clean
clean:
Expand Down
41 changes: 20 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Cookiecutter for Birdhouse
:target: http://cookiecutter-birdhouse.readthedocs.org/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://travis-ci.org/bird-house/cookiecutter-birdhouse.svg?branch=master
:target: https://travis-ci.org/bird-house/cookiecutter-birdhouse
:alt: Travis Build
.. image:: https://github.com/bird-house/cookiecutter-birdhouse/actions/workflows/main.yml/badge.svg
:target: https://github.com/bird-house/cookiecutter-birdhouse/actions/workflows/main.yml
:alt: GitHub Workflows

.. image:: https://readthedocs.org/projects/cookiecutter-pypackage/badge/?version=latest
:target: https://cookiecutter-pypackage.readthedocs.io/en/latest/?badge=latest
Expand Down Expand Up @@ -48,10 +48,10 @@ Features
--------

* Testing setup with ``unittest`` and ``python setup.py test`` or ``pytest``
* Travis-CI_: Ready for Travis Continuous Integration testing
* Tox_ testing: Setup to easily test for Python 3.6, 3.7, 3.8
* Sphinx_ docs: Documentation ready for generation with, for example, ReadtheDocs_
* bumpversion_: Pre-configured version bumping with a single command
* GitHub_Workflows_: Ready for GitHub Workflows Continuous Integration testing
* Tox_ testing: Setup to easily test for Python 3.7, 3.8, 3.9, 3.10, and 3.11
* Sphinx_ docs: Documentation ready for generation with, for example, ReadTheDocs_
* bump2version_: Pre-configured version bumping with a single command
* Auto-release to PyPI_ when you push a new tag to master (optional)
* A :file:`Makefile` to install the code, start, stop and poll the server and more

Expand Down Expand Up @@ -102,15 +102,14 @@ your generated bird.
Usage
-----

After answering the questions asked during installation, a *bird* Python package will be
created in your current working directory. This package will contain a configurable PyWPS
service with some initial test processes.
After answering the questions asked during installation, a *bird* Python package will be created in your current working directory.
This package will contain a configurable PyWPS service with some initial test processes.

Then:

* Create a repo and put it there.
* Add the repo to your Travis-CI_ account.
* Add the repo to your ReadTheDocs_ account + turn on the ReadTheDocs service hook.
* Create a repository on GitHub and upload files there.
* Enable GitHub_Workflows_ for the repository.
* Add the repo to your ReadTheDocs_ account, then turn on the ReadTheDocs service hook.

For more details, see the `cookiecutter-pypackage tutorial`_.

Expand All @@ -123,7 +122,7 @@ To keep the generated bird up-to-date with the cookiecutter template:
$ cruft update # uses configurations in the .cruft.json file
Cruft can be configured to ignore template changes to certain files, see
https://timothycrosley.github.io/cruft/#updating-a-project. Potential files to
https://cruft.github.io/cruft/#updating-a-project. Potential files to
ignore:

* demonstration files, because they are meant to be erased
Expand Down Expand Up @@ -191,23 +190,23 @@ Make a new version of this Cookiecutter in the following steps:

* Make sure everything is commit to GitHub.
* Update ``CHANGES.rst`` with the next version.
* Dry Run: ``bumpversion --dry-run --verbose --new-version 0.3.1 patch``
* Do it: ``bumpversion --new-version 0.3.1 patch``
* ... or: ``bumpversion --new-version 0.4.0 minor``
* Dry Run: ``bump2version --dry-run --verbose --new-version 0.3.1 patch``
* Do it: ``bump2version --new-version 0.3.1 patch``
* ... or: ``bump2version --new-version 0.4.0 minor``
* Push it: ``git push --tags``

See the bumpversion_ documentation for details.
See the bump2version_ documentation for details.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _Cruft: https://timothycrosley.github.io/cruft/
.. _Cruft: https://cruft.github.io/cruft/
.. _`cookiecutter-pypackage tutorial`: https://cookiecutter-pypackage.readthedocs.io/en/latest/tutorial.html
.. _cruft_skip: https://github.com/bird-house/emu/commit/fb1ff9ffdf9e7f0282b36ff0727996cba3bf081a
.. _cruft_link: https://github.com/bird-house/finch/pull/128/commits/0b0d7f37966cbb5bf345dfd4b4ac7953f38f4867
.. _Travis-CI: http://travis-ci.org/
.. _GitHub_Workflows: https://docs.github.com/en/actions/using-workflows
.. _Tox: http://testrun.org/tox/
.. _Sphinx: http://sphinx-doc.org/
.. _ReadTheDocs: https://readthedocs.io/
.. _bumpversion: https://pypi.org/project/bumpversion/
.. _bump2version: https://pypi.org/project/bump2version/
.. _0.2.x: https://github.com/bird-house/cookiecutter-birdhouse/tree/0.2.x
.. _Poetry: https://python-poetry.org/
.. _PyPi: https://pypi.python.org/pypi
Expand Down
1 change: 1 addition & 0 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"open_source_license": ["Apache Software License 2.0", "MIT license", "BSD license", "ISC license", "GNU General Public License v3", "Not open source"],
"http_port": "5000",
"use_pytest": "y",
"use_black": "n",
"create_author_file": "y",
"_copy_without_render": [
"{{cookiecutter.project_slug}}/templates/*.cfg"
Expand Down
6 changes: 4 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
author = 'Birdhouse'

# The short X.Y version
# FIXME: this should reflect the version of cookiecutter-birdhouse
version = ''
# The full version, including alpha/beta/rc tags
release = '0.6.0'
# FIXME: this should reflect the version of cookiecutter-birdhouse
release = ''


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -63,7 +65,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Advanced Features
.. toctree::
:maxdepth: 2

travis_pypi_setup
console_script_setup


Expand Down
2 changes: 1 addition & 1 deletion docs/source/prompts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ project_name
The name of your new Python package project. This is used in documentation, so spaces and any characters are fine here.

project_slug
The namespace of your Python package. This should be Python import-friendly. Typically, it is the slugified version of project_name. Note: your PyPi project and Travis links will use project_slug, so change those in the README afterwards.
The namespace of your Python package. This should be Python import-friendly. Typically, it is the slugified version of project_name. Note: your PyPI project links will use project_slug, so change those in the README afterwards.

project_short_description
A 1-sentence description of what your Python package does.
Expand Down
62 changes: 0 additions & 62 deletions docs/source/travis_pypi_setup.rst

This file was deleted.

Loading

0 comments on commit 3c9bbed

Please sign in to comment.