Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b6f7a88
Migrate code tooling to use pre-commit and ruff
VeckoTheGecko Sep 25, 2024
d8542c3
Enable pyupgrade
VeckoTheGecko Sep 25, 2024
40c5dc0
Nox, documentation, codecoverage, updated workflows (publish and test…
VeckoTheGecko Sep 26, 2024
b127f26
add version information
VeckoTheGecko Sep 26, 2024
15fbb17
Add code of conduct
VeckoTheGecko Sep 26, 2024
5c714cf
Add logo
VeckoTheGecko Sep 26, 2024
801f50a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 26, 2024
8413bde
Update supported Pythons
VeckoTheGecko Sep 26, 2024
0a4c053
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 26, 2024
e5864b6
Ignore deprecation warning of pkg_resources
VeckoTheGecko Sep 26, 2024
e8596d1
Remove deprecated dependency pylib
VeckoTheGecko Sep 26, 2024
5501e8d
ignore pset empty warning
VeckoTheGecko Sep 26, 2024
a8751a2
Enable prettier
VeckoTheGecko Sep 27, 2024
e41eb13
update readme
VeckoTheGecko Oct 1, 2024
47248f9
update name to virtualship
VeckoTheGecko Oct 1, 2024
6b03f9d
Update CLI to use click
VeckoTheGecko Oct 2, 2024
c50fed2
switch to src layout
VeckoTheGecko Oct 2, 2024
051471e
Remove compat.py
VeckoTheGecko Oct 2, 2024
fe09226
Update doc website with new pages
VeckoTheGecko Oct 2, 2024
24bf89a
Update docs environment to conda
VeckoTheGecko Oct 2, 2024
c7cd60c
doc: maintainer release checklist
VeckoTheGecko Oct 2, 2024
059b5a9
migrate to conda for dev environment
VeckoTheGecko Oct 3, 2024
6a3c4a1
update contributing guidelines
VeckoTheGecko Oct 3, 2024
f1975a2
cli add version option
VeckoTheGecko Oct 3, 2024
c414424
update CD to publish to pypi
VeckoTheGecko Oct 3, 2024
16fcc79
remove py3.13 support
VeckoTheGecko Oct 3, 2024
fd44ed3
update contributing
VeckoTheGecko Oct 3, 2024
d91d3e3
update ci and warnings ignore
VeckoTheGecko Oct 3, 2024
c48777e
Update deprecation warning handling
VeckoTheGecko Oct 3, 2024
afc6cf1
patch pip install .
VeckoTheGecko Oct 3, 2024
1b39b91
switch to micromamba ci
VeckoTheGecko Oct 3, 2024
46fd185
update code of conduct
VeckoTheGecko Oct 3, 2024
e66c2f5
Update README.md
VeckoTheGecko Oct 7, 2024
1d54956
Update docs/quickstart.md
VeckoTheGecko Oct 7, 2024
705973e
review feedback
VeckoTheGecko Oct 7, 2024
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
46 changes: 46 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See the following [contributing guide](../docs/contributing.md).
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
5 changes: 5 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
57 changes: 57 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CD

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3

jobs:
dist:
name: Distribution build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: hynek/build-and-inspect-python-package@v2

publish:
needs: [dist]
name: Publish to PyPI
environment: pypi
permissions:
id-token: write
attestations: write
contents: read
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@v1.4.1
with:
subject-path: "dist/*"

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -el {0}

env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3

jobs:
# pylint:
# name: Format
# runs-on: ubuntu-latest
# steps:
# - name: Run PyLint
# run: pipx run nox -s pylint -- --output-format=github

tests:
name: tests (${{ matrix.runs-on }} | Python ${{ matrix.python-version }})
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
runs-on: [ubuntu-latest, windows-latest, macos-14]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: ship
environment-file: environment.yml
create-args: >-
python=${{matrix.python-version}}

- run: pip install . --no-deps --no-build-isolation

- name: Test package
run: >-
python -m pytest -ra --cov --cov-report=xml --cov-report=term
--durations=20

- name: Upload coverage report
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
46 changes: 0 additions & 46 deletions .github/workflows/codetools.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/api/

# PyBuilder
.pybuilder/
Expand Down Expand Up @@ -171,6 +172,6 @@ cython_debug/
#.idea/

# Auto generated by setuptools scm
virtual_ship/_version_setup.py
src/virtualship/_version_setup.py

.vscode/
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: .*\.zarr/
- id: check-yaml
- id: check-ast
- id: check-json
types: [text]
files: \.(json|ipynb)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff
name: ruff (isort jupyter)
args: [--select, I, --fix]
types_or: [jupyter]
- id: ruff-format
types_or: [python, jupyter]
- repo: https://github.com/rbubley/mirrors-prettier # Update mirror as official mirror is deprecated
rev: v3.3.3
hooks:
- id: prettier
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: mambaforge-22.9
jobs:
pre_build:
- sphinx-build -b linkcheck docs/ _build/linkcheck
- sphinx-apidoc -o docs/api/ --module-first --no-toc --force src/virtualship

conda:
environment: environment.yml
Loading