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

Build + CI #36

Merged
merged 4 commits into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ branch = True
source = h3_pandas
omit =
setup.py
versioneer.py
h3pandas/_version.py

[report]
Expand Down
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: myenv
environment-file: environment.yml

- name: Install development dependencies
shell: bash -l {0}
run: |
conda env update --file environment-dev.yml

- name: ruff check
shell: bash -l {0}
run: |
ruff check .

- name: pytest
shell: bash -l {0}
run: |
pytest tests/
11 changes: 3 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 23.10.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
rev: v0.9.9
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell
args: ['--config', '.codespellrc']
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ include README.md
include LICENSE
graft h3pandas
recursive-include * *.py[co]
include versioneer.py
include h3pandas/_version.py
2 changes: 2 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ channels:
- conda-forge
dependencies:
# Test
- ruff
- pytest
- pytest-cov
- setuptools-scm
9 changes: 6 additions & 3 deletions h3pandas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from . import h3pandas # noqa: F401s

from ._version import get_versions
from importlib.metadata import version, PackageNotFoundError

__version__ = get_versions()["version"]
del get_versions
try:
__version__ = version("package-name")
except PackageNotFoundError:
# package is not installed
pass
Loading
Loading