Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change codecov from master to main #585

Merged
merged 27 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e50ef07
Change codecov from master to main
GernotMaier Aug 31, 2023
eef195e
add verbose statement to code coverage
GernotMaier Aug 31, 2023
651b581
add verbose statement to code coverage
GernotMaier Aug 31, 2023
a8614d8
leave --cov
GernotMaier Aug 31, 2023
b7f139d
add extra args to run code cov only once
GernotMaier Aug 31, 2023
d24f226
give directory for coverage
GernotMaier Sep 25, 2023
cee90be
Merge branch 'main' into code-coverage-badge
GernotMaier Sep 25, 2023
af252af
save html cov
GernotMaier Sep 25, 2023
4f082f9
remove artifacts
GernotMaier Sep 25, 2023
47e55bd
revert changes
GernotMaier Sep 25, 2023
458b31a
remove codecov badge
GernotMaier Sep 27, 2023
e6a59f9
remove codecov
GernotMaier Sep 27, 2023
02a649e
Merge branch 'main' into code-coverage-badge
GernotMaier Nov 9, 2023
2594acf
another try on codecov
GernotMaier Nov 9, 2023
e471bcc
add codecov extraargs
GernotMaier Nov 9, 2023
2578c25
codecov needs coverage
GernotMaier Nov 9, 2023
2055708
explit directory naming for coverage
GernotMaier Nov 9, 2023
5adc729
add test directory
GernotMaier Nov 9, 2023
d5e28eb
archive code coverage xml file
GernotMaier Nov 9, 2023
e6aff0a
use correct pip command
GernotMaier Nov 9, 2023
5d4d958
adding a single line to trigger coverage check
GernotMaier Nov 9, 2023
d9e9a10
new application testing
GernotMaier Nov 9, 2023
bb86afb
simtools codecov token
GernotMaier Nov 9, 2023
20a6635
returning badge
GernotMaier Nov 9, 2023
2624b9f
remove unrelated line
GernotMaier Nov 9, 2023
b4e0ed5
Merge branch 'main' into code-coverage-badge
GernotMaier Nov 17, 2023
9d060dc
Merge branch 'main' into code-coverage-badge
GernotMaier Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/CI-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- os: ubuntu-latest
python-version: "3.11"
install-method: mamba
extra-args: ["codecov"]

- os: ubuntu-latest
python-version: "3.11"
Expand Down Expand Up @@ -96,17 +97,33 @@ jobs:
run: |
tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"'

- name: Python dependencies
- name: Python dependencies (pip)
if: matrix.install-method == 'pip'
run: |
python --version
pip install '.[tests,dev,doc]'

- name: Python dependencies (mamba)
if: matrix.install-method == 'mamba'
run: |
pip install -e '.[tests,dev,doc]'

- name: flake8
run: |
flake8 --max-line-length 100 --per-file-ignores="_version.py:F401 E501" .

- name: Unit tests
shell: bash -l {0}
run: pytest --durations=10 --color=yes --cov --cov-report=xml
run: |
pytest --durations=10 --color=yes

- name: Upload coverage report to codecov
uses: codecov/codecov-action@v3
if: contains(matrix.extra-args, 'codecov')
with:
token: ${{ secrets.CODECOV_SIMTOOLS_TOKEN }}

- uses: codecov/[email protected]
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage.xml
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ simtools
.. image:: https://app.codacy.com/project/badge/Grade/a3f19df7454844059341edd0769e02a7
:target: https://app.codacy.com/gh/gammasim/simtools/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade

.. image:: https://codecov.io/gh/gammasim/simtools/branch/master/graph/badge.svg?token=AYAIRPARCH
.. image:: https://codecov.io/gh/gammasim/simtools/graph/badge.svg?token=AYAIRPARCH
:target: https://codecov.io/gh/gammasim/simtools

Simulation tools and applications for the `Cherenkov Telescope Array (CTAO) <https://www.cta-observatory.org>`_.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ redefining-builtins-modules = ["six.moves", "past.builtins", "future.builtins",

[tool.pytest.ini_options]
minversion="6.0"
norecursedirs=["build", "docs/_build"]
addopts="-v"
norecursedirs=["build", "docs/_build", "simtools/applications"]
addopts="-v --cov=simtools --cov-report=xml --cov-report=term"
testpaths="tests/unit_tests/"
# Ignore the warning about fontTools.misc.py23
filterwarnings="ignore:The py23 module has been deprecated:DeprecationWarning"
1 change: 1 addition & 0 deletions simtools/layout/layout_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def __init__(
self.telescope_list_file = None
self._telescope_list = []
self._epsg = None

if telescope_list_file is None:
self._initialize_coordinate_systems(layout_center_data)
self._initialize_corsika_telescope(corsika_telescope_data)
Expand Down