diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 58a7bf2..c83ec81 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,6 +1,8 @@ name: Build and deploy -on: [push] +on: + push: + pull_request: env: source-directory: $GITHUB_WORKSPACE @@ -23,7 +25,7 @@ jobs: steps: - name: Checkout Campo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: configure system run: | @@ -32,7 +34,7 @@ jobs: # sudo apt-get autoremove sudo apt-get --yes install lftp - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: activate-environment: campo environment-file: environment/configuration/conda_environment.yaml @@ -50,6 +52,7 @@ jobs: rm -f package/dist/*gz - name: Deploy wheel + if: github.repository == 'computationalgeography/campo' run: | mkdir -p $HOME/.ssh echo "HostKeyAlgorithms ssh-rsa" >> $HOME/.ssh/config @@ -59,12 +62,13 @@ jobs: lftp -c "open --user ${{ env.ftp_username }} --password ${{ env.ftp_password }} -p ${{ env.ftp_port }} ${{ env.ftp_server }};set sftp:auto-confirm yes;set ssl:verify-certificate false;mirror --verbose --reverse --continue package/dist/ ${{ env.remote_dir2 }}" - name: Deploy documentation - if: github.ref == 'refs/heads/master' + if: github.repository == 'computationalgeography/campo' && github.ref == 'refs/heads/master' run: | cd ${{ env.build-directory }} # lftp -c "open --user ${{ env.ftp_username }} --password ${{ env.ftp_password }} -p ${{ env.ftp_port }} ${{ env.ftp_server }};set sftp:auto-confirm yes;set ssl:verify-certificate false;mirror --verbose --reverse --continue --parallel=2 documentation/_build/ ${{ env.remote_dir1 }}" - name: Deploy development documentation + if: github.repository == 'computationalgeography/campo' run: | cd ${{ env.build-directory }} lftp -c "open --user ${{ env.ftp_username }} --password ${{ env.ftp_password }} -p ${{ env.ftp_port }} ${{ env.ftp_server }};set sftp:auto-confirm yes;set ssl:verify-certificate false;mirror --verbose --reverse --continue --parallel=2 documentation/_build/ ${{ env.remote_dir3 }}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..34ef398 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,43 @@ +# Contributing to Campo + +Thanks for your time and willingness to contribute to Campo! This page gives a few guidelines: + + +**Reporting issues** + +If you have found a bug in the Campo software (or any other erroneous behaviour) please file a bug report. +Bugs are tracked on our GitHub [issue](https://github.com/computationalgeography/campo/issues) page. +To allow us to reproduce the issue please provide as much information as possible such that we can reproduce the bug: + +- The Campo version and the Python version used. +- Details about the operating system used. +- The description of the problem in as much detail as possible. +- If possible, a minimal working example and zip or archive file with all data and scripts. + +**Solving issues** + +If you find an issue to work on, you are welcome to open a pull request with a fix. + +**Pull requests** + +In case you can provide a code fix yourself or want to contribute additional functionality to Campo please consider submitting a [pull](https://github.com/computationalgeography/campo/pulls) request. + +For something that is bigger than a trivial fix follow these steps: + +1. Create an issue describing the changes you intend to make. +2. Create your own fork of the Campo code, or make sure it is in sync with the upstream project. +3. Create a branch with the corresponding issue number. +4. Switch to that branch. +5. Apply your modifications. +6. Ensure cross-platform compatibility; for Linux, Mac, and Windows. Preferably provide unit tests as well. + +Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. +Once you submit your PR, a Campo team member will review your proposal. +We may ask questions, request additional information or may ask for changes to be made before a PR can be merged. + +All contributions to this project will be released under the MIT license. +By submitting a pull request: + +- You are agreeing to comply with the waiver of your copyright interest. +- You state that the contribution was created in whole by you and you have the right to submit it. +