From 65025e61d948deef9c241a73e93274864de1e652 Mon Sep 17 00:00:00 2001 From: Alexander Graf <17130992+aandergr@users.noreply.github.com> Date: Tue, 16 Jun 2020 20:26:58 +0200 Subject: [PATCH] Update issue/PR templates, contributing.rst, CI - Keep documentation in sync with master branch - Run PyLint and MyPy on Github Actions - Update Issue templates, enforce usage of issue templates, add links to resources in Instaloader Documentation - Update contributing.rst --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 11 +++++ .github/ISSUE_TEMPLATE/feature_request.md | 6 +-- .github/ISSUE_TEMPLATE/question.md | 4 ++ .github/pull_request_template.md | 11 +++++ .github/workflows/lint.yml | 30 +++++++++++++ .github/workflows/stale.yml | 1 + .github/workflows/windows_exe.yml | 1 + .travis.yml | 2 +- docs/contributing.rst | 53 ++++++++++++----------- 10 files changed, 90 insertions(+), 31 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/lint.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index fc885f3..fa8acc4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,4 +24,4 @@ If applicable, add error messages and tracebacks to help explain your problem. **Additional context** Add any other context about the problem here. -(please also see https://instaloader.github.io/contributing.html for how to report a bug) + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ece3ca4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Contributing to Instaloader + url: https://instaloader.github.io/contributing.html + about: Guidelines for how to report an issue. + - name: Instaloader Troubleshooting + url: https://instaloader.github.io/troubleshooting.html + about: Many common problems and their workarounds are described here. + - name: Instaloader Documentation + url: https://instaloader.github.io/ + about: Many questions might be already answered here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index f96e4f6..354258a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -15,10 +15,10 @@ A clear and concise description of what you want to happen. A clear and concise description of any alternative solutions or features you've considered. **If the feature request is accepted, would you be willing to submit a PR?** - -Yes / No _(Help can be provided if you need assistance submitting a PR)_ +Yes / No + **Additional context** Add any other context about the feature request here. -(please also see https://instaloader.github.io/contributing.html for how to suggest a feature) + diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 39e32ba..3ee1f53 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -6,3 +6,7 @@ labels: question --- Your question here... + + + + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..3181009 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +**Motivation for making this change** +Fixes # . + + +**Changes proposed in this pull request** +- +- +- + +**Completeness of this change** + diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..1826285 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: PyLint and MyPy + +on: [push, pull_request] + +jobs: + lint: + name: PyLint and MyPy + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + steps: + - name: Checkout Instaloader Repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 # needed for building docs + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install pipenv==2020.6.2 + pipenv sync --dev + - name: PyLint + run: pipenv run pylint instaloader + - name: MyPy + run: pipenv run mypy -m instaloader + - name: Build Documentation + run: pipenv run make -C docs html SPHINXOPTS="-W -n" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b0501df..6a02162 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,6 +7,7 @@ on: jobs: stale: + name: Mark stale issues and pull requests runs-on: ubuntu-latest steps: diff --git a/.github/workflows/windows_exe.yml b/.github/workflows/windows_exe.yml index 6780950..7dc7e89 100644 --- a/.github/workflows/windows_exe.yml +++ b/.github/workflows/windows_exe.yml @@ -4,6 +4,7 @@ on: [push, pull_request] jobs: build: + name: Windows EXE build runs-on: windows-latest steps: - name: Checkout Instaloader repository diff --git a/.travis.yml b/.travis.yml index 086693b..43b3cea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ deploy: repo: instaloader/instaloader.github.io target-branch: master on: - tags: true + branch: master python: 3.6 - provider: script script: deploy/arch/deploy.sh $TRAVIS_TAG diff --git a/docs/contributing.rst b/docs/contributing.rst index 0f969ed..8f800fd 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -35,8 +35,8 @@ reporting a problem, please keep the following in mind: - If not obvious, describe **which behavior you expected** instead of what actually happened. -- If you think an issue has been closed accidentally or inappropriately, feel - free to reopen it. +- If we have closed an issue apparently inadvertently or inappropriately, please + let us know. Writing Code or Improving the Documentation ------------------------------------------- @@ -45,28 +45,25 @@ Changes of the Instaloader source can be proposed as a `Pull Request `__. There are only few things to consider: -- Sometimes, the most current code is not in the ``master`` branch. Check that - you forked from the most recent branch. +- Base your Pull Request on the ``master`` branch if it fixes a bug, + or the ``upcoming/v4.X`` (if it exists at the moment of submitting the PR) + branch otherwise. - We use `Pylint `__ for error and syntax checking of - the source. The file ``.travis.yml`` in the project's root directory - shows how it is invoked. Note that sometimes it might be better to disable a - warning rather than adapting the code to Pylint's desires. + the source and `MyPy `__ for type checking + (Note that sometimes it might be better to disable a warning rather than + adapting the code to a tool's desires). - The documentation source is located in the ``docs`` folder. The file ``cli-options.rst`` is merely an RST-formatted copy of ``instaloader --help`` output, of which the source is in ``instaloader/__main__.py``. -- Feel free to contact us, even if you "only" have Proof-of-Concepts or - not-fully integrated changes. They already might be an advance for the - project. - -Suggesting Features -------------------- +Proposing Features +------------------ .. goal-start -Instaloader's goal is to mimick the browser's behavior to access the data that +Instaloader's goal is to mimic the browser's behavior to access the data that is available through the Instagram web interface, pack this data into complete and easily-(re)usable python objects, and provide a user interface for the most common downloading and metadata collection tasks, without changing any of the @@ -74,10 +71,9 @@ online data. .. goal-end -If you have an idea of how Instaloader should be enhanced, but do not want to -implement the feature yourself, feel free to open a ticket in our -`Issue Tracker `__. -Please consider the following: +Prior spending effort on implementing a new feature, it might be appropriate to +clarify how it could fit into the project's scope or discuss implementation +details. If you feel the need to do so, please create a "feature suggestion". - Instaloader already has plenty of features. **Check the documentation** beforehand to ensure your desired suggestion is not already implemented. @@ -86,16 +82,21 @@ Please consider the following: an issue suggesting the same or a similar feature, share your thoughts in a comment there, instead of opening a new issue. -- If possible, provide us a **use case of the feature**: How could the user - invoke the new function? Which problem would it solve? If new information is - obtained, how would it be further processed? +- **Motivate the feature**, i.e. -- If not obvious, briefly motivate how your suggested feature **conforms with - Instaloader's project goal**. + - Provide us a **use case of the feature**: How could the user + invoke the new function? Which problem would it solve? If new information is + obtained, how would it be further processed? -- **Be patient**. Naturally, bugs and pull requests have a higher priority than - feature suggestions. Keep in mind that this is a free software project, and - unfortunately we only have limited time to work on it. + - Describe already-working **alternatives of the feature** and how they + compare with your proposed solution. + + - Briefly describe how your suggested feature **conforms with Instaloader's + project goal**. + +- Explain your **solution ideas**. Describe your ideas on how the feature could + be implemented and the underlying problem could be solved. Also describe + alternatives that you have considered. Donations ---------