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

Initial Public Release #17

Merged
merged 21 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5d2e574
feat(age.py): Limited age estimating to ages in millions of years.
rbeyer Nov 20, 2023
0f677b1
feat(diffusion.py): Added the ability to store and write merged crate…
rbeyer Nov 20, 2023
27aba89
refactor(many): Ran a thorough flake8 and black-ing of the codebase.
rbeyer Nov 20, 2023
443d2ec
feat(functions.py): Minor change to constants in NPF().
rbeyer Jun 27, 2024
773a8dd
build(pyproject.toml, setup.py, setup.cfg): Overhauled these files to
rbeyer Jun 27, 2024
77c49a2
build(Makefile): Updated the dist and install targets and added a
rbeyer Jun 27, 2024
47dbdba
docs(README.rst & LICENSE): Updated license for NASA Open Source
rbeyer Jun 27, 2024
e8543f0
docs(THIRDPARTYLICENSES.rst): Added to repo.
rbeyer Jun 28, 2024
d8a3c11
build(environment.yml): Added the opensimplex, which is only installable
rbeyer Jun 28, 2024
7678937
build(environment_dev.yml and requirements_dev.txt): Updated and
rbeyer Jun 28, 2024
bd3c1d7
docs(CONTRIBUTING and CLAs): Updated CONTRIBUTING and added the CLAs.
rbeyer Jun 28, 2024
b75bb08
docs(various): Added proper NASA copyright boilerplate and applied ufmt.
rbeyer Jul 1, 2024
f24810a
build(Makefile): Added line/ufmt and the release-check target.
rbeyer Jul 1, 2024
2584bd2
docs: Added initial Sphinx documentation structure.
rbeyer Jul 2, 2024
2faa1c4
docs(README.rst): Added installation instructions.
rbeyer Jul 2, 2024
5e70bc6
docs(CONRIBUTING): Minor wording changes.
rbeyer Jul 2, 2024
856d790
build(.github): Added Issue and PR templates, and some workflows.
rbeyer Jul 3, 2024
240cf63
docs(CHANGELOG.rst): Updated for first release.
rbeyer Jul 3, 2024
8cc9d91
build(setup.cfg): Add ignore for W503
rbeyer Jul 3, 2024
09f51d9
build(Makefile): Added ufmt to lint target.
rbeyer Jul 3, 2024
d9b8d31
docs(AUTHORS): Added Scott.
rbeyer Jul 3, 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
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* synthterrain version:
* Python version:
* Operating System:

### Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

### What I Did

```
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```
46 changes: 46 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Related Issue
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
<!--- If any of the tests below were *not* run, please delete the line -->

## Types of changes
<!--- What types of changes does your code introduce? Remove lines that do not apply: -->
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:
<!--- Go over all the following points, and remove lines that do not apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- My change requires a change to the documentation.
- I have updated the documentation accordingly.
- I have added tests to cover my changes.
- All new and existing tests passed.

## Licensing:

This project is released under the [LICENSE](https://github.com/NeoGeographyToolkit/synthterrain/blob/master/LICENSE).

<!-- Remove the statement that does not apply. -->
- I claim copyrights on my contributions in this pull request, and I provide those contributions via this pull request under the same license terms that the synthterrain project uses, and I have submitted a CLA.
- I dedicate any and all copyright interest in my contributions in this pull request to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this contribution under copyright law.

<!-- No matter how you contributed, please make sure you add your name to the
[AUTHORS](https://github.com/NeoGeographyToolkit/synthterrain/blob/master/AUTHORS.rst) file, if you haven't already. -->

<!-- Thanks for contributing to synthterrain! -->
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint

on: [push]

jobs:
black:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Black Version
uses: psf/black@stable
with:
options: "--version"
- name: Black Check
uses: psf/black@stable

flake8:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
path: "src/python/synthterrain tests/python"
44 changes: 44 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python Testing

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest-cov
python -m pip install -r requirements.txt
- name: Install
# run: python -m pip install -e ${{ matrix.install-target }}
run: python -m pip install -e .
- name: Test with pytest and generate coverage report
run: |
pytest --cov=./src/python/synthterrain --cov-report=xml

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# verbose: true
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5 changes: 3 additions & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ Credits
Development Lead
----------------

* Ross Beyer <rbeyer@seti.org>
* Ross Beyer <rbeyer@seti.org>, SETI Institute & NASA Ames

Contributors
------------

* Mark Allan, NASA Ames & KBR
* Scott McMichael, NASA Ames & KBR
* Audrow Nash, NASA Ames & KBR
* Jennifer Nguyen, NASA Ames & KBR
* Jennifer Nguyen, NASA Ames & KBR
7 changes: 5 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ and the release date, in year-month-day format (see examples below).

Unreleased
----------
0.1.0 (2022-??-??)

* First release.

0.1.0 (2024-07-02)
------------------

- First release.
145 changes: 116 additions & 29 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,37 @@ Ready to contribute? Here's how to set up `synthterrain` for local development.
1. Fork the `synthterrain` repo on GitHub.
2. Clone your fork locally::

$ git clone git@github.com:your_name_here/synthterrain.git
$> git clone git@github.com:your_name_here/synthterrain.git

3. Install your local copy into a virtual environment of your choice (there are many to choose from like conda, etc.). We will assume conda here, but any should work::

$ cd synthterrain/
$ conda env create -n synthterrain
$ conda activate synthterrain
$ mamba env update --file environment_dev.yml
$ mamba env update --file environment.yml
$ pip install opensimplex
$ pip install --no-deps -e .
$> cd synthterrain/
$> conda env create -n synthterrain
$> conda activate synthterrain
$> mamba env update --file environment_dev.yml
$> mamba env update --file environment.yml
$> pip install --no-deps -e .

The last ``pip install`` installs synthterrain in "editable" mode which facilitates using the programs and testing.

4. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature
$> git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox::
tests.

$ flake8 src/synthterrain tests
$ python setup.py test or pytest
$ tox
$> make lint
$> make test

To get flake8 and tox, just pip install them into your virtual environment.

6. Commit your changes and push your branch to GitHub::

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature
$> git add .
$> git commit -m "Your detailed description of your changes."
$> git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.

Expand All @@ -111,17 +108,107 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in CHANGELOG.rst.
3. The pull request should work for Python 3.7, 3.8, and 3.9 and optionally for PyPy.
3. The pull request should work for Python 3.8, 3.9, 3.10, 3.11 and optionally for PyPy.
And make sure that the tests pass for all supported Python versions.


Deploying
---------

A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.rst).
Then run::

$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags
What to expect
--------------

Our development of synthterrain is not particularly continuous,
and it is entirely possible that when you submit a PR
(pull request), none of us will have the time to evaluate or integrate
your PR. If we don't, we'll try and communicate that with you via the
PR.

For large contributions, it is likely that you, or your employer,
will be retaining your copyrights, but releasing the contributions
via an open-source license. It must be compatible with the Apache-2
license that synthterrain is distributed with, so that we can redistribute
that contribution with synthterrain, give you credit, and make synthterrain even
better! Please contact us if you have a contribution of that nature,
so we can be sure to get all of the details right.

For smaller contributions, where you (or your employer) are not
concerned about retaining copyright (but we will give you credit!),
you will need to fill out a Contributor License Agreement (CLA)
before we can accept your PR. The CLA assigns your copyright in
your contribution to NASA, so that our NASA copyright statement
remains true:

Copyright (c) YEAR, United States Government as represented by the
Administrator of the National Aeronautics and Space Administration.
All rights reserved.

There is an `Individual CLA
<https://github.com/NeoGeographyToolkit/synthterrain/blob/master/docs/synthterrain_ARC-18971-1_Individual_CLA.pdf>`_ and a
`Corporate CLA
<https://github.com/NeoGeographyToolkit/synthterrain/blob/master/docs/synthterrain_ARC-18971-1_Corporate_CLA.pdf>`_.

synthterrain People
-------------------

- A synthterrain **Contributor** is any individual creating or commenting
on an issue or pull request. Anyone who has authored a PR that was
merged should be listed in the AUTHORS.rst file.

- A synthterrain **Committer** is a subset of contributors, typically NASA
employees or contractors, who have been given write access to the
repository.

Rules for Merging Pull Requests
-------------------------------

Any change to resources in this repository must be through pull
requests (PRs). This applies to all changes to documentation, code,
binary files, etc. Even long term committers must use pull requests.

In general, the submitter of a PR is responsible for making changes
to the PR. Any changes to the PR can be suggested by others in the
PR thread (or via PRs to the PR), but changes to the primary PR
should be made by the PR author (unless they indicate otherwise in
their comments). In order to merge a PR, it must satisfy these conditions:

1. Have been open for 24 hours.
2. Have one approval.
3. If the PR has been open for 2 days without approval or comment, then it
may be merged without any approvals.

Pull requests should sit for at least 24 hours to ensure that
contributors in other timezones have time to review. Consideration
should also be given to weekends and other holiday periods to ensure
active committers all have reasonable time to become involved in
the discussion and review process if they wish.

In order to encourage involvement and review, we encourage at least
one explicit approval from committers that are not the PR author.

However, in order to keep development moving along with our low number of
active contributors, if a PR has been open for 2 days without comment, then
it could be committed without an approval.

The default for each contribution is that it is accepted once no
committer has an objection, and the above requirements are
satisfied.

In the case of an objection being raised in a pull request by another
committer, all involved committers should seek to arrive at a
consensus by way of addressing concerns being expressed by discussion,
compromise on the proposed change, or withdrawal of the proposed
change.

Exceptions to the above are minor typo fixes or cosmetic changes
that don't alter the meaning of a document. Those edits can be made
via a PR and the requirement for being open 24 h is waived in this
case.


.. Deploying
---------

A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in CHANGELOG.rst).
Then run::

$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags
Loading