-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardise common project components (#174)
* Standardise common project components * This commit brings files that are common to other UKHO python package repos into line with those other projects. * Includes retirement of the tox tool for running tests. * The common files were generated with the projen (github.com/projen/projen) tool, but for simplicity the projen components used to do this are excluded from the public repository. * Fix typo in workflow * Fix typo in Makefile * Update dev dependencies
- Loading branch information
Showing
23 changed files
with
573 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# .coveragerc to control coverage.py | ||
[run] | ||
omit = | ||
.venv/* | ||
tests/* | ||
|
||
branch = True | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
if self.debug | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: | ||
|
||
# Don't complain about abstract methods, they aren't run: | ||
@(abc.)?abstractmethod | ||
|
||
ignore_errors = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
- package-ecosystem: pip | ||
directory: "/" | ||
registries: "*" | ||
versioning-strategy: lockfile-only | ||
schedule: | ||
interval: "daily" | ||
interval: daily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Dependabot Build Transfer | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'dependabot/**' | ||
|
||
jobs: | ||
build-pass: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Secrets are not available to dependabot from pull_request events, but are needed for build | ||
- name: "Skip pull_request event" | ||
run: echo "Pass Dependabot build to workflow_run event" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'dependabot/**' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout gsfpy repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip poetry | ||
- name: Free disk space on build worker | ||
run: | | ||
df -h | ||
sudo apt-get clean | ||
sudo apt-get autoclean && sudo apt-get autoremove -y | ||
df -h | ||
- name: Run tests | ||
run: | | ||
poetry install | ||
make test-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ MANIFEST.in | |
/releases/* | ||
pip-wheel-metadata | ||
/poetry.toml | ||
requirements.txt | ||
|
||
notebooks/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
__author__ = """UK Hydrographic Office""" | ||
__email__ = "[email protected]" | ||
__version__ = "2.0.0" | ||
|
||
import os | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
__author__ = """UK Hydrographic Office""" | ||
__email__ = "[email protected]" | ||
__version__ = "2.0.0" | ||
|
||
from ctypes import byref, c_int | ||
from os import fsencode | ||
from pathlib import Path | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
__author__ = """UK Hydrographic Office""" | ||
__email__ = "[email protected]" | ||
__version__ = "2.0.0" | ||
|
||
from ctypes import byref, c_int | ||
from os import fsencode | ||
from pathlib import Path | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.