-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
169 changed files
with
17,894 additions
and
14,409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/miniconda | ||
{ | ||
"name": "py4dstem-dev", | ||
"image": "mcr.microsoft.com/vscode/devcontainers/miniconda:0-3", | ||
// "build": { | ||
// "context": "..", | ||
// "dockerfile": "Dockerfile" | ||
// }, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [] | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "/opt/conda/bin/conda init && /opt/conda/bin/pip install -e /workspaces/py4DSTEM/ && /opt/conda/bin/pip install ipython ipykernel jupyter", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.defaultInterpreterPath": "/opt/conda/bin/python", | ||
"python.analysis.autoFormatStrings": true, | ||
"python.analysis.completeFunctionParens": true, | ||
"ruff.showNotifications": "onWarning", | ||
"workbench.colorTheme": "Monokai", | ||
// "editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace", | ||
"editor.bracketPairColorization.enabled": true, | ||
"editor.guides.bracketPairs": "active", | ||
"editor.minimap.renderCharacters": false, | ||
"editor.minimap.autohide": true, | ||
"editor.minimap.scale": 2, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": false | ||
} | ||
} | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"donjayamanne.python-extension-pack", | ||
"ms-python.vscode-pylance", | ||
"ms-toolsai.jupyter", | ||
"GitHub.codespaces", | ||
"ms-azuretools.vscode-docker", | ||
"DavidAnson.vscode-markdownlint", | ||
"ms-vsliveshare.vsliveshare", | ||
"charliermarsh.ruff", | ||
"eamodio.gitlens", | ||
"ms-python.black-formatter" | ||
] | ||
} | ||
} | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
""" | ||
Script to update the patch version number of the py4DSTEM package. | ||
Author: Tara Mishra (Quantumstud) | ||
""" | ||
|
||
version_file_path = "py4DSTEM/version.py" | ||
|
||
with open(version_file_path, "r") as f: | ||
lines = f.readlines() | ||
|
||
line_split = lines[0].split('.') | ||
patch_number = line_split[2].split('\'')[0] | ||
line_split = lines[0].split(".") | ||
patch_number = line_split[2].split("'")[0] | ||
|
||
# Increment patch number | ||
patch_number = str(int(patch_number) + 1)+'\'' | ||
patch_number = str(int(patch_number) + 1) + "'" | ||
|
||
|
||
new_line = line_split[0]+'.'+line_split[1]+'.'+patch_number | ||
new_line = line_split[0] + "." + line_split[1] + "." + patch_number | ||
|
||
with open(version_file_path,"w") as f: | ||
with open(version_file_path, "w") as f: | ||
f.write(new_line) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Check code style | ||
|
||
on: | ||
push: | ||
branches: [ "dev" ] | ||
pull_request: | ||
branches: [ "dev" ] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Install Checker Dev | ||
on: | ||
push: | ||
branches: [ "dev" ] | ||
pull_request: | ||
branches: [ "dev" ] | ||
jobs: | ||
|
||
test-python-os-versions: | ||
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} on ${{ matrix.architecture }} | ||
continue-on-error: ${{ matrix.allow_failure }} | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
allow_failure: [false] | ||
runs-on: [ubuntu-latest] | ||
architecture: [x86_64] | ||
python-version: ["3.9", "3.10", "3.11",] | ||
# include: | ||
# - python-version: "3.12.0-beta.4" | ||
# runs-on: ubuntu-latest | ||
# allow_failure: true | ||
# Currently no public runners available for this but this or arm64 should work next time | ||
# include: | ||
# - python-version: "3.10" | ||
# architecture: [aarch64] | ||
# runs-on: macos-latest | ||
# allow_failure: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install repo | ||
run: | | ||
python -m pip install . | ||
- name: Check installation | ||
run: | | ||
python -c "import py4DSTEM; print(py4DSTEM.__version__)" | ||
# - name: Check machine arch | ||
# run: | | ||
# python -c "import platform; print(platform.machine())" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Install Checker Main | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
|
||
test-python-os-versions: | ||
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} on ${{ matrix.architecture }} | ||
continue-on-error: ${{ matrix.allow_failure }} | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
allow_failure: [false] | ||
runs-on: [ubuntu-latest, windows-latest, macos-latest] | ||
architecture: [x86_64] | ||
python-version: ["3.9", "3.10", "3.11",] | ||
#include: | ||
# - python-version: "3.12.0-beta.4" | ||
# runs-on: ubuntu-latest | ||
# allow_failure: true | ||
# Currently no public runners available for this but this or arm64 should work next time | ||
# include: | ||
# - python-version: "3.10" | ||
# architecture: [aarch64] | ||
# runs-on: macos-latest | ||
# allow_failure: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install repo | ||
run: | | ||
python -m pip install . | ||
- name: Check installation | ||
run: | | ||
python -c "import py4DSTEM; print(py4DSTEM.__version__)" | ||
- name: Check machine arch | ||
run: | | ||
python -c "import platform; print(platform.machine())" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Install Checker Quick | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
- dev | ||
pull_request: | ||
branches-ignore: | ||
- main | ||
- dev | ||
jobs: | ||
|
||
test-python-os-versions: | ||
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} on ${{ matrix.architecture }} | ||
continue-on-error: ${{ matrix.allow_failure }} | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
allow_failure: [false] | ||
runs-on: [ubuntu-latest] | ||
architecture: [x86_64] | ||
python-version: ["3.10"] | ||
# Currently no public runners available for this but this or arm64 should work next time | ||
# include: | ||
# - python-version: "3.10" | ||
# architecture: [aarch64] | ||
# runs-on: macos-latest | ||
# allow_failure: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install repo | ||
run: | | ||
python -m pip install . | ||
- name: Check installation | ||
run: | | ||
python -c "import py4DSTEM; print(py4DSTEM.__version__)" | ||
# - name: Check machine arch | ||
# run: | | ||
# python -c "import platform; print(platform.machine())" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: flake8 Lint | ||
name: Check for errors with flake8 | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
emdfile | ||
# py4dstem | ||
sphinx_rtd_theme | ||
# py4dstem |
Oops, something went wrong.