Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
Signed-off-by: Justus Fluegel <justusfluegel@gmail.com>
  • Loading branch information
JustusFluegel committed Aug 2, 2024
0 parents commit 722c377
Show file tree
Hide file tree
Showing 16 changed files with 565 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
ignore:
# These are peer deps of Cargo and should not be automatically bumped
- dependency-name: "semver"
- dependency-name: "crates-io"
rebase-strategy: "disabled"
labels:
- "C-automated-creation"
- "A-dependencies"
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Cargo Build & Test

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings

jobs:
build_and_test:
name: unhindered-ec - stochest - latest
runs-on: ubuntu-latest
strategy:
# This ensures that all three toolchains will run even if one of
# them fails. This, for example, prevents a `nightly` failure
# from blocking `stable` and `beta` from running.
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
components: clippy, rustfmt
toolchain: ${{ matrix.toolchain }}
- run: cargo build --verbose
- run: cargo test --verbose
- run: cargo clippy --all-targets
- run: cargo install rustfmt-unstable
# Currently (v1.x) rustfmt accepts unstable features as
# arguments only, this wrapper reads the file and passes
# them as arguments. Rustfmt v2.x won't have this limitation
# anymore and then this wrapper can be removed.
- run: rustfmt-unstable --config-file rustfmt.toml -- cargo fmt --check -- --config error_on_line_overflow=true
- run: cargo install example-runner-cli
- run: example-runner-cli --error-on-unconfigured --error-on-unknown --parallel
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/target

packages/rust-lexicase/.env/

tarpaulin-report.html

flamegraph.svg

report.html

/mutants.out*
5 changes: 5 additions & 0 deletions .helix/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[language-server.rust-analyzer.config.rustfmt]
overrideCommand = ["rustfmt-unstable", "--", "rustfmt", "--edition", "2021"]

[language-server.rust-analyzer.config.check]
overrideCommand = ["cargo","+nightly","clippy","--all-targets","--workspace","--message-format=json-diagnostic-rendered-ansi"]
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Justus Flügel <justusfluegel@gmail.com>
Nic McPhee <mcphee@morris.umn.edu>
47 changes: 47 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"cSpell.words": [
"Bitstring",
"Bitstrings",
"Clojush",
"Conv",
"Dataless",
"esitsu",
"GECCO",
"Goues",
"Helmuth",
"hiff",
"lexicase",
"Mizard",
"proptest",
"Pysh",
"recombinate",
"Recombinator",
"recombinators",
"rngs",
"Scorable",
"scottmcm's",
"Spector",
"thiserror",
"typestate",
"UMAD",
"underflowed",
"underflows",
"Wrappable"
],
"todo-tree.tree.showCountsInTree": true,
"rust-analyzer.rustfmt.overrideCommand": [
"rustfmt-unstable",
"--",
"rustfmt",
"--edition",
"2021"
],
"rust-analyzer.check.overrideCommand": [
"cargo",
"+nightly",
"clippy",
"--all-targets",
"--workspace",
"--message-format=json-diagnostic-rendered-ansi"
],
}
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# IDE setup
We are currently using unstable rustfmt features in our rustfmt.toml, which isn't supported through rustfmt stable natively, as rustfmt v1 stable only supports unstable options via the command line. As such we are currently using a small wrapper around rustfmt, called `rustfmt-unstable`, which essentially passes the arguments in the config file via the cli.

To be consistent in ci & in our local development experience, we also overwrote the rustfmt command for rust-analyzer in both vscode and helix.
If you are using one of these editors you will need to install rustfmt-unstable via `cargo install rustfmt-unstable` to get formatting working.
73 changes: 73 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Short version for non-lawyers:

The Unhindered-EC Project, which includes the `stochest` library,
is dual-licensed under Apache 2.0 and MIT terms.


Longer version:

Copyrights in the Unhindered-EC project are retained by their contributors. No
copyright assignment is required to contribute to the Unhindered-EC project.

Some files include explicit copyright notices and/or license notices.
For full authorship information, see the version control history

Except as otherwise noted (below and/or in individual files), Unhindered-EC is
licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
<http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.


The Unhindered-EC project includes packages written by third parties.
The following third party packages are included, and carry
their own copyright notices and license terms:

* Portions of internationalization code use code or data from Unicode, which
carry the following license:

UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE

See Terms of Use <https://www.unicode.org/copyright.html>
for definitions of Unicode Inc.’s Data Files and Software.

NOTICE TO USER: Carefully read the following legal agreement.
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
TERMS AND CONDITIONS OF THIS AGREEMENT.
IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
THE DATA FILES OR SOFTWARE.

COPYRIGHT AND PERMISSION NOTICE

Copyright © 1991-2022 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.

Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that either
(a) this copyright and permission notice appear with all copies
of the Data Files or Software, or
(b) this copyright and permission notice appear in associated
Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
69 changes: 69 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace]
resolver = "2"

members = ["packages/*"]

[workspace.package]
version = "0.1.0"
authors = ["Justus Flügel"]
description = "A testing framework for stochastical algorithms"
documentation = "https://github.com/unhindered-ec/stochest"
repository = "https://github.com/unhindered-ec/stockest.git"
edition = "2021"
license = "MIT OR Apache-2.0"

[workspace.dependencies]

[workspace.lints.clippy]
# Lint groups
# These have a priority of -1 to ensure that individual
# Lints override them, if present.
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
complexity = { level = "warn", priority = -1 }
correctness = { level = "deny", priority = -1 }
style = { level = "warn", priority = -1 }


# Individual lints
dbg_macro = "warn"
clone_on_ref_ptr = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
error_impl_error = "warn"
format_push_string = "warn"
if_then_some_else_none = "warn"
infinite_loop = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_type_annotations = "warn"
rest_pat_in_fully_bound_structs = "warn"
self_named_module_files = "deny"
suspicious_xor_used_as_pow = "warn"
tests_outside_test_module = "deny"
todo = "warn"
try_err = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unneeded_field_pattern = "warn"
use_debug = "warn"
arithmetic_side_effects = "warn"

unwrap_used = "warn"
expect_used = "warn"
panic = "warn"
module_name_repetitions = "allow"
as_conversions = "deny"

# these lints rely on the lint reasons rfc
# https://github.com/rust-lang/rust/issues/54503
# and will become active once that is in stable.
# We should get ample warning with the nightly & beta
# ci builds if we need to change anything
allow_attributes_without_reason = "warn"
allow_attributes = "deny"
Loading

0 comments on commit 722c377

Please sign in to comment.