Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge development branch into the master branch #42

Merged
merged 66 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4c88e05
Initialize repo packaging based on sci py cookie
lsetiawan Jul 19, 2023
1cfd34d
Update min python and remove pre-commit dep for now
lsetiawan Jul 19, 2023
b456f6d
Remove copier answers
lsetiawan Jul 19, 2023
14c685e
Remove 3.12 for now
lsetiawan Jul 19, 2023
1a85147
Remove pypy3.9
lsetiawan Jul 19, 2023
b44660b
Allow formatting to always pass for now
lsetiawan Jul 19, 2023
8ab00b4
Ignore pre-commit for now
lsetiawan Jul 19, 2023
f0244aa
Merge pull request #1 from uw-ssec/update_repo
uwcdc Jul 26, 2023
5901084
fix: bring back missing .so file and remove from gitignore
lsetiawan Aug 2, 2023
9052608
Merge pull request #2 from uw-ssec/missing
lsetiawan Aug 2, 2023
e8a1f52
chore: Merge branch 'master' into development
lsetiawan Sep 14, 2023
c3187b9
chore: remove old setup.py
lsetiawan Sep 15, 2023
ff5c3e3
ci: update branch to development
lsetiawan Sep 15, 2023
c3ade4f
ci: Add built dist test step for cd
lsetiawan Sep 15, 2023
751ae3b
ci: publish need both steps to finish
lsetiawan Sep 15, 2023
da8dba8
ci: fix python version
lsetiawan Sep 15, 2023
bebbf21
ci: fix artifact name and action version
lsetiawan Sep 15, 2023
9996480
ci: Remove cd for pull requests
lsetiawan Sep 15, 2023
d5e04c9
ci: fix auto versioning for pypi
lsetiawan Sep 15, 2023
f75856e
chore(deps): Add all optional deps
lsetiawan Sep 15, 2023
a8c66ba
Update README.md
uwcdc Sep 18, 2023
33a3bba
Update README.md
uwcdc Sep 21, 2023
d418cb0
Update docs and devcontainer
uwcdc Sep 22, 2023
3836ace
Update .gitignore
uwcdc Sep 22, 2023
d7e1c18
Update .gitignore
uwcdc Sep 22, 2023
1dfdfc1
Add build/html files
uwcdc Sep 22, 2023
93c0faf
chore(deps): Update smart_open to use braingeneers version
lsetiawan Oct 7, 2023
b8100cb
chore(deps): Pin neuraltoolkit to v0.3.1
lsetiawan Oct 9, 2023
05b1ce6
refactor: Merge branch 'master' into development
lsetiawan Oct 9, 2023
9eb8519
Update README.md
uwcdc Oct 11, 2023
42c734c
Update .devcontainer/post_create.sh
uwcdc Oct 11, 2023
6e1a2c1
Update post_create.sh
uwcdc Oct 11, 2023
2da1542
Update post_create.sh
uwcdc Oct 11, 2023
5a2f692
Update post_create.sh
uwcdc Oct 11, 2023
d253c63
Update LICENSE
uwcdc Oct 11, 2023
039b8bf
Update pyproject.toml
uwcdc Oct 11, 2023
8ecad73
Update README.md
uwcdc Oct 11, 2023
de417ba
Update README.md
uwcdc Oct 11, 2023
0b23f24
Update README.md
uwcdc Oct 11, 2023
e3d522d
ci: Rename .readthedocs.yml to .readthedocs.yaml
lsetiawan Oct 11, 2023
e1ff7ec
Remove /docs/build files
uwcdc Oct 11, 2023
07ae001
Update README.md
uwcdc Oct 11, 2023
f49f70c
Update README.md
uwcdc Oct 11, 2023
07cc73b
Update .readthedocs.yaml
uwcdc Oct 12, 2023
6bcfab5
Update src/braingeneers/_compat/typing.py
uwcdc Oct 23, 2023
4ea84a6
Update pyproject.toml
uwcdc Oct 23, 2023
84fc58a
Update README.md
uwcdc Oct 23, 2023
560f45c
Update README.md
uwcdc Oct 23, 2023
a389fa6
Update README.md
uwcdc Oct 23, 2023
042358c
Update ci.yml
uwcdc Oct 25, 2023
8357f84
Delete .extgitignore
uwcdc Oct 25, 2023
6460efa
Delete src/braingeneers/_compat directory
uwcdc Oct 25, 2023
e01c432
Update test_package.py
uwcdc Oct 25, 2023
d37388f
Update test_package.py
uwcdc Oct 25, 2023
7bba971
Update ci.yml
uwcdc Oct 25, 2023
14dd99e
Update ci.yml
uwcdc Oct 25, 2023
31153a6
Update ci.yml
uwcdc Oct 25, 2023
48f014d
Update ci.yml
uwcdc Oct 25, 2023
62fc1c8
Update ci.yml
uwcdc Oct 25, 2023
04151fc
Update LICENSE
uwcdc Oct 26, 2023
5ccdec3
Update README.md
uwcdc Oct 26, 2023
8fccf00
Merge branch 'master' into development
uwcdc Oct 26, 2023
33e9f0c
Update ci.yml
uwcdc Oct 26, 2023
16af868
Update ci.yml
uwcdc Oct 26, 2023
6184004
Update ci.yml
uwcdc Oct 26, 2023
9947c56
Update ci.yml
uwcdc Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"image":"ghcr.io/braingeneers/research:latest",

"customizations": {
"vscode": {
"extensions": [
"ms-toolsai.jupyter",
"ms-python.python",
"ms-vsliveshare.vsliveshare"
]
}
},
"postCreateCommand": "sh .devcontainer/post_create.sh"
}
7 changes: 7 additions & 0 deletions .devcontainer/post_create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# For writing commands that will be executed after the container is created

# Uninstalls the braingeneerspy package (pre-installed in the research Docker image) from the environment
python3 -m pip uninstall braingeneerspy

# Installs a Python package located in the current directory in editable mode and includes all optional extras specified in the [all] section of braingeneers.
python3 -m pip install -e ".[all]"
158 changes: 158 additions & 0 deletions .extgitignore
uwcdc marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# setuptools_scm
src/*/_version.py


# ruff
.ruff_cache/

# OS specific stuff
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Common editor files
*~
*.swp
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
101 changes: 101 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
description of best practices for developing scientific packages.

[spc-dev-intro]: https://scientific-python-cookie.readthedocs.io/guide/intro

# Quick development

The fastest way to start with development is to use nox. If you don't have nox,
you can use `pipx run nox` to run it without installing, or `pipx install nox`.
If you don't have pipx (pip for applications), then you can install with with
`pip install pipx` (the only case were installing an application with regular
pip is reasonable). If you use macOS, then pipx and nox are both in brew, use
`brew install pipx nox`.

To use, run `nox`. This will lint and test using every installed version of
Python on your system, skipping ones that are not installed. You can also run
specific jobs:

```console
$ nox -s lint # Lint only
$ nox -s tests # Python tests
$ nox -s docs -- serve # Build and serve the docs
$ nox -s build # Make an SDist and wheel
```

Nox handles everything for you, including setting up an temporary virtual
environment for each run.

# Setting up a development environment manually

You can set up a development environment by running:

```bash
python3 -m venv .venv
source ./.venv/bin/activate
pip install -v -e .[dev]
```

If you have the
[Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you
can instead do:

```bash
py -m venv .venv
py -m install -v -e .[dev]
```

# Post setup

You should prepare pre-commit, which will help you by checking that commits pass
required checks:

```bash
pip install pre-commit # or brew install pre-commit on macOS
pre-commit install # Will install a pre-commit hook into the git repo
```

You can also/alternatively run `pre-commit run` (changes only) or
`pre-commit run --all-files` to check even without installing the hook.

# Testing

Use pytest to run the unit checks:

```bash
pytest
```

# Coverage

Use pytest-cov to generate coverage reports:

```bash
pytest --cov=braingeneers
```

# Building docs

You can build the docs using:

```bash
nox -s docs
```

You can see a preview with:

```bash
nox -s docs -- serve
```

# Pre-commit

This project uses pre-commit for all style checking. While you can run it with
nox, this is such an important tool that it deserves to be installed on its own.
Install pre-commit and run:

```bash
pre-commit run -a
```

to check all files.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
32 changes: 32 additions & 0 deletions .github/matchers/pylint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"problemMatcher": [
{
"severity": "warning",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
],
"owner": "pylint-warning"
},
{
"severity": "error",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
],
"owner": "pylint-error"
}
]
}
Loading
Loading