Skip to content

Commit 6c905fc

Browse files
authored
Merge pull request #6 from Cobertos/feature/perf
2 parents 2996c1a + 97386af commit 6c905fc

File tree

10 files changed

+346
-95
lines changed

10 files changed

+346
-95
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Python package
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: ~
48

59
jobs:
610
build:
@@ -9,19 +13,22 @@ jobs:
913
strategy:
1014
max-parallel: 4
1115
matrix:
12-
python-version: [3.6, 3.7]
16+
python-version: [3.6, 3.7, 3.8]
1317

1418
steps:
1519
- uses: actions/checkout@v1
1620
- name: Set up Python ${{ matrix.python-version }}
1721
uses: actions/setup-python@v1
1822
with:
1923
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install -r requirements-ci.txt
24-
- name: Test with pytest
25-
run: |
26-
pip install pytest
27-
pytest -v -s
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pipenv
28+
pipenv install --deploy
29+
# Install manually to avoid all other dev deps, use --deploy
30+
# to fail if the lockfile doesn't match
31+
- name: Test with pytest
32+
run: |
33+
pipenv install pytest
34+
pipenv run pytest -v

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
Here's how to run all the development stuff.
4+
5+
## Setup Development Environment
6+
* `pyenv global 3.6.8-amd64`
7+
* `pipenv install --dev`
8+
9+
## Building
10+
11+
Building is a little convoluted because we build a x64 and an x86 binary...
12+
13+
* `pyenv global 3.6.8-amd64`
14+
* Originally wasn't able to get this to run on Python 3.7 when it was new, but 3.6 is guarenteed to build the `.exe`
15+
* `pyenv exec python -m venv venv64`
16+
* `venv64\scripts\activate.bat` or `venv64/scripts/activate` for Linux
17+
* `pip install -r requirements-dev.txt` (Installs `pyinstaller` and `pytest`)
18+
* `python build_exe.py`
19+
* `venv64\scripts\deactivate.bat` (or you'll use the wrong python when you make another `venv`)
20+
* Do the same with `pyenv and 3.6.8` and make a folder called `venv32` instead
21+
22+
## Testing
23+
* `pipenv run pytest -v` in the root directory
24+
25+
## Releasing
26+
Refer to [the python docs on packaging for clarification](https://packaging.python.org/tutorials/packaging-projects/).
27+
* Make sure you've updated `setup.py`
28+
* `python setup.py sdist bdist_wheel` - Create a source distribution and a binary wheel distribution into `dist/`
29+
* `twine upload dist/unitypackage_extractor-x.x.x*` - Upload all `dist/` files to PyPI of a given version
30+
* Make sure to tag the commit you released!

Pipfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[dev-packages]
7+
pytest = "*"
8+
twine = "*"
9+
setuptools = "*"
10+
wheel = "*"
11+
# Don't put pyinstaller in here bc it has trouble in CI
12+
# PyInstaller = "*"

Pipfile.lock

Lines changed: 236 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88

99
# Unity Package Extractor
1010

11-
1211
Extract your .unitypackage
1312

1413
## Usage without Python
1514

16-
* Download the [unitypackage_extractor.zip](https://github.com/Cobertos/unitypackage_extractor/releases/tag/0.5.1) from the Releases tab.
15+
* Download the [unitypackage_extractor.zip](https://github.com/Cobertos/unitypackage_extractor/releases/latest) from the Releases tab.
1716
* Extract everything into a new directory
1817
* Drag and drop your `.unitypackage` onto `extractor.exe` OR
1918
* Run from the command line with `extractor.exe [path/to/your/package.unitypackage] (optional/output/path)`
@@ -22,7 +21,7 @@ Extract your .unitypackage
2221

2322
* `pip install unitypackage_extractor`
2423

25-
* From the command line `python -m unitypackage_extractor.extractor [path/to/your/package.unitypackage] (optional/output/path)`
24+
* From the command line `python -m unitypackage_extractor [path/to/your/package.unitypackage] (optional/output/path)`
2625

2726
* OR in your Python file:
2827
```python
@@ -36,26 +35,4 @@ extractPackage("path/to/your/package.unitypackage", outputPath="optional/output/
3635
The maintainers of thousands of packages (including me! :3) are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/pypi-unitypackage-extractor?utm_source=pypi-unitypackage-extractor&utm_medium=referral&utm_campaign=readme)
3736

3837
## Contributing
39-
#### Building (requires pyenv)
40-
* `pyenv global 3.6.8-amd64`
41-
* Originally wasn't able to get this to run on Python 3.7 when it was new, but 3.6 is guarenteed to build the `.exe`
42-
* `pyenv exec python -m venv venv64`
43-
* `venv64\scripts\activate.bat` or `venv64/scripts/activate` for Linux
44-
* `pip install -r requirements-dev.txt` (Installs `pyinstaller` and `pytest`)
45-
* `python build_exe.py`
46-
* `venv64\scripts\deactivate.bat` (or you'll use the wrong python when you make another `venv`)
47-
* Do the same with `pyenv and 3.6.8` and make a folder called `venv32` instead
48-
49-
#### Testing
50-
* `python -m venv venv`
51-
* `venv\scripts\activate.bat` or `venv/scripts/activate` for Linux
52-
* `pip install -r requirements-dev.txt` (Installs `pyinstaller` and `pytest`)
53-
* `pytest -v -s` in the root directory
54-
55-
#### Releasing
56-
Refer to [the python docs on packaging for clarification](https://packaging.python.org/tutorials/packaging-projects/).
57-
Make sure you've updated `setup.py`, and have installed `twine`, `setuptools`, and `wheel`
58-
`python3 setup.py sdist bdist_wheel` - Create a source distribution and a binary wheel distribution into `dist/`
59-
`twine upload dist/unitypackage_extractor-x.x.x*` - Upload all `dist/` files to PyPI of a given version
60-
Make sure to tag the commit you released
61-
Make sure to update the README link tag too!
38+
See [CONTRIBUTING.md](https://github.com/Cobertos/md2notion/blob/master/CONTRIBUTING.md)

requirements-ci.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)