Skip to content

Commit c2ae7a2

Browse files
committed
init
1 parent 4d56270 commit c2ae7a2

21 files changed

+57
-403
lines changed

.github/CONTRIBUTING.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Thanks for considering contributing! Please read this document to learn the vari
66

77
### Did you find a bug?
88

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.
1010
If your issue has already been reported, please comment on the existing issue.
1111

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
1313
and description. The description should include as much relevant information as possible. The description should
1414
explain how to reproduce the erroneous behavior as well as the behavior you expect to see. Ideally you would include a
1515
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
2121
* Make sure you have a clear idea of the enhancement you would like. If you have a vague idea, consider discussing
2222
it first on a GitHub issue.
2323
* 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.
2525

2626
When creating your request, please:
2727

@@ -41,31 +41,31 @@ When you're ready to contribute code to address an open issue, please follow the
4141

4242
Then clone your fork locally with
4343

44-
git clone https://github.com/USERNAME/python-package-template.git
44+
git clone https://github.com/USERNAME/drawedumath.git
4545

4646
or
4747

48-
git clone git@github.com:USERNAME/python-package-template.git
48+
git clone git@github.com:USERNAME/drawedumath.git
4949

50-
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
5151

5252
git remote -v
5353

5454
which will output something like this:
5555

56-
origin https://github.com/USERNAME/python-package-template.git (fetch)
57-
origin https://github.com/USERNAME/python-package-template.git (push)
56+
origin https://github.com/USERNAME/drawedumath.git (fetch)
57+
origin https://github.com/USERNAME/drawedumath.git (push)
5858

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/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:
6060

61-
git remote add upstream https://github.com/allenai/python-package-template.git
61+
git remote add upstream https://github.com/allenai/drawedumath.git
6262

6363
Now if you do `git remote -v` again, you'll see
6464

65-
origin https://github.com/USERNAME/python-package-template.git (fetch)
66-
origin https://github.com/USERNAME/python-package-template.git (push)
67-
upstream https://github.com/allenai/python-package-template.git (fetch)
68-
upstream https://github.com/allenai/python-package-template.git (push)
65+
origin https://github.com/USERNAME/drawedumath.git (fetch)
66+
origin https://github.com/USERNAME/drawedumath.git (push)
67+
upstream https://github.com/allenai/drawedumath.git (fetch)
68+
upstream https://github.com/allenai/drawedumath.git (push)
6969

7070
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.
7171
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
7777

7878
Then you can create and activate a new Python environment by running:
7979

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
8282

8383
Once your virtual environment is activated, you can install your local clone in "editable mode" with
8484

@@ -93,7 +93,7 @@ When you're ready to contribute code to address an open issue, please follow the
9393

9494
<details><summary>Expand details 👇</summary><br/>
9595

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:
9797

9898
git checkout main # if not already on main
9999
git pull --rebase upstream main
@@ -119,7 +119,7 @@ When you're ready to contribute code to address an open issue, please follow the
119119

120120
<details><summary>Expand details 👇</summary><br/>
121121

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.
123123

124124
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.
125125
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
137137

138138
mypy .
139139

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.
141141

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
143143

144144
pytest -v tests/a/b_test.py
145145

@@ -152,9 +152,9 @@ When you're ready to contribute code to address an open issue, please follow the
152152

153153
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.
154154

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.
156156

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).
158158
Make sure you have a clear description of the problem and the solution, and include a link to relevant issues.
159159

160160
We look forward to reviewing your PR!

.github/ISSUE_TEMPLATE/bug_report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ body:
66
- type: markdown
77
attributes:
88
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+).
1010
- type: textarea
1111
attributes:
1212
label: 🐛 Describe the bug
@@ -17,7 +17,7 @@ body:
1717
1818
```python
1919
# All necessary imports at the beginning
20-
import my_package
20+
import drawedumath
2121
2222
# A succinct reproducing example trimmed down to the essential parts:
2323
assert False is True, "Oh no!"

.github/ISSUE_TEMPLATE/documentation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: 📚 Documentation
2-
description: Report an issue related to https://my-package.readthedocs.io/latest
2+
description: Report an issue related to https://drawedumath.readthedocs.io/latest
33
labels: 'documentation'
44

55
body:
66
- type: textarea
77
attributes:
88
label: 📚 The doc issue
99
description: >
10-
A clear and concise description of what content in https://my-package.readthedocs.io/latest is an issue.
10+
A clear and concise description of what content in https://drawedumath.readthedocs.io/latest is an issue.
1111
validations:
1212
required: true
1313
- type: textarea

.github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Changes proposed in this pull request:
1010
## Before submitting
1111

1212
<!-- 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)
1414
section of the `CONTRIBUTING` docs.
1515
- [ ] 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.
1717
- [ ] If this PR fixes a bug, I've added a test that will fail without my fix.
1818
- [ ] If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
if: always()
9898
run: |
9999
. .venv/bin/activate
100-
pip uninstall -y my-package
100+
pip uninstall -y drawedumath
101101
102102
release:
103103
name: Release

.github/workflows/pr_checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches:
1010
- main
1111
paths:
12-
- 'my_package/**'
12+
- 'drawedumath/**'
1313

1414
jobs:
1515
changelog:

.github/workflows/setup.yml

-53
This file was deleted.

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
.PHONY : docs
22
docs :
33
rm -rf docs/build/
4-
sphinx-autobuild -b html --watch my_package/ docs/source/ docs/build/
4+
sphinx-autobuild -b html --watch drawedumath/ docs/source/ docs/build/
55

66
.PHONY : run-checks
77
run-checks :
88
isort --check .
99
black --check .
1010
ruff check .
1111
mypy .
12-
CUDA_VISIBLE_DEVICES='' pytest -v --color=yes --doctest-modules tests/ my_package/
12+
CUDA_VISIBLE_DEVICES='' pytest -v --color=yes --doctest-modules tests/ drawedumath/
1313

1414
.PHONY : build
1515
build :

README.md

+1-112
Original file line numberDiff line numberDiff line change
@@ -1,112 +1 @@
1-
# python-package-template
2-
3-
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:
93-
94-
- [ai2-tango](https://github.com/allenai/tango)
95-
- [cached-path](https://github.com/allenai/cached_path)
96-
- [beaker-py](https://github.com/allenai/beaker-py)
97-
- [gantry](https://github.com/allenai/beaker-gantry)
98-
- [ip-bot](https://github.com/abe-101/ip-bot)
99-
- [atty](https://github.com/mstuttgart/atty)
100-
101-
☝️ *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=).
1+
# drawedumath

RELEASE_PROCESS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Steps
44

5-
1. Update the version in `my_package/version.py`.
5+
1. Update the version in `drawedumath/version.py`.
66

77
3. Run the release script:
88

0 commit comments

Comments
 (0)