Skip to content
Snippets Groups Projects
Commit 4d08aee0 authored by David McKenna's avatar David McKenna
Browse files

Init repo from cookiecutter template

parent 698ec45c
Branches
Tags
No related merge requests found
Pipeline #72475 failed
Pipeline: lofar-station-calibration

#72476

    Showing with 628 additions and 0 deletions
    root = true
    [*]
    charset = utf-8
    end_of_line = lf
    indent_size = 4
    indent_style = space
    insert_final_newline = true
    trim_trailing_whitespace = true
    max_line_length = 120
    tab_width = 4
    ij_continuation_indent_size = 8
    ij_formatter_off_tag = @formatter:off
    ij_formatter_on_tag = @formatter:on
    ij_formatter_tags_enabled = false
    ij_smart_tabs = false
    ij_visual_guides = none
    ij_wrap_on_typing = false
    [{*.bash,*.sh,*.zsh}]
    indent_size = 2
    tab_width = 2
    ij_shell_binary_ops_start_line = false
    ij_shell_keep_column_alignment_padding = false
    ij_shell_minify_program = false
    ij_shell_redirect_followed_by_space = false
    ij_shell_switch_cases_indented = false
    ij_shell_use_unix_line_separator = true
    [{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}]
    indent_size = 2
    ij_json_array_wrapping = split_into_lines
    ij_json_keep_blank_lines_in_code = 0
    ij_json_keep_indents_on_empty_lines = false
    ij_json_keep_line_breaks = true
    ij_json_keep_trailing_comma = false
    ij_json_object_wrapping = split_into_lines
    ij_json_property_alignment = do_not_align
    ij_json_space_after_colon = true
    ij_json_space_after_comma = true
    ij_json_space_before_colon = false
    ij_json_space_before_comma = false
    ij_json_spaces_within_braces = false
    ij_json_spaces_within_brackets = false
    ij_json_wrap_long_lines = false
    [{*.markdown,*.md}]
    ij_markdown_force_one_space_after_blockquote_symbol = true
    ij_markdown_force_one_space_after_header_symbol = true
    ij_markdown_force_one_space_after_list_bullet = true
    ij_markdown_force_one_space_between_words = true
    ij_markdown_insert_quote_arrows_on_wrap = true
    ij_markdown_keep_indents_on_empty_lines = false
    ij_markdown_keep_line_breaks_inside_text_blocks = true
    ij_markdown_max_lines_around_block_elements = 1
    ij_markdown_max_lines_around_header = 1
    ij_markdown_max_lines_between_paragraphs = 1
    ij_markdown_min_lines_around_block_elements = 1
    ij_markdown_min_lines_around_header = 1
    ij_markdown_min_lines_between_paragraphs = 1
    ij_markdown_wrap_text_if_long = true
    ij_markdown_wrap_text_inside_blockquotes = true
    [{*.py,*.pyw}]
    max_line_length = 88
    ij_python_align_collections_and_comprehensions = true
    ij_python_align_multiline_imports = true
    ij_python_align_multiline_parameters = true
    ij_python_align_multiline_parameters_in_calls = false
    ij_python_blank_line_at_file_end = true
    ij_python_blank_lines_after_imports = 1
    ij_python_blank_lines_after_local_imports = 0
    ij_python_blank_lines_around_class = 1
    ij_python_blank_lines_around_method = 1
    ij_python_blank_lines_around_top_level_classes_functions = 2
    ij_python_blank_lines_before_first_method = 0
    ij_python_call_parameters_new_line_after_left_paren = true
    ij_python_call_parameters_right_paren_on_new_line = true
    ij_python_call_parameters_wrap = normal
    ij_python_dict_alignment = 2
    ij_python_dict_new_line_after_left_brace = true
    ij_python_dict_new_line_before_right_brace = true
    ij_python_dict_wrapping = 1
    ij_python_from_import_new_line_after_left_parenthesis = true
    ij_python_from_import_new_line_before_right_parenthesis = true
    ij_python_from_import_parentheses_force_if_multiline = true
    ij_python_from_import_trailing_comma_if_multiline = false
    ij_python_from_import_wrapping = 1
    ij_python_hang_closing_brackets = false
    ij_python_keep_blank_lines_in_code = 1
    ij_python_keep_blank_lines_in_declarations = 1
    ij_python_keep_indents_on_empty_lines = false
    ij_python_keep_line_breaks = true
    ij_python_method_parameters_new_line_after_left_paren = true
    ij_python_method_parameters_right_paren_on_new_line = true
    ij_python_method_parameters_wrap = normal
    ij_python_new_line_after_colon = true
    ij_python_new_line_after_colon_multi_clause = true
    ij_python_optimize_imports_always_split_from_imports = false
    ij_python_optimize_imports_case_insensitive_order = false
    ij_python_optimize_imports_join_from_imports_with_same_source = false
    ij_python_optimize_imports_sort_by_type_first = true
    ij_python_optimize_imports_sort_imports = true
    ij_python_optimize_imports_sort_names_in_from_imports = false
    ij_python_space_after_comma = true
    ij_python_space_after_number_sign = true
    ij_python_space_after_py_colon = true
    ij_python_space_before_backslash = true
    ij_python_space_before_comma = false
    ij_python_space_before_for_semicolon = false
    ij_python_space_before_lbracket = false
    ij_python_space_before_method_call_parentheses = false
    ij_python_space_before_method_parentheses = false
    ij_python_space_before_number_sign = true
    ij_python_space_before_py_colon = false
    ij_python_space_within_empty_method_call_parentheses = false
    ij_python_space_within_empty_method_parentheses = false
    ij_python_spaces_around_additive_operators = true
    ij_python_spaces_around_assignment_operators = true
    ij_python_spaces_around_bitwise_operators = true
    ij_python_spaces_around_eq_in_keyword_argument = false
    ij_python_spaces_around_eq_in_named_parameter = false
    ij_python_spaces_around_equality_operators = true
    ij_python_spaces_around_multiplicative_operators = true
    ij_python_spaces_around_power_operator = false
    ij_python_spaces_around_relational_operators = true
    ij_python_spaces_around_shift_operators = true
    ij_python_spaces_within_braces = false
    ij_python_spaces_within_brackets = false
    ij_python_spaces_within_method_call_parentheses = false
    ij_python_spaces_within_method_parentheses = false
    ij_python_use_continuation_indent_for_arguments = true
    ij_python_use_continuation_indent_for_collection_and_comprehensions = false
    ij_python_use_continuation_indent_for_parameters = true
    ij_python_wrap_long_lines = false
    [{*.yaml,*.yml}]
    indent_size = 2
    ij_yaml_align_values_properties = do_not_align
    ij_yaml_autoinsert_sequence_marker = true
    ij_yaml_block_mapping_on_new_line = false
    ij_yaml_indent_sequence_value = true
    ij_yaml_keep_indents_on_empty_lines = false
    ij_yaml_keep_line_breaks = true
    ij_yaml_sequence_on_new_line = false
    ij_yaml_space_before_colon = false
    ij_yaml_spaces_within_braces = true
    ij_yaml_spaces_within_brackets = true
    dist/*
    *.egg-info
    *.pyc
    .tox
    .coverage
    coverage.xml
    htmlcov/*
    build
    dist
    # Documentation
    docs/source/source_documentation
    docs/build
    # Setuptools SCM
    lofar-station-calibration/_version.py
    # IDE configuration
    .vscode
    .idea
    stages:
    - build
    build_ci_runner_image:
    stage: build
    image: docker:stable
    services:
    - docker:dind
    script:
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - |
    if docker pull $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG; then
    docker build --cache-from $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG --tag $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG docker/ci-runner
    else
    docker pull $CI_REGISTRY_IMAGE/ci-build-runner:latest || true
    docker build --cache-from $CI_REGISTRY_IMAGE/ci-build-runner:latest --tag $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG docker/ci-runner
    fi
    - docker push $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG # push the image
    - |
    if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
    docker image tag $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG $CI_REGISTRY_IMAGE/ci-build-runner:latest
    docker push $CI_REGISTRY_IMAGE/ci-build-runner:latest
    fi
    LICENSE 0 → 100644
    Apache License
    Version 2.0, January 2004
    http://www.apache.org/licenses/
    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    1. Definitions.
    "License" shall mean the terms and conditions for use, reproduction,
    and distribution as defined by Sections 1 through 9 of this document.
    "Licensor" shall mean the copyright owner or entity authorized by
    the copyright owner that is granting the License.
    "Legal Entity" shall mean the union of the acting entity and all
    other entities that control, are controlled by, or are under common
    control with that entity. For the purposes of this definition,
    "control" means (i) the power, direct or indirect, to cause the
    direction or management of such entity, whether by contract or
    otherwise, or (ii) ownership of fifty percent (50%) or more of the
    outstanding shares, or (iii) beneficial ownership of such entity.
    "You" (or "Your") shall mean an individual or Legal Entity
    exercising permissions granted by this License.
    "Source" form shall mean the preferred form for making modifications,
    including but not limited to software source code, documentation
    source, and configuration files.
    "Object" form shall mean any form resulting from mechanical
    transformation or translation of a Source form, including but
    not limited to compiled object code, generated documentation,
    and conversions to other media types.
    "Work" shall mean the work of authorship, whether in Source or
    Object form, made available under the License, as indicated by a
    copyright notice that is included in or attached to the work
    (an example is provided in the Appendix below).
    "Derivative Works" shall mean any work, whether in Source or Object
    form, that is based on (or derived from) the Work and for which the
    editorial revisions, annotations, elaborations, or other modifications
    represent, as a whole, an original work of authorship. For the purposes
    of this License, Derivative Works shall not include works that remain
    separable from, or merely link (or bind by name) to the interfaces of,
    the Work and Derivative Works thereof.
    "Contribution" shall mean any work of authorship, including
    the original version of the Work and any modifications or additions
    to that Work or Derivative Works thereof, that is intentionally
    submitted to Licensor for inclusion in the Work by the copyright owner
    or by an individual or Legal Entity authorized to submit on behalf of
    the copyright owner. For the purposes of this definition, "submitted"
    means any form of electronic, verbal, or written communication sent
    to the Licensor or its representatives, including but not limited to
    communication on electronic mailing lists, source code control systems,
    and issue tracking systems that are managed by, or on behalf of, the
    Licensor for the purpose of discussing and improving the Work, but
    excluding communication that is conspicuously marked or otherwise
    designated in writing by the copyright owner as "Not a Contribution."
    "Contributor" shall mean Licensor and any individual or Legal Entity
    on behalf of whom a Contribution has been received by Licensor and
    subsequently incorporated within the Work.
    2. Grant of Copyright License. Subject to the terms and conditions of
    this License, each Contributor hereby grants to You a perpetual,
    worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    copyright license to reproduce, prepare Derivative Works of,
    publicly display, publicly perform, sublicense, and distribute the
    Work and such Derivative Works in Source or Object form.
    3. Grant of Patent License. Subject to the terms and conditions of
    this License, each Contributor hereby grants to You a perpetual,
    worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    (except as stated in this section) patent license to make, have made,
    use, offer to sell, sell, import, and otherwise transfer the Work,
    where such license applies only to those patent claims licensable
    by such Contributor that are necessarily infringed by their
    Contribution(s) alone or by combination of their Contribution(s)
    with the Work to which such Contribution(s) was submitted. If You
    institute patent litigation against any entity (including a
    cross-claim or counterclaim in a lawsuit) alleging that the Work
    or a Contribution incorporated within the Work constitutes direct
    or contributory patent infringement, then any patent licenses
    granted to You under this License for that Work shall terminate
    as of the date such litigation is filed.
    4. Redistribution. You may reproduce and distribute copies of the
    Work or Derivative Works thereof in any medium, with or without
    modifications, and in Source or Object form, provided that You
    meet the following conditions:
    (a) You must give any other recipients of the Work or
    Derivative Works a copy of this License; and
    (b) You must cause any modified files to carry prominent notices
    stating that You changed the files; and
    (c) You must retain, in the Source form of any Derivative Works
    that You distribute, all copyright, patent, trademark, and
    attribution notices from the Source form of the Work,
    excluding those notices that do not pertain to any part of
    the Derivative Works; and
    (d) If the Work includes a "NOTICE" text file as part of its
    distribution, then any Derivative Works that You distribute must
    include a readable copy of the attribution notices contained
    within such NOTICE file, excluding those notices that do not
    pertain to any part of the Derivative Works, in at least one
    of the following places: within a NOTICE text file distributed
    as part of the Derivative Works; within the Source form or
    documentation, if provided along with the Derivative Works; or,
    within a display generated by the Derivative Works, if and
    wherever such third-party notices normally appear. The contents
    of the NOTICE file are for informational purposes only and
    do not modify the License. You may add Your own attribution
    notices within Derivative Works that You distribute, alongside
    or as an addendum to the NOTICE text from the Work, provided
    that such additional attribution notices cannot be construed
    as modifying the License.
    You may add Your own copyright statement to Your modifications and
    may provide additional or different license terms and conditions
    for use, reproduction, or distribution of Your modifications, or
    for any such Derivative Works as a whole, provided Your use,
    reproduction, and distribution of the Work otherwise complies with
    the conditions stated in this License.
    5. Submission of Contributions. Unless You explicitly state otherwise,
    any Contribution intentionally submitted for inclusion in the Work
    by You to the Licensor shall be under the terms and conditions of
    this License, without any additional terms or conditions.
    Notwithstanding the above, nothing herein shall supersede or modify
    the terms of any separate license agreement you may have executed
    with Licensor regarding such Contributions.
    6. Trademarks. This License does not grant permission to use the trade
    names, trademarks, service marks, or product names of the Licensor,
    except as required for reasonable and customary use in describing the
    origin of the Work and reproducing the content of the NOTICE file.
    7. Disclaimer of Warranty. Unless required by applicable law or
    agreed to in writing, Licensor provides the Work (and each
    Contributor provides its Contributions) on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    implied, including, without limitation, any warranties or conditions
    of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    PARTICULAR PURPOSE. You are solely responsible for determining the
    appropriateness of using or redistributing the Work and assume any
    risks associated with Your exercise of permissions under this License.
    8. Limitation of Liability. In no event and under no legal theory,
    whether in tort (including negligence), contract, or otherwise,
    unless required by applicable law (such as deliberate and grossly
    negligent acts) or agreed to in writing, shall any Contributor be
    liable to You for damages, including any direct, indirect, special,
    incidental, or consequential damages of any character arising as a
    result of this License or out of the use or inability to use the
    Work (including but not limited to damages for loss of goodwill,
    work stoppage, computer failure or malfunction, or any and all
    other commercial damages or losses), even if such Contributor
    has been advised of the possibility of such damages.
    9. Accepting Warranty or Additional Liability. While redistributing
    the Work or Derivative Works thereof, You may choose to offer,
    and charge a fee for, acceptance of support, warranty, indemnity,
    or other liability obligations and/or rights consistent with this
    License. However, in accepting such obligations, You may act only
    on Your own behalf and on Your sole responsibility, not on behalf
    of any other Contributor, and only if You agree to indemnify,
    defend, and hold each Contributor harmless for any liability
    incurred by, or claims asserted against, such Contributor by reason
    of your accepting any such warranty or additional liability.
    END OF TERMS AND CONDITIONS
    APPENDIX: How to apply the Apache License to your work.
    To apply the Apache License to your work, attach the following
    boilerplate notice, with the fields enclosed by brackets "[]"
    replaced with your own identifying information. (Don't include
    the brackets!) The text should be enclosed in the appropriate
    comment syntax for the file format. We also recommend that a
    file or class name and description of purpose be included on the
    same "printed page" as the copyright notice for easier
    identification within third-party archives.
    Copyright [yyyy] [name of copyright owner]
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    include LICENSE
    include README.md
    recursive-include docs *
    recursive-exclude tests *
    FROM python:3.11
    RUN python -m pip install --upgrade pip
    RUN pip install --upgrade tox twine
    #!/bin/sh
    FILE_DIR=$(dirname -- "$(readlink -f -- "${0}")")
    echo "Cleaning.. ${FILE_DIR}/source/source_documentation/*"
    for f in "${FILE_DIR}"/source/source_documentation/*
    do
    case $f in
    */index.rst) true;;
    *) echo "Removing.. ${f}"; rm "${f}";;
    esac
    done
    sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
    sphinx-rtd-theme>=0.4.3 #MIT
    sphinxcontrib-apidoc>=0.3.0 #BSD
    myst-parser>=2.0 # MIT
    docutils>=0.17 # BSD
    # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    import os
    from lofar-station-calibration import __version__
    # -- General configuration ----------------------------------------------------
    # Add any Sphinx extension module names here, as strings. They can be
    # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
    extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.viewcode",
    "sphinxcontrib.apidoc",
    "sphinx_rtd_theme",
    "myst_parser"
    ]
    # Assumes tox is used to call sphinx-build
    project_root_directory = os.getcwd()
    apidoc_module_dir = "../../lofar-station-calibration"
    apidoc_output_dir = "source_documentation"
    apidoc_excluded_paths = []
    apidoc_separate_modules = True
    apidoc_toc_file = False
    # This should include private methods but does not work
    # https://github.com/sphinx-contrib/apidoc/issues/14
    apidoc_extra_args = ["--private"]
    # The suffix of source filenames.
    source_suffix = [".rst"]
    # The master toctree document.
    master_doc = "index"
    # General information about the project.
    project = "lofar-station-calibration"
    copyright = "2023, ASTRON"
    # openstackdocstheme options
    repository_name = "git.astron.nl/mckenna/lofar-station-calibration"
    bug_project = "none"
    bug_tag = ""
    html_last_updated_fmt = "%Y-%m-%d %H:%M"
    # If true, '()' will be appended to :func: etc. cross-reference text.
    add_function_parentheses = True
    version = __version__
    modindex_common_prefix = ["lofar-station-calibration."]
    # If true, the current module name will be prepended to all description
    # unit titles (such as .. function::).
    add_module_names = True
    # The name of the Pygments (syntax highlighting) style to use.
    pygments_style = "sphinx"
    # -- Options for HTML output --------------------------------------------------
    # The theme to use for HTML and HTML Help pages. Major themes that come with
    # Sphinx are currently 'default' and 'sphinxdoc'.
    # html_theme_path = ["."]
    html_theme = "sphinx_rtd_theme"
    html_static_path = ["static"]
    html_css_files = [
    "css/custom.css",
    ]
    # Output file base name for HTML help builder.
    htmlhelp_basename = "%sdoc" % project
    # Conf.py variables exported to sphinx rst files access using |NAME|
    variables_to_export = [
    "project",
    "copyright",
    "version",
    ]
    # Write to rst_epilog to export `variables_to_export` extract using `locals()`
    # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_epilog
    frozen_locals = dict(locals())
    rst_epilog = "\n".join(
    map(
    lambda x: f".. |{x}| replace:: {frozen_locals[x]}", # noqa: F821
    variables_to_export,
    )
    )
    # Pep is not able to determine that frozen_locals always exists so noqa
    del frozen_locals
    ====================================================
    Welcome to the documentation of lofar-station-calibration
    ====================================================
    ..
    To define more variables see rst_epilog generation in conf.py
    Documentation for version: |version|
    Contents:
    .. toctree::
    :maxdepth: 2
    readme
    source_documentation/index
    .. include:: ../../README.md
    :parser: myst_parser.sphinx_
    .orange { color: #c65d09; }
    .green { color: #5dc609; }
    .yellow { color: #c6c609; }
    .bolditalic {
    font-weight: bold;
    font-style: italic;
    }
    .rst-content code, .rst-content tt, code {
    white-space: break-spaces;
    }
    # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    """ lofar-station-calibration """
    try:
    from importlib import metadata
    except ImportError: # for Python<3.8
    import importlib_metadata as metadata
    __version__ = metadata.version("lofar-station-calibration")
    # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    """ Cool module containing functions, classes and other useful things """
    def greeter():
    """Prints a nice message"""
    print("Hello World!")
    [build-system]
    requires = [
    "setuptools>=62.6",
    "setuptools_scm[toml]>=8.0",
    "wheel"
    ]
    build-backend = "setuptools.build_meta"
    [tool.setuptools_scm]
    version_file = "lofar-station-calibration/_version.py"
    [tool.pylint]
    ignore = "_version.py"
    importlib-metadata>=0.12, <5.0;python_version<"3.8"
    numpy
    [metadata]
    name = lofar-station-calibration
    description = An example package for CI/CD working group
    long_description = file: README.md
    long_description_content_type = text/markdown
    url = https://git.astron.nl/templates/python-package
    license = Apache License 2.0
    classifiers =
    Development Status :: 3 - Alpha
    Environment :: Web Environment
    Intended Audience :: Developers
    Intended Audience :: Science/Research
    License :: OSI Approved :: Apache Software License
    Operating System :: OS Independent
    Programming Language :: Python
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3 :: Only
    Programming Language :: Python :: 3.7
    Programming Language :: Python :: 3.8
    Programming Language :: Python :: 3.9
    Programming Language :: Python :: 3.10
    Programming Language :: Python :: 3.11
    Topic :: Internet :: WWW/HTTP
    Topic :: Internet :: WWW/HTTP :: Dynamic Content
    Topic :: Scientific/Engineering
    Topic :: Scientific/Engineering :: Astronomy
    [options]
    include_package_data = true
    packages = find:
    python_requires = >=3.7
    install_requires = file: requirements.txt
    [flake8]
    max-line-length = 88
    extend-ignore = E203
    exclude=.venv,.git,.tox,dist,docs,*lib/python*,*egg,_version.py
    import setuptools
    setuptools.setup()
    autopep8 >= 1.7.0 # MIT
    black >= 22.0.0 # MIT
    build >= 0.8.0 # MIT
    flake8 >= 5.0.0 # MIT
    pylint >= 2.15.0 # GPLv2
    pytest >= 7.0.0 # MIT
    pytest-cov >= 3.0.0 # MIT
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment