Skip to content

Commit

Permalink
Merge branch 'develop' into oeis_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmoon committed Dec 19, 2023
2 parents 2b8b0f3 + b002b63 commit 8f9af0b
Show file tree
Hide file tree
Showing 605 changed files with 4,538 additions and 5,109 deletions.
28 changes: 17 additions & 11 deletions .ci/create-changes-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,27 @@ for block in diff_blocks:
match = re.search(r'^diff --git a/(.*) b/\1', block, flags=re.MULTILINE)
if match:
doc = match.group(1)
path = 'html/' + doc
file_path = os.path.join('$DOC_REPOSITORY', doc)
with open(file_path, 'r') as file:
content = file.readlines()
try:
with open(file_path, 'r') as file:
content = file.readlines()
except FileNotFoundError:
content = []
count = 0
for line in block.splitlines():
if line.startswith('@@ -'):
line_number = int(re.search(r'@@ -(\d+)', line).group(1))
for i in range(line_number, -1, -1):
if content[i].startswith('<'):
count += 1
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
break
with open(file_path, 'w') as file:
file.writelines(content)
search_result = re.search(r'@@ -(\d+),(\d+) \+(\d+),(\d+)', line)
if search_result:
line_number = int(search_result.group(3))
for i in range(line_number - 1, -1, -1):
if content[i].startswith('<'):
count += 1
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
break
if content:
with open(file_path, 'w') as file:
file.writelines(content)
path = 'html/' + doc
hunks = '&nbsp;'.join(f'<a href="{path}#hunk{i+1}" class="hunk" target="_blank">#{i + 1}</a>' for i in range(count))
out_blocks.append(f'<p class="diff"><a href="{path}">{doc}</a>&nbsp;' + hunks + '&emsp;</p>'
+ '\n<pre><code class="language-diff">'
Expand Down
28 changes: 23 additions & 5 deletions .github/sync_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def __init__(self, url, actor):
self._commits = None
self._commit_date = None
self._bot_login = None
self._gh_version = None

s = url.split('/')
self._owner = s[3]
Expand Down Expand Up @@ -235,13 +236,30 @@ def bot_login(self):
"""
if self._bot_login:
return self._bot_login
cmd = 'gh auth status'
from subprocess import run
cmd = 'gh version'
capt = run(cmd, shell=True, capture_output=True)
self._gh_version = str(capt.stdout).split('\\n')[0]
info('version: %s' % self._gh_version)
cmd = 'gh auth status'
capt = run(cmd, shell=True, capture_output=True)
l = str(capt.stderr).split()
if not 'as' in l:
l = str(capt.stdout).split()
self._bot_login = l[l.index('as')+1]
errtxt = str(capt.stderr)
outtxt = str(capt.stdout)
debug('auth status err: %s' % errtxt)
debug('auth status out: %s' % outtxt)
def read_login(txt, position_mark):
for t in txt:
for p in position_mark:
# the output text has changed from as to account
# around version 2.40.0
l = t.split()
if p in l:
return l[l.index(p)+1]
self._bot_login = read_login([errtxt, outtxt], ['account', 'as'])
if not self._bot_login:
self._bot_login = default_bot
warning('Bot is unknown')
return self._bot_login
if self._bot_login.endswith('[bot]'):
self._bot_login = self._bot_login.split('[bot]')[0]
info('Bot is %s' % self._bot_login)
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/ci-conda-known-test-failures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"sage_setup.clean": {
"failed": true
},
"sage.combinat.cluster_algebra_quiver.quiver": {
"failed": true
},
"sage.geometry.cone": {
"failed": true
},
"sage.groups.matrix_gps.finitely_generated_gap": {
"failed": true
},
"sage.interfaces.expect": {
"failed": true
},
"sage.libs.gap.element": {
"failed": true
},
"sage.libs.singular.singular": {
"failed": true
},
"sage.matrix.matrix2": {
"failed": true
},
"sage.matrix.matrix_integer_sparse": {
"failed": true
},
"sage.misc.lazy_import": {
"failed": true
},
"sage.misc.weak_dict": {
"failed": true
},
"sage.modular.modform.l_series_gross_zagier": {
"failed": true
},
"sage.rings.function_field.drinfeld_modules.morphism": {
"failed": true
},
"sage.rings.polynomial.multi_polynomial_ideal": {
"failed": true
},
"sage.rings.polynomial.multi_polynomial_libsingular": {
"failed": true
},
"sage.rings.polynomial.skew_polynomial_finite_field": {
"failed": true
},
"sage.tests.gap_packages": {
"failed": true
}
}
4 changes: 1 addition & 3 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: ${{ github.event_name == 'pull_request' }}
max-parallel: ${{ github.event_name == 'pull_request' && 2 || 6 }}
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.9', '3.10', '3.11']
Expand Down Expand Up @@ -94,7 +92,7 @@ jobs:
- name: Test
if: success() || failure()
shell: bash -l {0}
run: ./sage -t --all -p0
run: ./sage -t --all --baseline-stats-path=.github/workflows/ci-conda-known-test-failures.json -p0

- name: Print logs
if: always()
Expand Down
151 changes: 0 additions & 151 deletions .github/workflows/cygwin.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/extract-sage-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ fi
# Show all tar files
ls -l $*

# Cygwin note: We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
for a in $*; do
echo Extracting $a
(cd / && tar xf -) < $a
Expand All @@ -33,10 +32,3 @@ fi

# Show how we are doing on free space.
df -h

# Rebase!
case "$(uname)" in
CYGWIN*)
exec src/bin/sage-rebase.sh --all "$SAGE_LOCAL"
;;
esac
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: SageMath
abstract: SageMath is a free open-source mathematics software system.
authors:
- name: "The SageMath Developers"
version: 10.3.beta1
version: 10.3.beta3
doi: 10.5281/zenodo.593563
date-released: 2023-12-10
date-released: 2023-12-18
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
Loading

0 comments on commit 8f9af0b

Please sign in to comment.