Skip to content

Commit

Permalink
Working on #43. Also updating project to support UV instead of poetry.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomarnepedersen committed Jan 8, 2025
1 parent e5e8f8a commit 1c2a277
Show file tree
Hide file tree
Showing 60 changed files with 4,245 additions and 976 deletions.
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[paths]
source =
src/trafficgen
*/site-packages/trafficgen

[run]
source = trafficgen
branch = True

[report]
fail_under = 10.0
show_missing = True
skip_covered = True
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ root = true
[*]
indent_style = space
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Expand Down
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: mixed-line-ending
args: [--fix=auto]
- id: trailing-whitespace
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
hooks:
- id: ruff-format
- id: ruff
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.13.0
# hooks:
# - id: mypy
exclude: '(.venv|.*_cache)/.*'
29 changes: 14 additions & 15 deletions .sourcery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,26 @@

# This file was auto-generated by Sourcery on 2023-02-22 at 11:42.

version: '1' # The schema version of this config file
version: '1' # The schema version of this config file

ignore: # A list of paths or files which Sourcery will ignore.
- .git
- .venv
- .tox
- build
- dist
- __pycache__

- .git
- .venv
- .tox
- dist
- __pycache__
- docs/build

rule_settings:
enable:
- default
disable: # A list of rule IDs Sourcery will never suggest.
- inline-immediately-returned-variable
- default
disable: # A list of rule IDs Sourcery will never suggest.
- inline-immediately-returned-variable
rule_types:
- refactoring
- suggestion
- comment
python_version: '3.9' # A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.
- refactoring
- suggestion
- comment
python_version: '3.10' # A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.

# rules: # A list of custom rules Sourcery will include in its analysis.
# - id: no-print-statements
Expand Down
19 changes: 0 additions & 19 deletions AUTHORS.rst

This file was deleted.

50 changes: 30 additions & 20 deletions HISTORY.rst → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
=======
History
=======
# Changelog

All notable changes to the trafficgen project will be documented in this file.<br>
The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

0.6.0 (2024-11-11)
------------------
## [Unreleased]

Changed
-/-


## [0.6.0] - 2024-11-11

### Changed

* Updated to download-artifact@v4 (from download-artifact@v3)

0.5.0 (2024-04-26)
------------------

Changed
## [0.5.0] - 2024-04-26

### Changed

* removed specific names for target ships. Files generated with target ship 1, 2 etc.
* changed tests. Still need to figure out why some tests "fail" using CLI.

0.4.0 (2024-04-19)
------------------

Changed
## [0.4.0] - 2024-04-19

### Changed

* possible to have several aypoints for own ship
* fixing pyright error
Expand All @@ -30,20 +34,18 @@ Changed
* situation length is used when checking if target ship is passing land


0.3.0 (2024-04-10)
------------------
## [0.3.0] - 2024-04-10

Changed
### Changed

* using types from maritime schema
* lat/lon used instead of north/east
* the generated output files are using "maritime" units: knots and degrees


0.2.0 (2024-01-11)
------------------
## [0.2.0] - 2024-01-11

Changed
### Changed

* add-basic-code-quality-settings-black-ruff-pyright,
* first-small-round-of-code-improvement
Expand All @@ -56,7 +58,15 @@ Changed
* length of encounter may be specified by user


0.1.0 (2023-11-08)
------------------
## [0.1.0] - 2023-11-08

* First release on PyPI.


<!-- Markdown link & img dfn's -->
[0.6.0]: https://github.com/dnv-opensource/ship-traffic-generator/releases/tag/v0.6.0
[0.5.0]: https://github.com/dnv-opensource/ship-traffic-generator/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/dnv-opensource/ship-traffic-generator/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/dnv-opensource/ship-traffic-generator/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/dnv-opensource/ship-traffic-generator/releases/tag/v0.2.0
[trafficgen]: https://github.com/dnv-opensource/ship-traffic-generator
39 changes: 39 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cff-version: 1.2.0
title: trafficgen
message: Ship Traffic Generator.
type: software
authors:
- name: DNV
address: 'Veritasveien 1, 1363 Høvik'
city: Oslo
website: 'https://www.dnv.com/'
- given-names: Tom Arne
family-names: Pedersen
email: Tom.Arne.Pedersen@dnv.com
affiliation: DNV
- given-names: Claas
family-names: Rostock
email: claas.rostock@dnv.com
affiliation: DNV
- given-names: Minos
family-names: Hemrich
email: Minos.Hemrich@dnv.com
affiliation: DNV
testers:
- given-names: Grunde
family-names: Løvoll
affiliation: DNV
- given-names: Stephanie
family-names: Kemna
affiliation: DNV
abstract: >-
The tool trafficgen generates unlimited set of encounters (based on input parameters)
to allow a systematic assessment of the vessel's ability to act according to COLREG
using simulation-based testing.
keywords:
- Traffic Generator
- Simulation-based testing
- Systematic assessment
license: MIT
url: 'https://github.com/dnv-opensource/ship-traffic-generator'
version: 0.6.0
137 changes: 0 additions & 137 deletions CONTRIBUTING.rst

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 DNV open source
Copyright (c) 2024 [DNV](https://www.dnv.com) [open source](https://github.com/dnv-opensource)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 1c2a277

Please sign in to comment.