You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+22-22
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,10 @@ Thanks for considering contributing! Please read this document to learn the vari
6
6
7
7
### Did you find a bug?
8
8
9
-
First, do [a quick search](https://github.com/allenai/python-package-template/issues) to see whether your issue has already been reported.
9
+
First, do [a quick search](https://github.com/allenai/drawedumath/issues) to see whether your issue has already been reported.
10
10
If your issue has already been reported, please comment on the existing issue.
11
11
12
-
Otherwise, open [a new GitHub issue](https://github.com/allenai/python-package-template/issues). Be sure to include a clear title
12
+
Otherwise, open [a new GitHub issue](https://github.com/allenai/drawedumath/issues). Be sure to include a clear title
13
13
and description. The description should include as much relevant information as possible. The description should
14
14
explain how to reproduce the erroneous behavior as well as the behavior you expect to see. Ideally you would include a
15
15
code sample or an executable test case demonstrating the expected behavior.
@@ -21,7 +21,7 @@ We use GitHub issues to track feature requests. Before you create a feature requ
21
21
* Make sure you have a clear idea of the enhancement you would like. If you have a vague idea, consider discussing
22
22
it first on a GitHub issue.
23
23
* Check the documentation to make sure your feature does not already exist.
24
-
* Do [a quick search](https://github.com/allenai/python-package-template/issues) to see whether your feature has already been suggested.
24
+
* Do [a quick search](https://github.com/allenai/drawedumath/issues) to see whether your feature has already been suggested.
25
25
26
26
When creating your request, please:
27
27
@@ -41,31 +41,31 @@ When you're ready to contribute code to address an open issue, please follow the
At this point the local clone of your fork only knows that it came from *your* repo, github.com/USERNAME/python-package-template.git, but doesn't know anything the *main* repo, [https://github.com/allenai/python-package-template.git](https://github.com/allenai/python-package-template). You can see this by running
50
+
At this point the local clone of your fork only knows that it came from *your* repo, github.com/USERNAME/drawedumath.git, but doesn't know anything the *main* repo, [https://github.com/allenai/drawedumath.git](https://github.com/allenai/drawedumath). You can see this by running
This means that your local clone can only track changes from your fork, but not from the main repo, and so you won't be able to keep your fork up-to-date with the main repo over time. Therefore you'll need to add another "remote" to your clone that points to [https://github.com/allenai/python-package-template.git](https://github.com/allenai/python-package-template). To do this, run the following:
59
+
This means that your local clone can only track changes from your fork, but not from the main repo, and so you won't be able to keep your fork up-to-date with the main repo over time. Therefore you'll need to add another "remote" to your clone that points to [https://github.com/allenai/drawedumath.git](https://github.com/allenai/drawedumath). To do this, run the following:
Finally, you'll need to create a Python 3 virtual environment suitable for working on this project. There a number of tools out there that making working with virtual environments easier.
71
71
The most direct way is with the [`venv` module](https://docs.python.org/3.7/library/venv.html) in the standard library, but if you're new to Python or you don't already have a recent Python 3 version installed on your machine,
@@ -77,8 +77,8 @@ When you're ready to contribute code to address an open issue, please follow the
77
77
78
78
Then you can create and activate a new Python environment by running:
79
79
80
-
conda create -n my-package python=3.9
81
-
conda activate my-package
80
+
conda create -n drawedumath python=3.9
81
+
conda activate drawedumath
82
82
83
83
Once your virtual environment is activated, you can install your local clone in "editable mode" with
84
84
@@ -93,7 +93,7 @@ When you're ready to contribute code to address an open issue, please follow the
93
93
94
94
<details><summary>Expand details 👇</summary><br/>
95
95
96
-
Once you've added an "upstream" remote pointing to [https://github.com/allenai/python-package-temlate.git](https://github.com/allenai/python-package-template), keeping your fork up-to-date is easy:
96
+
Once you've added an "upstream" remote pointing to [https://github.com/allenai/python-package-temlate.git](https://github.com/allenai/drawedumath), keeping your fork up-to-date is easy:
97
97
98
98
git checkout main # if not already on main
99
99
git pull --rebase upstream main
@@ -119,7 +119,7 @@ When you're ready to contribute code to address an open issue, please follow the
119
119
120
120
<details><summary>Expand details 👇</summary><br/>
121
121
122
-
Our continuous integration (CI) testing runs [a number of checks](https://github.com/allenai/python-package-template/actions) for each pull request on [GitHub Actions](https://github.com/features/actions). You can run most of these tests locally, which is something you should do *before* opening a PR to help speed up the review process and make it easier for us.
122
+
Our continuous integration (CI) testing runs [a number of checks](https://github.com/allenai/drawedumath/actions) for each pull request on [GitHub Actions](https://github.com/features/actions). You can run most of these tests locally, which is something you should do *before* opening a PR to help speed up the review process and make it easier for us.
123
123
124
124
First, you should run [`isort`](https://github.com/PyCQA/isort) and [`black`](https://github.com/psf/black) to make sure you code is formatted consistently.
125
125
Many IDEs support code formatters as plugins, so you may be able to setup isort and black to run automatically everytime you save.
@@ -137,9 +137,9 @@ When you're ready to contribute code to address an open issue, please follow the
137
137
138
138
mypy .
139
139
140
-
We also strive to maintain high test coverage, so most contributions should include additions to [the unit tests](https://github.com/allenai/python-package-template/tree/main/tests). These tests are run with [`pytest`](https://docs.pytest.org/en/latest/), which you can use to locally run any test modules that you've added or changed.
140
+
We also strive to maintain high test coverage, so most contributions should include additions to [the unit tests](https://github.com/allenai/drawedumath/tree/main/tests). These tests are run with [`pytest`](https://docs.pytest.org/en/latest/), which you can use to locally run any test modules that you've added or changed.
141
141
142
-
For example, if you've fixed a bug in `my_package/a/b.py`, you can run the tests specific to that module with
142
+
For example, if you've fixed a bug in `drawedumath/a/b.py`, you can run the tests specific to that module with
143
143
144
144
pytest -v tests/a/b_test.py
145
145
@@ -152,9 +152,9 @@ When you're ready to contribute code to address an open issue, please follow the
152
152
153
153
If the build fails, it's most likely due to small formatting issues. If the error message isn't clear, feel free to comment on this in your pull request.
154
154
155
-
And finally, please update the [CHANGELOG](https://github.com/allenai/python-package-template/blob/main/CHANGELOG.md) with notes on your contribution in the "Unreleased" section at the top.
155
+
And finally, please update the [CHANGELOG](https://github.com/allenai/drawedumath/blob/main/CHANGELOG.md) with notes on your contribution in the "Unreleased" section at the top.
156
156
157
-
After all of the above checks have passed, you can now open [a new GitHub pull request](https://github.com/allenai/python-package-template/pulls).
157
+
After all of the above checks have passed, you can now open [a new GitHub pull request](https://github.com/allenai/drawedumath/pulls).
158
158
Make sure you have a clear description of the problem and the solution, and include a link to relevant issues.
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/bug_report.yml
+2-2
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ body:
6
6
- type: markdown
7
7
attributes:
8
8
value: >
9
-
#### Before submitting a bug, please make sure the issue hasn't been already addressed by searching through [the existing and past issues](https://github.com/allenai/python-package-template/issues?q=is%3Aissue+sort%3Acreated-desc+).
9
+
#### Before submitting a bug, please make sure the issue hasn't been already addressed by searching through [the existing and past issues](https://github.com/allenai/drawedumath/issues?q=is%3Aissue+sort%3Acreated-desc+).
10
10
- type: textarea
11
11
attributes:
12
12
label: 🐛 Describe the bug
@@ -17,7 +17,7 @@ body:
17
17
18
18
```python
19
19
# All necessary imports at the beginning
20
-
import my_package
20
+
import drawedumath
21
21
22
22
# A succinct reproducing example trimmed down to the essential parts:
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ Changes proposed in this pull request:
10
10
## Before submitting
11
11
12
12
<!-- Please complete this checklist BEFORE submitting your PR to speed along the review process. -->
13
-
-[ ] I've read and followed all steps in the [Making a pull request](https://github.com/allenai/python-package-template/blob/main/.github/CONTRIBUTING.md#making-a-pull-request)
13
+
-[ ] I've read and followed all steps in the [Making a pull request](https://github.com/allenai/drawedumath/blob/main/.github/CONTRIBUTING.md#making-a-pull-request)
14
14
section of the `CONTRIBUTING` docs.
15
15
-[ ] I've updated or added any relevant docstrings following the syntax described in the
16
-
[Writing docstrings](https://github.com/allenai/python-package-template/blob/main/.github/CONTRIBUTING.md#writing-docstrings) section of the `CONTRIBUTING` docs.
16
+
[Writing docstrings](https://github.com/allenai/drawedumath/blob/main/.github/CONTRIBUTING.md#writing-docstrings) section of the `CONTRIBUTING` docs.
17
17
-[ ] If this PR fixes a bug, I've added a test that will fail without my fix.
18
18
-[ ] If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.
This is a template repository for Python package projects.
4
-
5
-
## In this README :point_down:
6
-
7
-
-[Features](#features)
8
-
-[Usage](#usage)
9
-
-[Initial setup](#initial-setup)
10
-
-[Creating releases](#creating-releases)
11
-
-[Projects using this template](#projects-using-this-template)
12
-
-[FAQ](#faq)
13
-
-[Contributing](#contributing)
14
-
15
-
## Features
16
-
17
-
This template repository comes with all of the boilerplate needed for:
18
-
19
-
⚙️ Robust (and free) CI with [GitHub Actions](https://github.com/features/actions):
20
-
- Unit tests ran with [PyTest](https://docs.pytest.org) against multiple Python versions and operating systems.
21
-
- Type checking with [mypy](https://github.com/python/mypy).
22
-
- Linting with [ruff](https://astral.sh/ruff).
23
-
- Formatting with [isort](https://pycqa.github.io/isort/) and [black](https://black.readthedocs.io/en/stable/).
24
-
25
-
🤖 [Dependabot](https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/) configuration to keep your dependencies up-to-date.
26
-
27
-
📄 Great looking API documentation built using [Sphinx](https://www.sphinx-doc.org/en/master/) (run `make docs` to preview).
28
-
29
-
🚀 Automatic GitHub and PyPI releases. Just follow the steps in [`RELEASE_PROCESS.md`](./RELEASE_PROCESS.md) to trigger a new release.
30
-
31
-
## Usage
32
-
33
-
### Initial setup
34
-
35
-
1.[Create a new repository](https://github.com/allenai/python-package-template/generate) from this template with the desired name of your project.
36
-
37
-
*Your project name (i.e. the name of the repository) and the name of the corresponding Python package don't necessarily need to match, but you might want to check on [PyPI](https://pypi.org/) first to see if the package name you want is already taken.*
38
-
39
-
2. Create a Python 3.8 or newer virtual environment.
40
-
41
-
*If you're not sure how to create a suitable Python environment, the easiest way is using [Miniconda](https://docs.conda.io/en/latest/miniconda.html). On a Mac, for example, you can install Miniconda using [Homebrew](https://brew.sh/):*
42
-
43
-
```
44
-
brew install miniconda
45
-
```
46
-
47
-
*Then you can create and activate a new Python environment by running:*
48
-
49
-
```
50
-
conda create -n my-package python=3.9
51
-
conda activate my-package
52
-
```
53
-
54
-
3. Now that you have a suitable Python environment, you're ready to personalize this repository. Just run:
55
-
56
-
```
57
-
pip install -r setup-requirements.txt
58
-
python scripts/personalize.py
59
-
```
60
-
61
-
And then follow the prompts.
62
-
63
-
:pencil: *NOTE: This script will overwrite the README in your repository.*
64
-
65
-
4. Commit and push your changes, then make sure all GitHub Actions jobs pass.
66
-
67
-
5. (Optional) If you plan on publishing your package to PyPI, add repository secrets for `PYPI_USERNAME` and `PYPI_PASSWORD`. To add these, go to "Settings" > "Secrets" > "Actions", and then click "New repository secret".
68
-
69
-
*If you don't have PyPI account yet, you can [create one for free](https://pypi.org/account/register/).*
70
-
71
-
6. (Optional) If you want to deploy your API docs to [readthedocs.org](https://readthedocs.org), go to the [readthedocs dashboard](https://readthedocs.org/dashboard/import/?) and import your new project.
72
-
73
-
Then click on the "Admin" button, navigate to "Automation Rules" in the sidebar, click "Add Rule", and then enter the following fields:
74
-
75
-
- **Description:** Publish new versions from tags
76
-
- **Match:** Custom Match
77
-
- **Custom match:** v[vV]
78
-
- **Version:** Tag
79
-
- **Action:** Activate version
80
-
81
-
Then hit "Save".
82
-
83
-
*After your first release, the docs will automatically be published to [your-project-name.readthedocs.io](https://your-project-name.readthedocs.io/).*
84
-
85
-
### Creating releases
86
-
87
-
Creating new GitHub and PyPI releases is easy. The GitHub Actions workflow that comes with this repository will handle all of that for you.
88
-
All you need to do is follow the instructions in [RELEASE_PROCESS.md](./RELEASE_PROCESS.md).
89
-
90
-
## Projects using this template
91
-
92
-
Here is an incomplete list of some projects that started off with this template:
☝️ *Want your work featured here? Just open a pull request that adds the link.*
102
-
103
-
## FAQ
104
-
105
-
#### Should I use this template even if I don't want to publish my package?
106
-
107
-
Absolutely! If you don't want to publish your package, just delete the `docs/` directory and the `release` job in [`.github/workflows/main.yml`](https://github.com/allenai/python-package-template/blob/main/.github/workflows/main.yml).
108
-
109
-
## Contributing
110
-
111
-
If you find a bug :bug:, please open a [bug report](https://github.com/allenai/python-package-template/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
112
-
If you have an idea for an improvement or new feature :rocket:, please open a [feature request](https://github.com/allenai/python-package-template/issues/new?assignees=&labels=Feature+request&template=feature_request.md&title=).
0 commit comments