Skip to content

Commit

Permalink
Remove some deprication warnings and try to twqeak testing github action
Browse files Browse the repository at this point in the history
  • Loading branch information
gb119 committed Oct 30, 2024
1 parent 069c5e0 commit e8c3a4f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/run-tests-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,24 @@ jobs:
os: ["ubuntu-latest"]
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: tests/test-env.yml
extra-specs: |
python=${{ matrix.python-version }}
channels: phygbu, conda-forge
python: ${{ matrix.python-version }}
channels: conda-forge,phygbu
allow-softlinks: true
channel-priority: flexible
- name: Conda info
run: ${MAMBA_EXE} info
- name: Conda list
run: ${MAMBA_EXE} list
show-channel-urls: true
run: |
conda info
conda list
conda config --show-sources
conda config --show
conda activate test-environment
- name: install package
run: ${MAMBA_ROOT_PREFIX}/envs/test-environment/bin/pip install --no-deps .
run: pip install --no-deps .
- name: Install headless server
run: |
sudo apt-get install xvfb
Expand Down
4 changes: 2 additions & 2 deletions Stoner/Image/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def keypress(self, event):
plt.title(getattr(getattr(self, f"draw_{self.obj}", ""), "instructions", ""))
return self.draw(event)
if event.key.lower() == "i":
self.invert = ~self.invert
self.invert = not self.invert
return self.draw(event)
if event.key.lower() == "enter":
self.vertices.append((event.xdata, event.ydata))
Expand Down Expand Up @@ -524,5 +524,5 @@ def get_mask(self):
vertices = np.array(self.vertices)
meth = getattr(self, f"draw_{self.obj}", lambda x: ([], []))
rr, cc = meth(vertices)
mask[rr, cc] = ~self.invert
mask[rr, cc] = not self.invert
return mask
2 changes: 1 addition & 1 deletion Stoner/tools/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def keypress(self, event):
self.ax.patches[-1].remove()
self.data.fig.canvas.draw()
elif event.key.lower() == "i": # Invert selection
self.invert = ~self.invert
self.invert = not self.invert
col = "red" if self.invert else "green"
for p in self.ax.patches:
p.update({"color": col, "facecolor": col})
Expand Down
1 change: 1 addition & 0 deletions tests/test-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ dependencies:
- statsmodels
- tabulate
- urllib3
- pip

0 comments on commit e8c3a4f

Please sign in to comment.