From 493e8cc81cbf9251c86e0a57d09757542d9d8595 Mon Sep 17 00:00:00 2001 From: steff456 Date: Wed, 10 Jul 2019 11:24:07 -0500 Subject: [PATCH 1/5] remove outdated files --- README.md | 31 ----- cookiecutter.json | 3 +- requirements.txt | 1 - {{ cookiecutter.repo_name }}/.ciocheck | 110 ------------------ .../.circleci/config.yml | 48 -------- {{ cookiecutter.repo_name }}/.coveragerc | 14 --- .../.github/CONTRIBUTING.md | 15 --- .../.github/ISSUE_TEMPLATE.md | 20 ---- .../.github/PULL_REQUEST_TEMPLATE.md | 11 -- {{ cookiecutter.repo_name }}/.scrutinizer.yml | 13 --- {{ cookiecutter.repo_name }}/.travis.yml | 0 {{ cookiecutter.repo_name }}/CHANGELOG.md | 0 {{ cookiecutter.repo_name }}/CONTRIBUTORS.md | 1 - {{ cookiecutter.repo_name }}/LICENSE.txt | 21 ---- {{ cookiecutter.repo_name }}/MANIFEST.in | 10 +- {{ cookiecutter.repo_name }}/README.rst | 34 ------ {{ cookiecutter.repo_name }}/RELEASE.md | 0 {{ cookiecutter.repo_name }}/appveyor.yml | 41 ------- .../conda.recipe/meta.yaml | 46 -------- .../conda.recipe/yum_requirements.txt | 2 - {{ cookiecutter.repo_name }}/gitattributes | 4 - {{ cookiecutter.repo_name }}/requirements.txt | 6 + {{ cookiecutter.repo_name }}/setup.cfg | 14 --- {{ cookiecutter.repo_name }}/setup.py | 22 ---- .../__init__.py | 13 +-- 25 files changed, 10 insertions(+), 470 deletions(-) delete mode 100644 {{ cookiecutter.repo_name }}/.ciocheck delete mode 100644 {{ cookiecutter.repo_name }}/.circleci/config.yml delete mode 100644 {{ cookiecutter.repo_name }}/.coveragerc delete mode 100644 {{ cookiecutter.repo_name }}/.github/CONTRIBUTING.md delete mode 100644 {{ cookiecutter.repo_name }}/.github/ISSUE_TEMPLATE.md delete mode 100644 {{ cookiecutter.repo_name }}/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 {{ cookiecutter.repo_name }}/.scrutinizer.yml delete mode 100644 {{ cookiecutter.repo_name }}/.travis.yml delete mode 100644 {{ cookiecutter.repo_name }}/CHANGELOG.md delete mode 100644 {{ cookiecutter.repo_name }}/CONTRIBUTORS.md delete mode 100644 {{ cookiecutter.repo_name }}/LICENSE.txt delete mode 100644 {{ cookiecutter.repo_name }}/RELEASE.md delete mode 100644 {{ cookiecutter.repo_name }}/appveyor.yml delete mode 100644 {{ cookiecutter.repo_name }}/conda.recipe/meta.yaml delete mode 100644 {{ cookiecutter.repo_name }}/conda.recipe/yum_requirements.txt diff --git a/README.md b/README.md index 6021e2a..39f48f4 100644 --- a/README.md +++ b/README.md @@ -8,26 +8,6 @@ ## Build status [![CircleCI](https://circleci.com/gh/spyder-ide/spyder-plugin-cookiecutter.svg?style=svg)](https://circleci.com/gh/spyder-ide/spyder-plugin-cookiecutter) ----- - -## Important Announcement: Spyder is unfunded! - -Since mid November/2017, [Anaconda, Inc](https://www.anaconda.com/) has -stopped funding Spyder development, after doing it for the past 18 -months. Because of that, development will focus from now on maintaining -Spyder 3 at a much slower pace than before. - -If you want to contribute to maintain Spyder, please consider donating at - -https://opencollective.com/spyder - -We appreciate all the help you can provide us and can't thank you enough for -supporting the work of Spyder devs and Spyder development. - -If you want to know more about this, please read this -[page](https://github.com/spyder-ide/spyder/wiki/Anaconda-stopped-funding-Spyder). - ----- ## Overview @@ -63,10 +43,6 @@ Powered by [Cookiecutter](https://github.com/audreyr/cookiecutter) :cookie:, Spy - Integration with [ciocheck](https://github.com/ContinuumIO/ciocheck/) for linting and codestyle checking - Integration with [Scrutinizer CI](https://scrutinizer-ci.com/) for Code Quality -### Repo Managing - -- (Optional) Version managing with [versioneer](https://github.com/warner/python-versioneer) - ## Usage @@ -76,12 +52,6 @@ First, get Cookiecutter: $ conda install "cookiecutter>=1.4.0" ``` -If you want to use versioneer: (also you need to install git) - -``` -$ conda install versioneer -``` - Now run against the repo: ``` @@ -107,7 +77,6 @@ create_config_page [n]: use_ciocheck [y]: support_python_2 [n]: spyder3_compatibility [y]: -use_versioneer [y]: ``` ## Testing diff --git a/cookiecutter.json b/cookiecutter.json index b925566..8b875da 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -10,6 +10,5 @@ "create_config_page": "n", "use_ciocheck": "y", "support_python_2": "n", - "spyder3_compatibility": "y", - "use_versioneer": "n" + "spyder3_compatibility": "y" } diff --git a/requirements.txt b/requirements.txt index 9d3aca6..3f2c1a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ cookiecutter>=1.4.0 -versioneer==0.17 # Testing pytest==3.0.5 diff --git a/{{ cookiecutter.repo_name }}/.ciocheck b/{{ cookiecutter.repo_name }}/.ciocheck deleted file mode 100644 index 1e27498..0000000 --- a/{{ cookiecutter.repo_name }}/.ciocheck +++ /dev/null @@ -1,110 +0,0 @@ -# ----------------------------------------------------------------------------- -# ciocheck -# https://github.com/ContinuumIO/ciocheck -# ----------------------------------------------------------------------------- -[ciocheck] -inherit_config = .ciocheck -branch = origin/master -diff_mode = commited -file_mode = all -check = pep8,pydocstyle,flake8,pylint,pyformat,isort,autopep8,yapf,coverage,pytest -enforce =flake8,isort,yapf - -# Python (pyformat) -header = # -*- coding: utf-8 -*- -copyright_file = .ciocopyright -add_copyright = true -add_header = true -add_init = true - -# ----------------------------------------------------------------------------- -# pep8 -# https://pep8.readthedocs.io/en/release-1.7.x/intro.html#configuration -# ----------------------------------------------------------------------------- -[pep8] -exclude = */tests/* -ignore = E126, -max-line-length = 79 - -# ----------------------------------------------------------------------------- -# pydocstyle -# http://www.pydocstyle.org/en/latest/usage.html#example -# ----------------------------------------------------------------------------- -[pydocstyle] -add-ignore = D203, -inherit = false - -# ----------------------------------------------------------------------------- -# Flake 8 -# https://flake8.readthedocs.io/en/latest/user/configuration.html -# ----------------------------------------------------------------------------- -[flake8] -exclude = */tests/* -ignore = E126, -max-line-length = 79 -max-complexity = 64 - -# ----------------------------------------------------------------------------- -# pylint -# https://pylint.readthedocs.io/en/latest/ -# ----------------------------------------------------------------------------- -#[pylint:messages] - -# ----------------------------------------------------------------------------- -# isort -# https://github.com/timothycrosley/isort/wiki/isort-Settings -# ----------------------------------------------------------------------------- -[isort] -from_first = true -import_heading_stdlib = Standard library imports -import_heading_firstparty = Local imports -import_heading_thirdparty = Third party imports -indent = ' ' -known_first_party = ciocheck -known_third_party = six,pytest,autopep8,yapf,pylint -line_length = 79 -sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER - -# ----------------------------------------------------------------------------- -# YAPF -# https://github.com/google/yapf#formatting-style -# ----------------------------------------------------------------------------- -[yapf:style] -based_on_style = pep8 -column_limit = 79 -spaces_before_comment = 2 - -# ----------------------------------------------------------------------------- -# autopep8 -# https://pep8.readthedocs.io/en/latest/intro.html#configuration -# ----------------------------------------------------------------------------- -[autopep8] -exclude = */tests/* -ignore = E126, -max-line-length = 99 -aggressive = 0 - -# ----------------------------------------------------------------------------- -# Coverage -# https://coverage.readthedocs.io/en/latest/config.html -# ----------------------------------------------------------------------------- -[coverage:run] -omit = - */tests/* - -[coverage:report] -fail_under = 0 -show_missing = true -skip_covered = true -exclude_lines = - pragma: no cover - def test(): - if __name__ == .__main__.: - -# ----------------------------------------------------------------------------- -# pytest -# http://doc.pytest.org/en/latest/usage.html -# ----------------------------------------------------------------------------- -[pytest] -addopts = -rfew --durations=10 -python_functions = test_* diff --git a/{{ cookiecutter.repo_name }}/.circleci/config.yml b/{{ cookiecutter.repo_name }}/.circleci/config.yml deleted file mode 100644 index 1c35a1a..0000000 --- a/{{ cookiecutter.repo_name }}/.circleci/config.yml +++ /dev/null @@ -1,48 +0,0 @@ -# https://circleci.com/gh/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} - -# NOTE: Don't forget to add COVERALLS_REPO_TOKEN in Circle-CI private env variables. -# https://circleci.com/gh/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/edit#env-vars - -machine: - environment: - # Python versions to tests (Maximum of 4 different versions) - PY_VERSIONS: "3.6 3.5 {% if cookiecutter.support_python_2 == 'y' %}2.7{% endif %}" - # Environment variables used by astropy helpers - TRAVIS_OS_NAME: "linux" - CONDA_DEPENDENCIES_FLAGS: "--quiet" - CONDA_DEPENDENCIES: "pytest pytest-cov" - PIP_DEPENDENCIES: "coveralls pytest-qt pytest-xvfb" - -dependencies: - pre: - # We need to run a window manager to avoid focus problems when running our tests. - # See https://github.com/TestFX/TestFX/issues/158#issuecomment-62421691 - - sudo apt-get install matchbox-window-manager - override: - # First convert PY_VERSIONS to an array and then select the python version based on the CIRCLE_NODE_INDEX - # pinstall pyqt5 using pip in the python 3.6 envpiroment - - export PY_VERSIONS=($PY_VERSIONS) && - export TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]} && - echo -e "PYTHON = $TRAVIS_PYTHON_VERSION \n============" && - git clone git://github.com/astropy/ci-helpers.git > /dev/null && - source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh && - export PATH="$HOME/miniconda/bin:$PATH" && - source activate test && - conda install -q ciocheck -c spyder-ide --no-update-deps && - if [ "$CIRCLE_NODE_INDEX" = "0" ]; then pip install -q pyqt5 spyder; else conda install -q -c spyder-ide spyder; fi && - python setup.py install > /dev/null; - - DISPLAY=:99 /usr/bin/matchbox-window-manager: - background: true - - sleep 5 - -test: - override: - # Style checks - - export PATH="$HOME/miniconda/bin:$PATH" && source activate test && ciocheck {{ cookiecutter.project_name }}: # note the colon - parallel: true - # Tests - - export PATH="$HOME/miniconda/bin:$PATH" && source activate test && pytest {{ cookiecutter.project_name }}: # note the colon - parallel: true - # Coveralls - - export PATH="$HOME/miniconda/bin:$PATH" && source activate test && coveralls: # note the colon - parallel: true diff --git a/{{ cookiecutter.repo_name }}/.coveragerc b/{{ cookiecutter.repo_name }}/.coveragerc deleted file mode 100644 index 9ff44bb..0000000 --- a/{{ cookiecutter.repo_name }}/.coveragerc +++ /dev/null @@ -1,14 +0,0 @@ -[run] -omit = - */tests/* - */build/* - */external/* - -[report] -fail_under = 0 -show_missing = true -skip_covered = true -exclude_lines = - pragma: no cover - def test(): - if __name__ == .__main__.: diff --git a/{{ cookiecutter.repo_name }}/.github/CONTRIBUTING.md b/{{ cookiecutter.repo_name }}/.github/CONTRIBUTING.md deleted file mode 100644 index 907d6ee..0000000 --- a/{{ cookiecutter.repo_name }}/.github/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -# Contributing - -First off, thank you for considering contributing to {{ cookiecutter.plugin_name}}!. - -Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. - -# Guidelines Rules - -* Ensure cross-platform compatibility for every change that's accepted. Windows, Mac, Debian & Ubuntu Linux. - -# Getting started - -# Code review process - -# Community diff --git a/{{ cookiecutter.repo_name }}/.github/ISSUE_TEMPLATE.md b/{{ cookiecutter.repo_name }}/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 524a1b7..0000000 --- a/{{ cookiecutter.repo_name }}/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,20 +0,0 @@ -## Description of your problem - -**What steps will reproduce the problem?** - -1. -2. -3. - -**What is the expected output? What do you see instead?** - - -**Please provide any additional information below** - - -## Versions and main components - -* {{ cookiecutter.plugin_name}} Version: -* Spyder Version: -* Python Version: -* Operating system: diff --git a/{{ cookiecutter.repo_name }}/.github/PULL_REQUEST_TEMPLATE.md b/{{ cookiecutter.repo_name }}/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index d65d67e..0000000 --- a/{{ cookiecutter.repo_name }}/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,11 +0,0 @@ -Before submitting your pull request be sure that: - -1. You have tested your changes with the latest Spyder-IDE, at least with - PYQT5, and python3. - -{% if cookiecutter.use_ciocheck == 'y' %} -2. You haven't introduce any style isssues. -{% endif %} ----- - -*Note*: You can safely remove this text before submitting your work. diff --git a/{{ cookiecutter.repo_name }}/.scrutinizer.yml b/{{ cookiecutter.repo_name }}/.scrutinizer.yml deleted file mode 100644 index 0e13dc5..0000000 --- a/{{ cookiecutter.repo_name }}/.scrutinizer.yml +++ /dev/null @@ -1,13 +0,0 @@ -checks: - python: - code_rating: true - duplicate_code: true -filter: - excluded_paths: - - '*/tests/*' - - '*/external/*' - {%- if cookiecutter.use_versioneer == 'y' %} - - '*/versioneer.py' - {% else %} - - '*/{{ cookiecutter.project_name }}/_version.py' - {%- endif %} diff --git a/{{ cookiecutter.repo_name }}/.travis.yml b/{{ cookiecutter.repo_name }}/.travis.yml deleted file mode 100644 index e69de29..0000000 diff --git a/{{ cookiecutter.repo_name }}/CHANGELOG.md b/{{ cookiecutter.repo_name }}/CHANGELOG.md deleted file mode 100644 index e69de29..0000000 diff --git a/{{ cookiecutter.repo_name }}/CONTRIBUTORS.md b/{{ cookiecutter.repo_name }}/CONTRIBUTORS.md deleted file mode 100644 index 666d311..0000000 --- a/{{ cookiecutter.repo_name }}/CONTRIBUTORS.md +++ /dev/null @@ -1 +0,0 @@ -{{ cookiecutter.author }} (@{{ cookiecutter.github_username }}) diff --git a/{{ cookiecutter.repo_name }}/LICENSE.txt b/{{ cookiecutter.repo_name }}/LICENSE.txt deleted file mode 100644 index 513ed35..0000000 --- a/{{ cookiecutter.repo_name }}/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.author }} - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/{{ cookiecutter.repo_name }}/MANIFEST.in b/{{ cookiecutter.repo_name }}/MANIFEST.in index a986f5c..ffc69de 100644 --- a/{{ cookiecutter.repo_name }}/MANIFEST.in +++ b/{{ cookiecutter.repo_name }}/MANIFEST.in @@ -1,10 +1,2 @@ -include CHANGELOG.md -include CONTRIBUTORS.md -include LICENSE.txt include README.rst -recursive-include assets/* - -{%- if cookiecutter.use_versioneer == 'y' %} -include versioneer.py -include {{ cookiecutter.project_name }}/_version.py -{%- endif %} +recursive-include assets/* \ No newline at end of file diff --git a/{{ cookiecutter.repo_name }}/README.rst b/{{ cookiecutter.repo_name }}/README.rst index d698bb0..e97d741 100644 --- a/{{ cookiecutter.repo_name }}/README.rst +++ b/{{ cookiecutter.repo_name }}/README.rst @@ -1,40 +1,6 @@ {{ cookiecutter.plugin_name }} ====== -Build status ------------- -|travis status| |appveyor status| |circleci status| |coverage| |scrutinizer| - -Project information -------------------- -|license| |pypi version| |gitter| - -.. |travis status| image:: https://img.shields.io/travis/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/master.svg - :target: https://travis-ci.org/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} - :alt: Travis-CI build status -.. |appveyor status| image:: https://img.shields.io/appveyor/ci/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/master.svg - :target: https://ci.appveyor.com/project/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} - :alt: Appveyor build status -.. |circleci status| image:: https://img.shields.io/circleci/project/github/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/master.svg - :target: https://circleci.com/gh/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/tree/master - :alt: Circle-CI build status -.. |scrutinizer| image:: https://img.shields.io/scrutinizer/g/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}.svg - :target: https://scrutinizer-ci.com/g/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/?branch=master - :alt: Scrutinizer Code Quality -.. |license| image:: https://img.shields.io/pypi/l/{{ cookiecutter.repo_name }}.svg - :target: LICENSE.txt - :alt: License -.. |pypi version| image:: https://img.shields.io/pypi/v/{{ cookiecutter.repo_name }}.svg - :target: https://pypi.python.org/pypi/{{ cookiecutter.repo_name }} - :alt: Latest PyPI version -.. |gitter| image:: https://badges.gitter.im/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}.svg - :target: https://gitter.im/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} - :alt: Join the chat at https://gitter.im/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} -.. |coverage| image:: https://coveralls.io/repos/github/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}/badge.svg - :target: https://coveralls.io/github/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}?branch=master - :alt: Code Coverage - - Description ----------- {{ cookiecutter.description }}. diff --git a/{{ cookiecutter.repo_name }}/RELEASE.md b/{{ cookiecutter.repo_name }}/RELEASE.md deleted file mode 100644 index e69de29..0000000 diff --git a/{{ cookiecutter.repo_name }}/appveyor.yml b/{{ cookiecutter.repo_name }}/appveyor.yml deleted file mode 100644 index fca4a5c..0000000 --- a/{{ cookiecutter.repo_name }}/appveyor.yml +++ /dev/null @@ -1,41 +0,0 @@ -# https://ci.appveyor.com/project/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} - -environment: - - global: - PYTHON: "C:\\conda" - MINICONDA_VERSION: "latest" - CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd" - PIP_DEPENDENCIES_FLAGS: "-q" - CONDA_DEPENDENCIES_FLAGS: "--quiet" - CONDA_DEPENDENCIES: > - spyder pytest pytest-cov - PIP_DEPENDENCIES: "pytest-qt pytest-xvfb" - - matrix: - - PYTHON_VERSION: "2.7" - - PYTHON_VERSION: "3.5" - - PYTHON_VERSION: "3.6" - -platform: - -x64 - -install: - # If there is a newer build queued for the same PR, cancel this one. - # The AppVeyor 'rollout builds' option is supposed to serve the same - # purpose but it is problematic because it tends to cancel builds pushed - # directly to master instead of just PR builds (or the converse). - # credits: JuliaLang developers. - - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` - https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` - Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` - throw "There are newer queued builds for this pull request, failing early." } - - "git clone git://github.com/astropy/ci-helpers.git" - - "powershell ci-helpers/appveyor/install-miniconda.ps1" - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - - "activate test" - -build: false - -test_script: - - "%CMD_IN_ENV% {{ cookiecutter.project_name }}" diff --git a/{{ cookiecutter.repo_name }}/conda.recipe/meta.yaml b/{{ cookiecutter.repo_name }}/conda.recipe/meta.yaml deleted file mode 100644 index 8bc4235..0000000 --- a/{{ cookiecutter.repo_name }}/conda.recipe/meta.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{%- raw %}{%{% endraw %} set name = "{{ cookiecutter.repo_name }}" {% raw %}%}{% endraw %} -{%- raw %} -{% set version = "0.1" %} -{% set hash_type = "sha256" %} -{% set hash = "" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - fn: {{ name }}-{{ version }}.tar.gz - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - {{ hash_type }}: {{ hash }} -{% endraw %} -build: - number: 0 - script: python setup.py install --single-version-externally-managed --record=record.txt - -requirements: - build: - - python - - setuptools - - run: - - python - - spyder >=3.2 - - qtpy - -test: - imports: - - {{ cookiecutter.project_name }} - -about: - home: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} - license: MIT - license_family: MIT - license_file: LICENSE.txt - summary: '{{ cookiecutter.description }}' - description: | - {{ cookiecutter.description }} - dev_url: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }} - -extra: - recipe-maintainers: - - {{ cookiecutter.github_username }} diff --git a/{{ cookiecutter.repo_name }}/conda.recipe/yum_requirements.txt b/{{ cookiecutter.repo_name }}/conda.recipe/yum_requirements.txt deleted file mode 100644 index ab15633..0000000 --- a/{{ cookiecutter.repo_name }}/conda.recipe/yum_requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -xorg-x11-server-Xvfb -libXcomposite \ No newline at end of file diff --git a/{{ cookiecutter.repo_name }}/gitattributes b/{{ cookiecutter.repo_name }}/gitattributes index 90f64ac..288029d 100644 --- a/{{ cookiecutter.repo_name }}/gitattributes +++ b/{{ cookiecutter.repo_name }}/gitattributes @@ -3,7 +3,3 @@ meta.yaml text eol=lf build.sh text eol=lf bld.bat text eol=crlf - -{%- if cookiecutter.use_versioneer == 'y' %} -{{ cookiecutter.project_name }}/_version.py export-subst -{%- endif %} diff --git a/{{ cookiecutter.repo_name }}/requirements.txt b/{{ cookiecutter.repo_name }}/requirements.txt index 02c06da..aafdeb9 100644 --- a/{{ cookiecutter.repo_name }}/requirements.txt +++ b/{{ cookiecutter.repo_name }}/requirements.txt @@ -1 +1,7 @@ +{%- if cookiecutter.spyder3_compatibility == 'y' -%} spyder>=3.1 +{%- else -%} +spyder>=4.0.0b3 +{%- enfif -%} +pytest +pytest-qt \ No newline at end of file diff --git a/{{ cookiecutter.repo_name }}/setup.cfg b/{{ cookiecutter.repo_name }}/setup.cfg index 8690dd5..5e3b468 100644 --- a/{{ cookiecutter.repo_name }}/setup.cfg +++ b/{{ cookiecutter.repo_name }}/setup.cfg @@ -6,17 +6,3 @@ universal=1 [tool:pytest] addopts =-x -v -rw --durations=10 --cov={{ cookiecutter.project_name }} --cov-report=term-missing - -{% if cookiecutter.use_versioneer == 'y' %} -# See the docstring in versioneer.py for instructions. Note that you must -# re-run 'versioneer.py setup' after changing this section, and commit the -# resulting files. - -[versioneer] -VCS = git -style = pep440 -versionfile_source = {{ cookiecutter.project_name }}/_version.py -versionfile_build = {{ cookiecutter.project_name }}/_version.py -tag_prefix = v - -{% endif%} diff --git a/{{ cookiecutter.repo_name }}/setup.py b/{{ cookiecutter.repo_name }}/setup.py index 71a0ffc..db5286c 100644 --- a/{{ cookiecutter.repo_name }}/setup.py +++ b/{{ cookiecutter.repo_name }}/setup.py @@ -13,26 +13,10 @@ # Third party imports from setuptools import find_packages, setup -{%- if cookiecutter.use_versioneer == 'y' %} -import versioneer -{%- endif %} HERE = os.path.abspath(os.path.dirname(__file__)) -{%- if cookiecutter.use_versioneer == 'n' %} -def get_version(module='{{ cookiecutter.project_name }}'): - """Get version.""" - with open(os.path.join(HERE, module, '_version.py'), 'r') as f: - data = f.read() - lines = data.split('\n') - for line in lines: - if line.startswith('version_info'): - version_tuple = ast.literal_eval(line.split('=')[-1].strip()) - version = '.'.join(map(str, version_tuple)) - break - return version -{%- endif %} def get_description(): """Get long description.""" @@ -46,12 +30,6 @@ def get_description(): setup( name='{{ cookiecutter.repo_name }}', -{%- if cookiecutter.use_versioneer == 'y' %} - version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), -{%- else %} - version=get_version(), -{%- endif %} keywords=['Spyder', 'Plugin'], url='https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.repo_name }}', license='MIT', diff --git a/{{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/__init__.py b/{{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/__init__.py index 9490f1a..289ceee 100644 --- a/{{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/__init__.py +++ b/{{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/__init__.py @@ -6,19 +6,10 @@ # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder {{ cookiecutter.plugin_name }} Plugin.""" - -{% if cookiecutter.use_versioneer == 'y' -%} -from ._version import get_versions - -__version__ = get_versions()['version'] -del get_versions - -{%- else %} from ._version import __version__ -{%- endif %} # The following statements are required to register this 3rd party plugin: -from .{{ cookiecutter.plugin_name.lower().replace(' ', '') }}plugin import {{ cookiecutter.plugin_name.replace(' ', '') }}Plugin +from .{{cookiecutter.plugin_name.lower().replace(' ', '')}}plugin import {{cookiecutter.plugin_name.replace(' ', '')}}Plugin -PLUGIN_CLASS = {{ cookiecutter.plugin_name.replace(' ', '') }}Plugin +PLUGIN_CLASS = {{cookiecutter.plugin_name.replace(' ', '')}}Plugin From 9715af456a43706a4ee5ec104bc95926f22f4888 Mon Sep 17 00:00:00 2001 From: steff456 Date: Thu, 11 Jul 2019 11:22:16 -0500 Subject: [PATCH 2/5] update spyder version --- {{ cookiecutter.repo_name }}/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{ cookiecutter.repo_name }}/requirements.txt b/{{ cookiecutter.repo_name }}/requirements.txt index aafdeb9..2184c90 100644 --- a/{{ cookiecutter.repo_name }}/requirements.txt +++ b/{{ cookiecutter.repo_name }}/requirements.txt @@ -1,5 +1,5 @@ {%- if cookiecutter.spyder3_compatibility == 'y' -%} -spyder>=3.1 +spyder>=3.3 {%- else -%} spyder>=4.0.0b3 {%- enfif -%} From bbde0f0b8ed300d8774b10484de04f6224332c6b Mon Sep 17 00:00:00 2001 From: steff456 Date: Wed, 17 Jul 2019 16:48:30 -0500 Subject: [PATCH 3/5] resolve conflicts --- requirements.txt | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 3f2c1a1..0000000 --- a/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -cookiecutter>=1.4.0 - -# Testing -pytest==3.0.5 -pytest-cookies==0.2.0 -ciocheck==0.1.1 - -# Building -entrypoints==0.2.2 From 902417c3ac2998c3c73c002b433f911889508900 Mon Sep 17 00:00:00 2001 From: steff456 Date: Thu, 18 Jul 2019 17:28:31 -0500 Subject: [PATCH 4/5] modify test --- tests/test_cookiecutter_generation.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 3bb620c..6d82dee 100644 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -26,11 +26,8 @@ def test_default_configuration(cookies, context): # Test creation of project files - toplevel_files = ['.github', 'conda.recipe', 'CHANGELOG.md', - 'CONTRIBUTORS.md', 'LICENSE.txt', 'MANIFEST.in', - 'README.rst', 'RELEASE.md', 'setup.py', - 'requirements.txt', '.gitattributes', - '.scrutinizer.yml'] + toplevel_files = ['MANIFEST.in', 'README.rst', 'setup.py', + 'requirements.txt', '.gitattributes'] found_toplevel_files = [f.basename for f in result.project.listdir()] From 9ea4288eb3ae3a0a230d76a559a5743fff88fb7a Mon Sep 17 00:00:00 2001 From: steff456 Date: Fri, 19 Jul 2019 10:29:27 -0500 Subject: [PATCH 5/5] modified test and project generation to remove veresionneer --- hooks/post_gen_project.py | 31 ++----------------- {{ cookiecutter.repo_name }}/requirements.txt | 2 +- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 6dbf00e..0580b4f 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -1,7 +1,6 @@ """ Does the following: -1. Removes _version file and run versioneer install if use_versioneer == y """ from __future__ import print_function @@ -17,23 +16,6 @@ def remove_file(file_name): os.remove(file_name) -def remove_version_file(): - """Removes the _version file if versioneer is going to be used.""" - file_name = os.path.join(PROJECT_DIRECTORY, - '{{ cookiecutter.project_name }}', - '_version.py') - remove_file(file_name) - - -def install_versioneer(): - """Start versioneer in the repository, this will create - versioneer.py and _version.py.""" - try: - call(['versioneer', 'install']) - except Exception: - print( - "versioneer isn't avalaible, please install versioneer and run:\n $ versioneer install") - def init_git(): """Start git repository""" try: @@ -42,16 +24,7 @@ def init_git(): print("git isn't avalaible, please install git and run:\n $ git init") -# 1. Removes _version file and run versioneer install if use_versioneer == y - -if '{{ cookiecutter.use_versioneer }}'.lower() == 'y': - remove_version_file() - - init_git() - install_versioneer() - - -# 2. Moves gitattributes to .gitattributes +# 1. Moves gitattributes to .gitattributes # Having a .gitattributes with wrong syntax (because it has some jinja syntax) # cause some annoying warnings @@ -61,7 +34,7 @@ def init_git(): os.rename(old_gitattributes, new_gitattributes) -# 3. Create empty assets directory +# 2. Create empty assets directory assets_dir = os.path.join(PROJECT_DIRECTORY, '{{ cookiecutter.project_name }}', diff --git a/{{ cookiecutter.repo_name }}/requirements.txt b/{{ cookiecutter.repo_name }}/requirements.txt index 2184c90..b18a683 100644 --- a/{{ cookiecutter.repo_name }}/requirements.txt +++ b/{{ cookiecutter.repo_name }}/requirements.txt @@ -2,6 +2,6 @@ spyder>=3.3 {%- else -%} spyder>=4.0.0b3 -{%- enfif -%} +{%- endif -%} pytest pytest-qt \ No newline at end of file