From e4e6243d288ca93b36da64ae5557cbbbb10cc806 Mon Sep 17 00:00:00 2001 From: Toby Driscoll Date: Tue, 30 Jun 2026 12:08:23 -0400 Subject: [PATCH 1/4] Release prep: fix coverage upload gate, drop stale Travis, doc/ignore cleanup - CI: `if: ${{ matrix.version }} == '1'` interpolated to a non-empty string and was always truthy, so coverage uploaded on every matrix entry. Use `if: matrix.version == '1'` so only the release version uploads. - Remove stale .travis.yml (CI moved to GitHub Actions long ago). - .gitignore: ignore .pytest_cache/ and __pycache__/ from PythonCall testing. - README: the lowercase-naming example claimed `rectangle` creates a Polygon, but it returns a Rectangle. Use `n_gon`, which actually returns a Polygon, to illustrate the convention. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/CI.yml | 2 +- .gitignore | 4 +++- .travis.yml | 18 ------------------ README.md | 2 +- 4 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9b49721..08c2fff 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,7 +44,7 @@ jobs: - name: Generate coverage report run: julia --project=. -e 'using Pkg; Pkg.add("Coverage"); using Coverage; LCOV.writefile("coverage-lcov.info", process_folder())' - name: Upload coverage to Codecov - if: ${{ matrix.version }} == '1' + if: matrix.version == '1' uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index ce2cb9c..a1eed0c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ Manifest.toml .vscode .DS_Store docs/node_modules/ -*.cov \ No newline at end of file +*.cov +.pytest_cache/ +__pycache__/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 30a68e9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: julia -julia: - - nightly - - 1.1 - -codecov: false -coveralls: false - -jobs: - include: - - stage: "Documentation" - julia: 1.1 - os: linux - script: - - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); - Pkg.instantiate()' - - julia --project=docs/ docs/make.jl - after_success: skip \ No newline at end of file diff --git a/README.md b/README.md index 4f6eef4..46c8367 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This package provides types and methods that are useful for working with curves Most functionality is provided through Julia types. Per Julia conventions, these are all capitalized. You use these capitalized names to create values of the type; e.g., [Segment](@ref) and [Circle](@ref). -Other methods may create values of these types, but since they are not distinct types themselves, they are not capitalized. For example, the [`rectangle`](@ref) method creates a [Polygon](@ref). +Other methods may create values of these types, but since they are not distinct types themselves, they are not capitalized. For example, the [`n_gon`](@ref) method creates a [Polygon](@ref). The methods in this package should work not only with the built-in `Complex` type, but also with the `Polar` and `Spherical` types from the [ComplexValues](https://complexvariables.github.io/ComplexValues.jl/stable/) package, which it re-exports. From 05f33ef82edde50e5f498a1646a8d963eef6533c Mon Sep 17 00:00:00 2001 From: Toby Driscoll Date: Tue, 30 Jun 2026 12:09:50 -0400 Subject: [PATCH 2/4] Add CONTRIBUTING.md Basic contributor guide: issue reporting, dev setup, running the test suite (incl. Aqua/JET), coding conventions, PR expectations, and a note on AI-assisted contributions consistent with Julia General registry guidance. Co-Authored-By: Claude Opus 4.8 --- CONTRIBUTING.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4de9391 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,74 @@ +# Contributing to ComplexRegions.jl + +Thanks for your interest in contributing! Bug reports, feature requests, +documentation improvements, and pull requests are all welcome. + +## Reporting issues + +Please open an issue on the [issue tracker](https://github.com/complexvariables/ComplexRegions.jl/issues). +A good report includes: + +- the version of ComplexRegions.jl and Julia you are using (`] status` and `versioninfo()`), +- a short, self-contained example that reproduces the problem, and +- what you expected to happen versus what actually happened. + +## Development setup + +1. Fork and clone the repository. +2. From the repository root, activate the project and instantiate its dependencies: + + ```julia + julia --project=. -e 'using Pkg; Pkg.instantiate()' + ``` + +3. Make your changes on a feature branch (not `master`). + +## Running the tests + +The test suite runs against both `Float64` and `BigFloat`, and includes +[Aqua](https://github.com/JuliaTesting/Aqua.jl) quality checks and +[JET](https://github.com/aviatesk/JET.jl) static analysis. + +```bash +julia --project=. -e 'using Pkg; Pkg.test()' +``` + +or from the Julia REPL package mode: + +```julia +] test +``` + +Please make sure the full suite passes before opening a pull request, and add +tests covering any new behavior or bug fix. + +## Coding conventions + +- Follow the style of the surrounding code. +- Types are capitalized (e.g. `Segment`, `Circle`); methods that merely produce + values of existing types are lowercase (e.g. `n_gon`). +- Use `tolerance(T)` for floating-point comparisons rather than hardcoded values, + so that code works correctly across real types including `BigFloat`. +- See [`CLAUDE.md`](CLAUDE.md) for a tour of the type hierarchy, design + conventions, and notes on extending the package with new curve or region types. + +## Pull requests + +- Keep each pull request focused on a single change. +- Include a clear description of what the change does and why. +- Update documentation and docstrings when behavior changes. +- The CI workflow runs the test suite and reports coverage; please check that it + passes. + +## AI-assisted contributions + +Contributions developed with the help of large language models are welcome, but +you must understand and review the code you submit; please do not open pull +requests containing unreviewed generated code. If a contribution includes +substantial AI-generated content, note that in the pull request. This mirrors +the [Julia General registry guidance](https://github.com/JuliaRegistries/General). + +## License + +By contributing, you agree that your contributions will be licensed under the +[MIT License](LICENSE) that covers this project. From 9deee6c579ec67f1ebfaed911b829a9ac1d0a682 Mon Sep 17 00:00:00 2001 From: Toby Driscoll Date: Tue, 30 Jun 2026 12:19:26 -0400 Subject: [PATCH 3/4] update README to disclose AI use and remove broken link --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 46c8367..d6cbd51 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![][docs-stable-img]][docs-stable-url] [![codecov](https://codecov.io/github/complexvariables/ComplexRegions.jl/graph/badge.svg?token=4RNN2G3NWY)](https://codecov.io/github/complexvariables/ComplexRegions.jl) -[![DOI](https://zenodo.org/badge/210664766.svg)](https://zenodo.org/badge/latestdoi/210664766) [![DOI](https://joss.theoj.org/papers/10.21105/joss.01811/status.svg)](https://doi.org/10.21105/joss.01811) This package provides types and methods that are useful for working with curves and regions in the complex plane. @@ -18,19 +17,23 @@ The methods in this package should work not only with the built-in `Complex` typ Please see the [documentation](https://complexvariables.github.io/ComplexRegions.jl/stable/) for more details. +Please open an [issue][issues-url] if you encounter any problems. + ## Installation The package can be installed with Julia's package manager: -```julia +```julia-repl julia> import Pkg julia> Pkg.add("ComplexRegions") ``` -or just use ```] add ComplexRegions``` at the usual command prompt. -## Project Status +Or, just type ```] add ComplexRegions``` at the usual command prompt. + +## AI disclosure + +Claude has been used since version 0.3.6 to assist with finding bugs, identifying and fixing performance issues such as type stability, updating package maintenance tools, and consultations on making refactors and improvements. All AI work has been incremental and human-supervised. The original handwritten tests have never been removed. -Please open an [issue][issues-url] if you encounter any problems. [docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg [docs-latest-url]: https://complexvariables.github.io/ComplexRegions.jl/latest @@ -38,7 +41,4 @@ Please open an [issue][issues-url] if you encounter any problems. [docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg [docs-stable-url]: https://complexvariables.github.io/ComplexRegions.jl/stable -[travis-img]: https://travis-ci.com/complexvariables/ComplexRegions.jl.svg?branch=master -[travis-url]: https://travis-ci.com/complexvariables/ComplexRegions.jl - [issues-url]: https://github.com/complexvariables/ComplexRegions.jl/issues From e06724c4fb75f1f8193bf5a734519d4c2624fefd Mon Sep 17 00:00:00 2001 From: Toby Driscoll Date: Tue, 30 Jun 2026 12:21:02 -0400 Subject: [PATCH 4/4] Remove todo.txt; use GitHub issues for planning Co-Authored-By: Claude Opus 4.8 --- todo.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 todo.txt diff --git a/todo.txt b/todo.txt deleted file mode 100644 index 547bc28..0000000 --- a/todo.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Type issues to be fixed - -5. RegionIntersection stores mismatched real types -regions.jl:49-55: the struct declares both fields as AbstractRegion{T}, but the constructor promotes the type parameter without converting the stored values: - - -struct RegionIntersection{T} <: AbstractRegion{T} - one::AbstractRegion{T} - two::AbstractRegion{T} - function RegionIntersection(one::AbstractRegion{R}, two::AbstractRegion{S}) where {R,S} - # one, two = promote(one, two) ← commented out - new{promote_type(R,S)}(one, two) - end -end -If R=Float64 and S=BigFloat, the struct is RegionIntersection{BigFloat} but one::AbstractRegion{Float64}, which violates the declared field type. The commented-out promote line is the intended fix that was never completed. RegionUnion has the same issue.