Skip to content

Commit

Permalink
Merge branch 'main' into single_test
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrub authored Dec 20, 2023
2 parents 83a23c5 + f2a6f35 commit 4eb642d
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 99 deletions.
12 changes: 0 additions & 12 deletions .cruft.json

This file was deleted.

30 changes: 17 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.blackPath": "/home/vscode/.local/bin/black",
"python.formatting.blackPath": "/usr/local/bin/black",
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length",
Expand All @@ -22,31 +22,35 @@
"python.linting.lintOnSave": true,
"python.linting.flake8Enabled": true,
"editor.formatOnSave": true,
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/home/vscode/.local/bin/pycodestyle",
"python.linting.pydocstylePath": "/home/vscode/.local/bin/pydocstyle",
"python.linting.banditPath": "/usr/local/bin/bandit",
"python.linting.flake8Path": "/usr/local/bin/flake8",
"python.linting.mypyPath": "/usr/local/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/bin/pydocstyle",
"python.linting.pylintPath": "/usr/bin/pylint",
"terminal.integrated.defaultProfile.linux": "bash (login)",
"terminal.integrated.profiles.linux": {
"bash (login)": {
"path": "/bin/bash",
"args": [
""
]
"path": "bash"
}
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"marklarah.pre-commit-vscode"
]
"marklarah.pre-commit-vscode",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.jupyter-keymap",
"jithurjacob.nbpreviewer"
],
// Mount to a volume if you'd like to persist data to your disk
// "mounts": ["source=<add your /path/on/host here>, target=/workspaces/hermes_core, type=bind"],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
//"postCreateCommand": "bash -i -c 'pip3 install --user .[all]'",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
"remoteUser": "vscode"
}
26 changes: 0 additions & 26 deletions .devcontainer/devcontainer.json.rej

This file was deleted.

12 changes: 9 additions & 3 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches:
- main
workflow_dispatch: # For on demand runs
schedule:
- cron: 0 0 * * * # Scheduled run every day at midnight
jobs:
build:

Expand All @@ -16,7 +19,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: [3.8]
python-version: [3.9]

steps:
- uses: actions/checkout@v2
Expand All @@ -26,8 +29,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
pip install pip setuptools wheel --upgrade
# Install spacepy without build isolation to avoid issues with numpy
pip install numpy
pip install spacepy --no-build-isolation
python -m pip install -e '.[style]'
- name: Lint with Black
run: |
black --check --diff hermes_eea
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/cruft_auto_pr.yml

This file was deleted.

12 changes: 9 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches:
- main
workflow_dispatch: # For on demand runs
schedule:
- cron: 0 0 * * * # Scheduled run every day at midnight
jobs:
build:

Expand All @@ -16,7 +19,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: [3.8]
python-version: [3.9]

steps:
- uses: actions/checkout@v2
Expand All @@ -26,8 +29,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[docs]
pip install pip setuptools wheel --upgrade
# Install spacepy without build isolation to avoid issues with numpy
pip install numpy
pip install spacepy --no-build-isolation
python -m pip install -e '.[docs]'
- name: Build docs
working-directory: ./docs
run: make html
18 changes: 14 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches:
- main
workflow_dispatch: # For on demand runs
schedule:
- cron: 0 0 * * * # Scheduled run every day at midnight
jobs:
build:

Expand All @@ -16,7 +19,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.9, '3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand All @@ -26,12 +29,19 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
pip install pip setuptools wheel --upgrade
# Install spacepy without build isolation to avoid issues with numpy
pip install numpy
pip install spacepy --no-build-isolation
pip install -e .[test]
if: ${{ !(matrix.platform == 'windows-latest' && matrix.python-version == '3.11') }}
- name: Run tests
run: pytest --pyargs hermes_eea --cov hermes_eea
env:
PLATFORM: ${{ matrix.platform }}
# Skip Windows Python 3.11 tests until SpacePy is updated
if: ${{ !(matrix.platform == 'windows-latest' && matrix.python-version == '3.11') }}
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3

# Skip Windows Python 3.11 tests until SpacePy is updated
if: ${{ !(matrix.platform == 'windows-latest' && matrix.python-version == '3.11') }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ docs/_build
docs/generated
docs/api
docs/whatsnew/latest_changelog.txt
hermes_eea/version.py
hermes_eea/_version.py
htmlcov/


Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ help:

clean:
rm -rf $(BUILDDIR)
rm -rf api
rm -rf ./generated

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"sphinx_automodapi.smart_resolver",
]

# Set automodapi to generate files inside the generated directory
automodapi_toctreedirnm = "generated/api"

# Set automodapi to generate files inside the generated directory
# automodapi_toctreedirnm = "_build/html/api"
numpydoc_show_class_members = False
Expand Down
1 change: 1 addition & 0 deletions hermes_eea/tests/test_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sys



@pytest.fixture(scope="session") # this is a pytest fixture
def small_level0_file(tmp_path_factory):
fn = Path(os.path.join(_data_directory, "hermes_EEA_l0_2023042-000000_v0.bin"))
Expand Down

0 comments on commit 4eb642d

Please sign in to comment.