Skip to content

Commit

Permalink
Add initial project skeleton
Browse files Browse the repository at this point in the history
Created using ionelmc's [cookiecutter][0] [template][1] with these
parameters:

        _extensions:               ['jinja2_time.TimeExtension']
        _template:                 'gh:ionelmc/cookiecutter-pylibrary'
        allow_tests_inside_package: 'no'
        appveyor:                  'no'
        c_extension_function:      'longest'
        c_extension_module:        '_oemof.network'
        c_extension_optional:      'no'
        c_extension_support:       'no'
        c_extension_test_pypi:     'no'
        c_extension_test_pypi_username: 'oemof'
        codacy:                    'yes'
        codacy_projectid:          'CODACY_PROJECT_ID'
        codeclimate:               'yes'
        codecov:                   'no'
        command_line_interface:    'no'
        command_line_interface_bin_name: 'oemof.network'
        coveralls:                 'yes'
        coveralls_token:           'COVERALLSTOKEN'
        distribution_name:         'oemof.network'
        email:                     '[email protected]'
        full_name:                 'Stephan Günther'
        landscape:                 'no'
        license:                   'MIT license'
        linter:                    'flake8'
        package_name:              'oemof.network'
        project_name:              'oemof.network'
        project_short_description: 'The network/graph submodules of
oemof.'
        pypi_badge:                'yes'
        pypi_disable_upload:       'no'
        release_date:              '2020-04-01'
        repo_hosting:              'github.com'
        repo_hosting_domain:       'github.com'
        repo_name:                 'oemof.network'
        repo_username:             'oemof'
        requiresio:                'yes'
        scrutinizer:               'yes'
        setup_py_uses_setuptools_scm: 'no'
        setup_py_uses_test_runner: 'no'
        sphinx_docs:               'yes'
        sphinx_docs_hosting:
'https://oemof-network.readthedocs.io/'
        sphinx_doctest:            'no'
        sphinx_theme:              'sphinx-rtd-theme'
        test_matrix_configurator:  'yes'
        test_matrix_separate_coverage: 'yes'
        test_runner:               'nose'
        travis:                    'yes'
        travis_osx:                'no'
        version:                   '0.4.0.dev0'
        website:                   'https://oemof.org/'
        year_from:                 '2020'
        year_to:                   '2020'

For completeness: the cookiecutter version used was 1.6.0.

[0]: https://pypi.org/project/cookiecutter/
[1]: https://github.com/ionelmc/cookiecutter-pylibrary/tree/bbd851bfdd9d1cb5b25805085c406f4c492e177a
  • Loading branch information
gnn committed Mar 24, 2020
0 parents commit 70bce78
Show file tree
Hide file tree
Showing 34 changed files with 1,218 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[bumpversion]
current_version = 0.4.0.dev0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:README.rst]
search = v{current_version}.
replace = v{new_version}.

[bumpversion:file:docs/conf.py]
search = version = release = '{current_version}'
replace = version = release = '{new_version}'

[bumpversion:file:src/oemof.network/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
69 changes: 69 additions & 0 deletions .cookiecutterrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This file exists so you can easily regenerate your project.
#
# `cookiepatcher` is a convenient shim around `cookiecutter`
# for regenerating projects (it will generate a .cookiecutterrc
# automatically for any template). To use it:
#
# pip install cookiepatcher
# cookiepatcher gh:ionelmc/cookiecutter-pylibrary project-path
#
# See:
# https://pypi.org/project/cookiepatcher
#
# Alternatively, you can run:
#
# cookiecutter --overwrite-if-exists --config-file=project-path/.cookiecutterrc gh:ionelmc/cookiecutter-pylibrary

default_context:

_extensions: ['jinja2_time.TimeExtension']
_template: 'gh:ionelmc/cookiecutter-pylibrary'
allow_tests_inside_package: 'no'
appveyor: 'no'
c_extension_function: 'longest'
c_extension_module: '_oemof.network'
c_extension_optional: 'no'
c_extension_support: 'no'
c_extension_test_pypi: 'no'
c_extension_test_pypi_username: 'oemof'
codacy: 'yes'
codacy_projectid: 'CODACY_PROJECT_ID'
codeclimate: 'yes'
codecov: 'no'
command_line_interface: 'no'
command_line_interface_bin_name: 'oemof.network'
coveralls: 'yes'
coveralls_token: 'COVERALLSTOKEN'
distribution_name: 'oemof.network'
email: '[email protected]'
full_name: 'Stephan Günther'
landscape: 'no'
license: 'MIT license'
linter: 'flake8'
package_name: 'oemof.network'
project_name: 'oemof.network'
project_short_description: 'The network/graph submodules of oemof.'
pypi_badge: 'yes'
pypi_disable_upload: 'no'
release_date: '2020-04-01'
repo_hosting: 'github.com'
repo_hosting_domain: 'github.com'
repo_name: 'oemof.network'
repo_username: 'oemof'
requiresio: 'yes'
scrutinizer: 'yes'
setup_py_uses_setuptools_scm: 'no'
setup_py_uses_test_runner: 'no'
sphinx_docs: 'yes'
sphinx_docs_hosting: 'https://oemof-network.readthedocs.io/'
sphinx_doctest: 'no'
sphinx_theme: 'sphinx-rtd-theme'
test_matrix_configurator: 'yes'
test_matrix_separate_coverage: 'yes'
test_runner: 'nose'
travis: 'yes'
travis_osx: 'no'
version: '0.4.0.dev0'
website: 'https://oemof.org/'
year_from: '2020'
year_to: '2020'
14 changes: 14 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[paths]
source = src

[run]
branch = true
source =
src
tests
parallel = true

[report]
show_missing = true
precision = 2
omit = *migrations*
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# see https://editorconfig.org/
root = true

[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8

[*.{bat,cmd,ps1}]
end_of_line = crlf
71 changes: 71 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
*.py[cod]
__pycache__

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
.eggs
parts
bin
var
sdist
wheelhouse
develop-eggs
.installed.cfg
lib
lib64
venv*/
pyvenv*/
pip-wheel-metadata/

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
.coverage.*
.pytest_cache/
nosetests.xml
coverage.xml
htmlcov

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.idea
*.iml
*.komodoproject

# Complexity
output/*.html
output/*/index.html

# Sphinx
docs/_build

.DS_Store
*~
.*.sw[po]
.build
.ve
.env
.cache
.pytest
.benchmarks
.bootstrap
.appveyor.token
*.bak

# Mypy Cache
.mypy_cache/
10 changes: 10 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
sphinx:
configuration: docs/conf.py
formats: all
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
78 changes: 78 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
language: python
dist: xenial
cache: false
env:
global:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
matrix:
include:
- python: '3.6'
env:
- TOXENV=check
- python: '3.6'
env:
- TOXENV=docs
- env:
- TOXENV=py27-cover,coveralls
python: '2.7'
- env:
- TOXENV=py27-nocov
python: '2.7'
- env:
- TOXENV=py35-cover,coveralls
python: '3.5'
- env:
- TOXENV=py35-nocov
python: '3.5'
- env:
- TOXENV=py36-cover,coveralls
python: '3.6'
- env:
- TOXENV=py36-nocov
python: '3.6'
- env:
- TOXENV=py37-cover,coveralls
python: '3.7'
- env:
- TOXENV=py37-nocov
python: '3.7'
- env:
- TOXENV=py38-cover,coveralls
python: '3.8'
- env:
- TOXENV=py38-nocov
python: '3.8'
- env:
- TOXENV=pypy-cover,coveralls
python: 'pypy'
- env:
- TOXENV=pypy-nocov
python: 'pypy'
- env:
- TOXENV=pypy3-cover,coveralls
- TOXPYTHON=pypy3
python: 'pypy3'
- env:
- TOXENV=pypy3-nocov
- TOXPYTHON=pypy3
python: 'pypy3'
before_install:
- python --version
- uname -a
- lsb_release -a || true
install:
- python -mpip install --progress-bar=off tox -rci/requirements.txt
- virtualenv --version
- easy_install --version
- pip --version
- tox --version
script:
- tox -v
after_failure:
- more .tox/log/* | cat
- more .tox/*/log/* | cat
notifications:
email:
on_success: never
on_failure: always
5 changes: 5 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

Authors
=======

* Stephan Günther - https://oemof.org/
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Changelog
=========

0.4.0.dev0 (2020-04-01)
-----------------------

* First release on PyPI.
90 changes: 90 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
============
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

Bug reports
===========

When `reporting a bug <https://github.com/oemof/oemof.network/issues>`_ please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Documentation improvements
==========================

oemof.network could always use more documentation, whether as part of the
official oemof.network docs, in docstrings, or even on the web in blog posts,
articles, and such.

Feature requests and feedback
=============================

The best way to send feedback is to file an issue at https://github.com/oemof/oemof.network/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that code contributions are welcome :)

Development
===========

To set up `oemof.network` for local development:

1. Fork `oemof.network <https://github.com/oemof/oemof.network>`_
(look for the "Fork" button).
2. Clone your fork locally::

git clone [email protected]:oemof/oemof.network.git

3. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

4. When you're done making changes run all the checks and docs builder with `tox <https://tox.readthedocs.io/en/latest/install.html>`_ one command::

tox

5. Commit your changes and push your branch to GitHub::

git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature

6. Submit a pull request through the GitHub website.

Pull Request Guidelines
-----------------------

If you need some code review or feedback while you're developing the code just make the pull request.

For merging, you should:

1. Include passing tests (run ``tox``) [1]_.
2. Update documentation when there's new API, functionality etc.
3. Add a note to ``CHANGELOG.rst`` about the changes.
4. Add yourself to ``AUTHORS.rst``.

.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will
`run the tests <https://travis-ci.org/oemof/oemof.network/pull_requests>`_ for each change you add in the pull request.
It will be slower though ...
Tips
----

To run a subset of tests::

tox -e envname -- pytest -k test_myfeature

To run all the test environments in *parallel* (you need to ``pip install detox``)::

detox
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2020, Stephan Günther

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 (including the next paragraph) 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.
Loading

0 comments on commit 70bce78

Please sign in to comment.